Skip to content

Commit 7f59f02

Browse files
chore(bazel): update protobuf to v3.21.7 (#404)
* chore(bazel): update protobuf to v3.21.7 PiperOrigin-RevId: 477955264 Source-Link: googleapis/googleapis@a724450 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 1f1768e commit 7f59f02

File tree

14 files changed

+1201
-1837
lines changed

14 files changed

+1201
-1837
lines changed

java-orgpolicy/proto-google-cloud-orgpolicy-v1/src/main/java/com/google/cloud/orgpolicy/v1/Policy.java

Lines changed: 248 additions & 381 deletions
Large diffs are not rendered by default.

java-orgpolicy/proto-google-cloud-orgpolicy-v2/src/main/java/com/google/cloud/orgpolicy/v2/AlternatePolicySpec.java

Lines changed: 51 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5353
return this.unknownFields;
5454
}
5555

56-
private AlternatePolicySpec(
57-
com.google.protobuf.CodedInputStream input,
58-
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
59-
throws com.google.protobuf.InvalidProtocolBufferException {
60-
this();
61-
if (extensionRegistry == null) {
62-
throw new java.lang.NullPointerException();
63-
}
64-
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
65-
com.google.protobuf.UnknownFieldSet.newBuilder();
66-
try {
67-
boolean done = false;
68-
while (!done) {
69-
int tag = input.readTag();
70-
switch (tag) {
71-
case 0:
72-
done = true;
73-
break;
74-
case 10:
75-
{
76-
java.lang.String s = input.readStringRequireUtf8();
77-
78-
launch_ = s;
79-
break;
80-
}
81-
case 18:
82-
{
83-
com.google.cloud.orgpolicy.v2.PolicySpec.Builder subBuilder = null;
84-
if (spec_ != null) {
85-
subBuilder = spec_.toBuilder();
86-
}
87-
spec_ =
88-
input.readMessage(
89-
com.google.cloud.orgpolicy.v2.PolicySpec.parser(), extensionRegistry);
90-
if (subBuilder != null) {
91-
subBuilder.mergeFrom(spec_);
92-
spec_ = subBuilder.buildPartial();
93-
}
94-
95-
break;
96-
}
97-
default:
98-
{
99-
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
100-
done = true;
101-
}
102-
break;
103-
}
104-
}
105-
}
106-
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
107-
throw e.setUnfinishedMessage(this);
108-
} catch (com.google.protobuf.UninitializedMessageException e) {
109-
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
110-
} catch (java.io.IOException e) {
111-
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
112-
} finally {
113-
this.unknownFields = unknownFields.build();
114-
makeExtensionsImmutable();
115-
}
116-
}
117-
11856
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
11957
return com.google.cloud.orgpolicy.v2.OrgPolicyProto
12058
.internal_static_google_cloud_orgpolicy_v2_AlternatePolicySpec_descriptor;
@@ -249,7 +187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
249187
if (spec_ != null) {
250188
output.writeMessage(2, getSpec());
251189
}
252-
unknownFields.writeTo(output);
190+
getUnknownFields().writeTo(output);
253191
}
254192

255193
@java.lang.Override
@@ -264,7 +202,7 @@ public int getSerializedSize() {
264202
if (spec_ != null) {
265203
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSpec());
266204
}
267-
size += unknownFields.getSerializedSize();
205+
size += getUnknownFields().getSerializedSize();
268206
memoizedSize = size;
269207
return size;
270208
}
@@ -285,7 +223,7 @@ public boolean equals(final java.lang.Object obj) {
285223
if (hasSpec()) {
286224
if (!getSpec().equals(other.getSpec())) return false;
287225
}
288-
if (!unknownFields.equals(other.unknownFields)) return false;
226+
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
289227
return true;
290228
}
291229

@@ -302,7 +240,7 @@ public int hashCode() {
302240
hash = (37 * hash) + SPEC_FIELD_NUMBER;
303241
hash = (53 * hash) + getSpec().hashCode();
304242
}
305-
hash = (29 * hash) + unknownFields.hashCode();
243+
hash = (29 * hash) + getUnknownFields().hashCode();
306244
memoizedHashCode = hash;
307245
return hash;
308246
}
@@ -432,17 +370,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
432370
}
433371

434372
// Construct using com.google.cloud.orgpolicy.v2.AlternatePolicySpec.newBuilder()
435-
private Builder() {
436-
maybeForceBuilderInitialization();
437-
}
373+
private Builder() {}
438374

439375
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
440376
super(parent);
441-
maybeForceBuilderInitialization();
442-
}
443-
444-
private void maybeForceBuilderInitialization() {
445-
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
446377
}
447378

448379
@java.lang.Override
@@ -546,7 +477,7 @@ public Builder mergeFrom(com.google.cloud.orgpolicy.v2.AlternatePolicySpec other
546477
if (other.hasSpec()) {
547478
mergeSpec(other.getSpec());
548479
}
549-
this.mergeUnknownFields(other.unknownFields);
480+
this.mergeUnknownFields(other.getUnknownFields());
550481
onChanged();
551482
return this;
552483
}
@@ -561,18 +492,43 @@ public Builder mergeFrom(
561492
com.google.protobuf.CodedInputStream input,
562493
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
563494
throws java.io.IOException {
564-
com.google.cloud.orgpolicy.v2.AlternatePolicySpec parsedMessage = null;
495+
if (extensionRegistry == null) {
496+
throw new java.lang.NullPointerException();
497+
}
565498
try {
566-
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
499+
boolean done = false;
500+
while (!done) {
501+
int tag = input.readTag();
502+
switch (tag) {
503+
case 0:
504+
done = true;
505+
break;
506+
case 10:
507+
{
508+
launch_ = input.readStringRequireUtf8();
509+
510+
break;
511+
} // case 10
512+
case 18:
513+
{
514+
input.readMessage(getSpecFieldBuilder().getBuilder(), extensionRegistry);
515+
516+
break;
517+
} // case 18
518+
default:
519+
{
520+
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
521+
done = true; // was an endgroup tag
522+
}
523+
break;
524+
} // default:
525+
} // switch (tag)
526+
} // while (!done)
567527
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
568-
parsedMessage =
569-
(com.google.cloud.orgpolicy.v2.AlternatePolicySpec) e.getUnfinishedMessage();
570528
throw e.unwrapIOException();
571529
} finally {
572-
if (parsedMessage != null) {
573-
mergeFrom(parsedMessage);
574-
}
575-
}
530+
onChanged();
531+
} // finally
576532
return this;
577533
}
578534

@@ -909,7 +865,18 @@ public AlternatePolicySpec parsePartialFrom(
909865
com.google.protobuf.CodedInputStream input,
910866
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
911867
throws com.google.protobuf.InvalidProtocolBufferException {
912-
return new AlternatePolicySpec(input, extensionRegistry);
868+
Builder builder = newBuilder();
869+
try {
870+
builder.mergeFrom(input, extensionRegistry);
871+
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
872+
throw e.setUnfinishedMessage(builder.buildPartial());
873+
} catch (com.google.protobuf.UninitializedMessageException e) {
874+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
875+
} catch (java.io.IOException e) {
876+
throw new com.google.protobuf.InvalidProtocolBufferException(e)
877+
.setUnfinishedMessage(builder.buildPartial());
878+
}
879+
return builder.buildPartial();
913880
}
914881
};
915882

0 commit comments

Comments
 (0)