Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 1c64ab0

Browse files
chore(bazel): update protobuf to v3.21.7 (#268)
* 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 ae92683 commit 1c64ab0

17 files changed

+815
-1234
lines changed

proto-google-cloud-shell-v1/src/main/java/com/google/cloud/shell/v1/AddPublicKeyMetadata.java

Lines changed: 39 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -51,45 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5151
return this.unknownFields;
5252
}
5353

54-
private AddPublicKeyMetadata(
55-
com.google.protobuf.CodedInputStream input,
56-
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
57-
throws com.google.protobuf.InvalidProtocolBufferException {
58-
this();
59-
if (extensionRegistry == null) {
60-
throw new java.lang.NullPointerException();
61-
}
62-
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
63-
com.google.protobuf.UnknownFieldSet.newBuilder();
64-
try {
65-
boolean done = false;
66-
while (!done) {
67-
int tag = input.readTag();
68-
switch (tag) {
69-
case 0:
70-
done = true;
71-
break;
72-
default:
73-
{
74-
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
75-
done = true;
76-
}
77-
break;
78-
}
79-
}
80-
}
81-
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
82-
throw e.setUnfinishedMessage(this);
83-
} catch (com.google.protobuf.UninitializedMessageException e) {
84-
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
85-
} catch (java.io.IOException e) {
86-
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
87-
} finally {
88-
this.unknownFields = unknownFields.build();
89-
makeExtensionsImmutable();
90-
}
91-
}
92-
9354
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
9455
return com.google.cloud.shell.v1.CloudShellProto
9556
.internal_static_google_cloud_shell_v1_AddPublicKeyMetadata_descriptor;
@@ -119,7 +80,7 @@ public final boolean isInitialized() {
11980

12081
@java.lang.Override
12182
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
122-
unknownFields.writeTo(output);
83+
getUnknownFields().writeTo(output);
12384
}
12485

12586
@java.lang.Override
@@ -128,7 +89,7 @@ public int getSerializedSize() {
12889
if (size != -1) return size;
12990

13091
size = 0;
131-
size += unknownFields.getSerializedSize();
92+
size += getUnknownFields().getSerializedSize();
13293
memoizedSize = size;
13394
return size;
13495
}
@@ -144,7 +105,7 @@ public boolean equals(final java.lang.Object obj) {
144105
com.google.cloud.shell.v1.AddPublicKeyMetadata other =
145106
(com.google.cloud.shell.v1.AddPublicKeyMetadata) obj;
146107

147-
if (!unknownFields.equals(other.unknownFields)) return false;
108+
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
148109
return true;
149110
}
150111

@@ -155,7 +116,7 @@ public int hashCode() {
155116
}
156117
int hash = 41;
157118
hash = (19 * hash) + getDescriptor().hashCode();
158-
hash = (29 * hash) + unknownFields.hashCode();
119+
hash = (29 * hash) + getUnknownFields().hashCode();
159120
memoizedHashCode = hash;
160121
return hash;
161122
}
@@ -285,17 +246,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
285246
}
286247

287248
// Construct using com.google.cloud.shell.v1.AddPublicKeyMetadata.newBuilder()
288-
private Builder() {
289-
maybeForceBuilderInitialization();
290-
}
249+
private Builder() {}
291250

292251
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
293252
super(parent);
294-
maybeForceBuilderInitialization();
295-
}
296-
297-
private void maybeForceBuilderInitialization() {
298-
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
299253
}
300254

301255
@java.lang.Override
@@ -377,7 +331,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) {
377331

378332
public Builder mergeFrom(com.google.cloud.shell.v1.AddPublicKeyMetadata other) {
379333
if (other == com.google.cloud.shell.v1.AddPublicKeyMetadata.getDefaultInstance()) return this;
380-
this.mergeUnknownFields(other.unknownFields);
334+
this.mergeUnknownFields(other.getUnknownFields());
381335
onChanged();
382336
return this;
383337
}
@@ -392,17 +346,31 @@ public Builder mergeFrom(
392346
com.google.protobuf.CodedInputStream input,
393347
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
394348
throws java.io.IOException {
395-
com.google.cloud.shell.v1.AddPublicKeyMetadata parsedMessage = null;
349+
if (extensionRegistry == null) {
350+
throw new java.lang.NullPointerException();
351+
}
396352
try {
397-
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
353+
boolean done = false;
354+
while (!done) {
355+
int tag = input.readTag();
356+
switch (tag) {
357+
case 0:
358+
done = true;
359+
break;
360+
default:
361+
{
362+
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
363+
done = true; // was an endgroup tag
364+
}
365+
break;
366+
} // default:
367+
} // switch (tag)
368+
} // while (!done)
398369
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
399-
parsedMessage = (com.google.cloud.shell.v1.AddPublicKeyMetadata) e.getUnfinishedMessage();
400370
throw e.unwrapIOException();
401371
} finally {
402-
if (parsedMessage != null) {
403-
mergeFrom(parsedMessage);
404-
}
405-
}
372+
onChanged();
373+
} // finally
406374
return this;
407375
}
408376

@@ -438,7 +406,18 @@ public AddPublicKeyMetadata parsePartialFrom(
438406
com.google.protobuf.CodedInputStream input,
439407
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
440408
throws com.google.protobuf.InvalidProtocolBufferException {
441-
return new AddPublicKeyMetadata(input, extensionRegistry);
409+
Builder builder = newBuilder();
410+
try {
411+
builder.mergeFrom(input, extensionRegistry);
412+
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
413+
throw e.setUnfinishedMessage(builder.buildPartial());
414+
} catch (com.google.protobuf.UninitializedMessageException e) {
415+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
416+
} catch (java.io.IOException e) {
417+
throw new com.google.protobuf.InvalidProtocolBufferException(e)
418+
.setUnfinishedMessage(builder.buildPartial());
419+
}
420+
return builder.buildPartial();
442421
}
443422
};
444423

proto-google-cloud-shell-v1/src/main/java/com/google/cloud/shell/v1/AddPublicKeyRequest.java

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

57-
private AddPublicKeyRequest(
58-
com.google.protobuf.CodedInputStream input,
59-
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
60-
throws com.google.protobuf.InvalidProtocolBufferException {
61-
this();
62-
if (extensionRegistry == null) {
63-
throw new java.lang.NullPointerException();
64-
}
65-
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
66-
com.google.protobuf.UnknownFieldSet.newBuilder();
67-
try {
68-
boolean done = false;
69-
while (!done) {
70-
int tag = input.readTag();
71-
switch (tag) {
72-
case 0:
73-
done = true;
74-
break;
75-
case 10:
76-
{
77-
java.lang.String s = input.readStringRequireUtf8();
78-
79-
environment_ = s;
80-
break;
81-
}
82-
case 18:
83-
{
84-
java.lang.String s = input.readStringRequireUtf8();
85-
86-
key_ = s;
87-
break;
88-
}
89-
default:
90-
{
91-
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
92-
done = true;
93-
}
94-
break;
95-
}
96-
}
97-
}
98-
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
99-
throw e.setUnfinishedMessage(this);
100-
} catch (com.google.protobuf.UninitializedMessageException e) {
101-
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
102-
} catch (java.io.IOException e) {
103-
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
104-
} finally {
105-
this.unknownFields = unknownFields.build();
106-
makeExtensionsImmutable();
107-
}
108-
}
109-
11057
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
11158
return com.google.cloud.shell.v1.CloudShellProto
11259
.internal_static_google_cloud_shell_v1_AddPublicKeyRequest_descriptor;
@@ -252,7 +199,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
252199
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
253200
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_);
254201
}
255-
unknownFields.writeTo(output);
202+
getUnknownFields().writeTo(output);
256203
}
257204

258205
@java.lang.Override
@@ -267,7 +214,7 @@ public int getSerializedSize() {
267214
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
268215
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_);
269216
}
270-
size += unknownFields.getSerializedSize();
217+
size += getUnknownFields().getSerializedSize();
271218
memoizedSize = size;
272219
return size;
273220
}
@@ -285,7 +232,7 @@ public boolean equals(final java.lang.Object obj) {
285232

286233
if (!getEnvironment().equals(other.getEnvironment())) return false;
287234
if (!getKey().equals(other.getKey())) return false;
288-
if (!unknownFields.equals(other.unknownFields)) return false;
235+
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
289236
return true;
290237
}
291238

@@ -300,7 +247,7 @@ public int hashCode() {
300247
hash = (53 * hash) + getEnvironment().hashCode();
301248
hash = (37 * hash) + KEY_FIELD_NUMBER;
302249
hash = (53 * hash) + getKey().hashCode();
303-
hash = (29 * hash) + unknownFields.hashCode();
250+
hash = (29 * hash) + getUnknownFields().hashCode();
304251
memoizedHashCode = hash;
305252
return hash;
306253
}
@@ -430,17 +377,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
430377
}
431378

432379
// Construct using com.google.cloud.shell.v1.AddPublicKeyRequest.newBuilder()
433-
private Builder() {
434-
maybeForceBuilderInitialization();
435-
}
380+
private Builder() {}
436381

437382
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
438383
super(parent);
439-
maybeForceBuilderInitialization();
440-
}
441-
442-
private void maybeForceBuilderInitialization() {
443-
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
444384
}
445385

446386
@java.lang.Override
@@ -536,7 +476,7 @@ public Builder mergeFrom(com.google.cloud.shell.v1.AddPublicKeyRequest other) {
536476
key_ = other.key_;
537477
onChanged();
538478
}
539-
this.mergeUnknownFields(other.unknownFields);
479+
this.mergeUnknownFields(other.getUnknownFields());
540480
onChanged();
541481
return this;
542482
}
@@ -551,17 +491,43 @@ public Builder mergeFrom(
551491
com.google.protobuf.CodedInputStream input,
552492
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
553493
throws java.io.IOException {
554-
com.google.cloud.shell.v1.AddPublicKeyRequest parsedMessage = null;
494+
if (extensionRegistry == null) {
495+
throw new java.lang.NullPointerException();
496+
}
555497
try {
556-
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
498+
boolean done = false;
499+
while (!done) {
500+
int tag = input.readTag();
501+
switch (tag) {
502+
case 0:
503+
done = true;
504+
break;
505+
case 10:
506+
{
507+
environment_ = input.readStringRequireUtf8();
508+
509+
break;
510+
} // case 10
511+
case 18:
512+
{
513+
key_ = input.readStringRequireUtf8();
514+
515+
break;
516+
} // case 18
517+
default:
518+
{
519+
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
520+
done = true; // was an endgroup tag
521+
}
522+
break;
523+
} // default:
524+
} // switch (tag)
525+
} // while (!done)
557526
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
558-
parsedMessage = (com.google.cloud.shell.v1.AddPublicKeyRequest) e.getUnfinishedMessage();
559527
throw e.unwrapIOException();
560528
} finally {
561-
if (parsedMessage != null) {
562-
mergeFrom(parsedMessage);
563-
}
564-
}
529+
onChanged();
530+
} // finally
565531
return this;
566532
}
567533

@@ -839,7 +805,18 @@ public AddPublicKeyRequest parsePartialFrom(
839805
com.google.protobuf.CodedInputStream input,
840806
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
841807
throws com.google.protobuf.InvalidProtocolBufferException {
842-
return new AddPublicKeyRequest(input, extensionRegistry);
808+
Builder builder = newBuilder();
809+
try {
810+
builder.mergeFrom(input, extensionRegistry);
811+
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
812+
throw e.setUnfinishedMessage(builder.buildPartial());
813+
} catch (com.google.protobuf.UninitializedMessageException e) {
814+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
815+
} catch (java.io.IOException e) {
816+
throw new com.google.protobuf.InvalidProtocolBufferException(e)
817+
.setUnfinishedMessage(builder.buildPartial());
818+
}
819+
return builder.buildPartial();
843820
}
844821
};
845822

0 commit comments

Comments
 (0)