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

Commit 366487b

Browse files
chore(bazel): update protobuf to v3.21.7 (#907)
- [ ] 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 5baf8a8 commit 366487b

File tree

149 files changed

+17746
-27020
lines changed

Some content is hidden

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

149 files changed

+17746
-27020
lines changed

proto-google-cloud-document-ai-v1/src/main/java/com/google/cloud/documentai/v1/Barcode.java

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

57-
private Barcode(
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-
format_ = s;
80-
break;
81-
}
82-
case 18:
83-
{
84-
java.lang.String s = input.readStringRequireUtf8();
85-
86-
valueFormat_ = s;
87-
break;
88-
}
89-
case 26:
90-
{
91-
java.lang.String s = input.readStringRequireUtf8();
92-
93-
rawValue_ = s;
94-
break;
95-
}
96-
default:
97-
{
98-
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
99-
done = true;
100-
}
101-
break;
102-
}
103-
}
104-
}
105-
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
106-
throw e.setUnfinishedMessage(this);
107-
} catch (com.google.protobuf.UninitializedMessageException e) {
108-
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
109-
} catch (java.io.IOException e) {
110-
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
111-
} finally {
112-
this.unknownFields = unknownFields.build();
113-
makeExtensionsImmutable();
114-
}
115-
}
116-
11757
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
11858
return com.google.cloud.documentai.v1.BarcodeProto
11959
.internal_static_google_cloud_documentai_v1_Barcode_descriptor;
@@ -359,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
359299
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawValue_)) {
360300
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, rawValue_);
361301
}
362-
unknownFields.writeTo(output);
302+
getUnknownFields().writeTo(output);
363303
}
364304

365305
@java.lang.Override
@@ -377,7 +317,7 @@ public int getSerializedSize() {
377317
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(rawValue_)) {
378318
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, rawValue_);
379319
}
380-
size += unknownFields.getSerializedSize();
320+
size += getUnknownFields().getSerializedSize();
381321
memoizedSize = size;
382322
return size;
383323
}
@@ -395,7 +335,7 @@ public boolean equals(final java.lang.Object obj) {
395335
if (!getFormat().equals(other.getFormat())) return false;
396336
if (!getValueFormat().equals(other.getValueFormat())) return false;
397337
if (!getRawValue().equals(other.getRawValue())) return false;
398-
if (!unknownFields.equals(other.unknownFields)) return false;
338+
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
399339
return true;
400340
}
401341

@@ -412,7 +352,7 @@ public int hashCode() {
412352
hash = (53 * hash) + getValueFormat().hashCode();
413353
hash = (37 * hash) + RAW_VALUE_FIELD_NUMBER;
414354
hash = (53 * hash) + getRawValue().hashCode();
415-
hash = (29 * hash) + unknownFields.hashCode();
355+
hash = (29 * hash) + getUnknownFields().hashCode();
416356
memoizedHashCode = hash;
417357
return hash;
418358
}
@@ -541,17 +481,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
541481
}
542482

543483
// Construct using com.google.cloud.documentai.v1.Barcode.newBuilder()
544-
private Builder() {
545-
maybeForceBuilderInitialization();
546-
}
484+
private Builder() {}
547485

548486
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
549487
super(parent);
550-
maybeForceBuilderInitialization();
551-
}
552-
553-
private void maybeForceBuilderInitialization() {
554-
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
555488
}
556489

557490
@java.lang.Override
@@ -654,7 +587,7 @@ public Builder mergeFrom(com.google.cloud.documentai.v1.Barcode other) {
654587
rawValue_ = other.rawValue_;
655588
onChanged();
656589
}
657-
this.mergeUnknownFields(other.unknownFields);
590+
this.mergeUnknownFields(other.getUnknownFields());
658591
onChanged();
659592
return this;
660593
}
@@ -669,17 +602,49 @@ public Builder mergeFrom(
669602
com.google.protobuf.CodedInputStream input,
670603
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
671604
throws java.io.IOException {
672-
com.google.cloud.documentai.v1.Barcode parsedMessage = null;
605+
if (extensionRegistry == null) {
606+
throw new java.lang.NullPointerException();
607+
}
673608
try {
674-
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
609+
boolean done = false;
610+
while (!done) {
611+
int tag = input.readTag();
612+
switch (tag) {
613+
case 0:
614+
done = true;
615+
break;
616+
case 10:
617+
{
618+
format_ = input.readStringRequireUtf8();
619+
620+
break;
621+
} // case 10
622+
case 18:
623+
{
624+
valueFormat_ = input.readStringRequireUtf8();
625+
626+
break;
627+
} // case 18
628+
case 26:
629+
{
630+
rawValue_ = input.readStringRequireUtf8();
631+
632+
break;
633+
} // case 26
634+
default:
635+
{
636+
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
637+
done = true; // was an endgroup tag
638+
}
639+
break;
640+
} // default:
641+
} // switch (tag)
642+
} // while (!done)
675643
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
676-
parsedMessage = (com.google.cloud.documentai.v1.Barcode) e.getUnfinishedMessage();
677644
throw e.unwrapIOException();
678645
} finally {
679-
if (parsedMessage != null) {
680-
mergeFrom(parsedMessage);
681-
}
682-
}
646+
onChanged();
647+
} // finally
683648
return this;
684649
}
685650

@@ -1183,7 +1148,18 @@ public Barcode parsePartialFrom(
11831148
com.google.protobuf.CodedInputStream input,
11841149
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
11851150
throws com.google.protobuf.InvalidProtocolBufferException {
1186-
return new Barcode(input, extensionRegistry);
1151+
Builder builder = newBuilder();
1152+
try {
1153+
builder.mergeFrom(input, extensionRegistry);
1154+
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
1155+
throw e.setUnfinishedMessage(builder.buildPartial());
1156+
} catch (com.google.protobuf.UninitializedMessageException e) {
1157+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1158+
} catch (java.io.IOException e) {
1159+
throw new com.google.protobuf.InvalidProtocolBufferException(e)
1160+
.setUnfinishedMessage(builder.buildPartial());
1161+
}
1162+
return builder.buildPartial();
11871163
}
11881164
};
11891165

0 commit comments

Comments
 (0)