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

Commit 9cc56a4

Browse files
chore(bazel): update protobuf to v3.21.7 (#1089)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 477955264 Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9
1 parent fbab623 commit 9cc56a4

File tree

74 files changed

+4975
-7522
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+4975
-7522
lines changed

proto-google-cloud-translate-v3/src/main/java/com/google/cloud/translate/v3/BatchDocumentInputConfig.java

Lines changed: 48 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -50,61 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5050
return this.unknownFields;
5151
}
5252

53-
private BatchDocumentInputConfig(
54-
com.google.protobuf.CodedInputStream input,
55-
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
56-
throws com.google.protobuf.InvalidProtocolBufferException {
57-
this();
58-
if (extensionRegistry == null) {
59-
throw new java.lang.NullPointerException();
60-
}
61-
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
62-
com.google.protobuf.UnknownFieldSet.newBuilder();
63-
try {
64-
boolean done = false;
65-
while (!done) {
66-
int tag = input.readTag();
67-
switch (tag) {
68-
case 0:
69-
done = true;
70-
break;
71-
case 10:
72-
{
73-
com.google.cloud.translate.v3.GcsSource.Builder subBuilder = null;
74-
if (sourceCase_ == 1) {
75-
subBuilder = ((com.google.cloud.translate.v3.GcsSource) source_).toBuilder();
76-
}
77-
source_ =
78-
input.readMessage(
79-
com.google.cloud.translate.v3.GcsSource.parser(), extensionRegistry);
80-
if (subBuilder != null) {
81-
subBuilder.mergeFrom((com.google.cloud.translate.v3.GcsSource) source_);
82-
source_ = subBuilder.buildPartial();
83-
}
84-
sourceCase_ = 1;
85-
break;
86-
}
87-
default:
88-
{
89-
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
90-
done = true;
91-
}
92-
break;
93-
}
94-
}
95-
}
96-
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
97-
throw e.setUnfinishedMessage(this);
98-
} catch (com.google.protobuf.UninitializedMessageException e) {
99-
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
100-
} catch (java.io.IOException e) {
101-
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
102-
} finally {
103-
this.unknownFields = unknownFields.build();
104-
makeExtensionsImmutable();
105-
}
106-
}
107-
10853
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
10954
return com.google.cloud.translate.v3.TranslationServiceProto
11055
.internal_static_google_cloud_translation_v3_BatchDocumentInputConfig_descriptor;
@@ -280,7 +225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
280225
if (sourceCase_ == 1) {
281226
output.writeMessage(1, (com.google.cloud.translate.v3.GcsSource) source_);
282227
}
283-
unknownFields.writeTo(output);
228+
getUnknownFields().writeTo(output);
284229
}
285230

286231
@java.lang.Override
@@ -294,7 +239,7 @@ public int getSerializedSize() {
294239
com.google.protobuf.CodedOutputStream.computeMessageSize(
295240
1, (com.google.cloud.translate.v3.GcsSource) source_);
296241
}
297-
size += unknownFields.getSerializedSize();
242+
size += getUnknownFields().getSerializedSize();
298243
memoizedSize = size;
299244
return size;
300245
}
@@ -318,7 +263,7 @@ public boolean equals(final java.lang.Object obj) {
318263
case 0:
319264
default:
320265
}
321-
if (!unknownFields.equals(other.unknownFields)) return false;
266+
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
322267
return true;
323268
}
324269

@@ -337,7 +282,7 @@ public int hashCode() {
337282
case 0:
338283
default:
339284
}
340-
hash = (29 * hash) + unknownFields.hashCode();
285+
hash = (29 * hash) + getUnknownFields().hashCode();
341286
memoizedHashCode = hash;
342287
return hash;
343288
}
@@ -467,22 +412,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
467412
}
468413

469414
// Construct using com.google.cloud.translate.v3.BatchDocumentInputConfig.newBuilder()
470-
private Builder() {
471-
maybeForceBuilderInitialization();
472-
}
415+
private Builder() {}
473416

474417
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
475418
super(parent);
476-
maybeForceBuilderInitialization();
477-
}
478-
479-
private void maybeForceBuilderInitialization() {
480-
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
481419
}
482420

483421
@java.lang.Override
484422
public Builder clear() {
485423
super.clear();
424+
if (gcsSourceBuilder_ != null) {
425+
gcsSourceBuilder_.clear();
426+
}
486427
sourceCase_ = 0;
487428
source_ = null;
488429
return this;
@@ -581,7 +522,7 @@ public Builder mergeFrom(com.google.cloud.translate.v3.BatchDocumentInputConfig
581522
break;
582523
}
583524
}
584-
this.mergeUnknownFields(other.unknownFields);
525+
this.mergeUnknownFields(other.getUnknownFields());
585526
onChanged();
586527
return this;
587528
}
@@ -596,18 +537,37 @@ public Builder mergeFrom(
596537
com.google.protobuf.CodedInputStream input,
597538
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
598539
throws java.io.IOException {
599-
com.google.cloud.translate.v3.BatchDocumentInputConfig parsedMessage = null;
540+
if (extensionRegistry == null) {
541+
throw new java.lang.NullPointerException();
542+
}
600543
try {
601-
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
544+
boolean done = false;
545+
while (!done) {
546+
int tag = input.readTag();
547+
switch (tag) {
548+
case 0:
549+
done = true;
550+
break;
551+
case 10:
552+
{
553+
input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry);
554+
sourceCase_ = 1;
555+
break;
556+
} // case 10
557+
default:
558+
{
559+
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
560+
done = true; // was an endgroup tag
561+
}
562+
break;
563+
} // default:
564+
} // switch (tag)
565+
} // while (!done)
602566
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
603-
parsedMessage =
604-
(com.google.cloud.translate.v3.BatchDocumentInputConfig) e.getUnfinishedMessage();
605567
throw e.unwrapIOException();
606568
} finally {
607-
if (parsedMessage != null) {
608-
mergeFrom(parsedMessage);
609-
}
610-
}
569+
onChanged();
570+
} // finally
611571
return this;
612572
}
613573

@@ -1010,7 +970,18 @@ public BatchDocumentInputConfig parsePartialFrom(
1010970
com.google.protobuf.CodedInputStream input,
1011971
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1012972
throws com.google.protobuf.InvalidProtocolBufferException {
1013-
return new BatchDocumentInputConfig(input, extensionRegistry);
973+
Builder builder = newBuilder();
974+
try {
975+
builder.mergeFrom(input, extensionRegistry);
976+
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
977+
throw e.setUnfinishedMessage(builder.buildPartial());
978+
} catch (com.google.protobuf.UninitializedMessageException e) {
979+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
980+
} catch (java.io.IOException e) {
981+
throw new com.google.protobuf.InvalidProtocolBufferException(e)
982+
.setUnfinishedMessage(builder.buildPartial());
983+
}
984+
return builder.buildPartial();
1014985
}
1015986
};
1016987

0 commit comments

Comments
 (0)