Skip to content

Commit 0cd6d6c

Browse files
chore(bazel): update protobuf to v3.21.7 (googleapis#721)
- [ ] 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 4c0d90a commit 0cd6d6c

22 files changed

+1339
-1970
lines changed

java-billing/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
1919
<dependency>
2020
<groupId>com.google.cloud</groupId>
2121
<artifactId>google-cloud-billing</artifactId>
22-
<version>2.3.3</version>
22+
<version>2.3.4</version>
2323
</dependency>
2424
```
2525

2626
If you are using Gradle without BOM, add this to your dependencies:
2727

2828
```Groovy
29-
implementation 'com.google.cloud:google-cloud-billing:2.3.3'
29+
implementation 'com.google.cloud:google-cloud-billing:2.3.4'
3030
```
3131

3232
If you are using SBT, add this to your dependencies:
3333

3434
```Scala
35-
libraryDependencies += "com.google.cloud" % "google-cloud-billing" % "2.3.3"
35+
libraryDependencies += "com.google.cloud" % "google-cloud-billing" % "2.3.4"
3636
```
3737

3838
## Authentication

java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/AggregationInfo.java

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

56-
private AggregationInfo(
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 8:
75-
{
76-
int rawValue = input.readEnum();
77-
78-
aggregationLevel_ = rawValue;
79-
break;
80-
}
81-
case 16:
82-
{
83-
int rawValue = input.readEnum();
84-
85-
aggregationInterval_ = rawValue;
86-
break;
87-
}
88-
case 24:
89-
{
90-
aggregationCount_ = input.readInt32();
91-
break;
92-
}
93-
default:
94-
{
95-
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
96-
done = true;
97-
}
98-
break;
99-
}
100-
}
101-
}
102-
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
103-
throw e.setUnfinishedMessage(this);
104-
} catch (com.google.protobuf.UninitializedMessageException e) {
105-
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
106-
} catch (java.io.IOException e) {
107-
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
108-
} finally {
109-
this.unknownFields = unknownFields.build();
110-
makeExtensionsImmutable();
111-
}
112-
}
113-
11456
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
11557
return com.google.cloud.billing.v1.CloudCatalogProto
11658
.internal_static_google_cloud_billing_v1_AggregationInfo_descriptor;
@@ -457,7 +399,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
457399
if (aggregationCount_ != 0) {
458400
output.writeInt32(3, aggregationCount_);
459401
}
460-
unknownFields.writeTo(output);
402+
getUnknownFields().writeTo(output);
461403
}
462404

463405
@java.lang.Override
@@ -481,7 +423,7 @@ public int getSerializedSize() {
481423
if (aggregationCount_ != 0) {
482424
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, aggregationCount_);
483425
}
484-
size += unknownFields.getSerializedSize();
426+
size += getUnknownFields().getSerializedSize();
485427
memoizedSize = size;
486428
return size;
487429
}
@@ -500,7 +442,7 @@ public boolean equals(final java.lang.Object obj) {
500442
if (aggregationLevel_ != other.aggregationLevel_) return false;
501443
if (aggregationInterval_ != other.aggregationInterval_) return false;
502444
if (getAggregationCount() != other.getAggregationCount()) return false;
503-
if (!unknownFields.equals(other.unknownFields)) return false;
445+
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
504446
return true;
505447
}
506448

@@ -517,7 +459,7 @@ public int hashCode() {
517459
hash = (53 * hash) + aggregationInterval_;
518460
hash = (37 * hash) + AGGREGATION_COUNT_FIELD_NUMBER;
519461
hash = (53 * hash) + getAggregationCount();
520-
hash = (29 * hash) + unknownFields.hashCode();
462+
hash = (29 * hash) + getUnknownFields().hashCode();
521463
memoizedHashCode = hash;
522464
return hash;
523465
}
@@ -646,17 +588,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
646588
}
647589

648590
// Construct using com.google.cloud.billing.v1.AggregationInfo.newBuilder()
649-
private Builder() {
650-
maybeForceBuilderInitialization();
651-
}
591+
private Builder() {}
652592

653593
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
654594
super(parent);
655-
maybeForceBuilderInitialization();
656-
}
657-
658-
private void maybeForceBuilderInitialization() {
659-
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
660595
}
661596

662597
@java.lang.Override
@@ -756,7 +691,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.AggregationInfo other) {
756691
if (other.getAggregationCount() != 0) {
757692
setAggregationCount(other.getAggregationCount());
758693
}
759-
this.mergeUnknownFields(other.unknownFields);
694+
this.mergeUnknownFields(other.getUnknownFields());
760695
onChanged();
761696
return this;
762697
}
@@ -771,17 +706,49 @@ public Builder mergeFrom(
771706
com.google.protobuf.CodedInputStream input,
772707
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
773708
throws java.io.IOException {
774-
com.google.cloud.billing.v1.AggregationInfo parsedMessage = null;
709+
if (extensionRegistry == null) {
710+
throw new java.lang.NullPointerException();
711+
}
775712
try {
776-
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
713+
boolean done = false;
714+
while (!done) {
715+
int tag = input.readTag();
716+
switch (tag) {
717+
case 0:
718+
done = true;
719+
break;
720+
case 8:
721+
{
722+
aggregationLevel_ = input.readEnum();
723+
724+
break;
725+
} // case 8
726+
case 16:
727+
{
728+
aggregationInterval_ = input.readEnum();
729+
730+
break;
731+
} // case 16
732+
case 24:
733+
{
734+
aggregationCount_ = input.readInt32();
735+
736+
break;
737+
} // case 24
738+
default:
739+
{
740+
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
741+
done = true; // was an endgroup tag
742+
}
743+
break;
744+
} // default:
745+
} // switch (tag)
746+
} // while (!done)
777747
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
778-
parsedMessage = (com.google.cloud.billing.v1.AggregationInfo) e.getUnfinishedMessage();
779748
throw e.unwrapIOException();
780749
} finally {
781-
if (parsedMessage != null) {
782-
mergeFrom(parsedMessage);
783-
}
784-
}
750+
onChanged();
751+
} // finally
785752
return this;
786753
}
787754

@@ -1010,7 +977,18 @@ public AggregationInfo parsePartialFrom(
1010977
com.google.protobuf.CodedInputStream input,
1011978
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1012979
throws com.google.protobuf.InvalidProtocolBufferException {
1013-
return new AggregationInfo(input, extensionRegistry);
980+
Builder builder = newBuilder();
981+
try {
982+
builder.mergeFrom(input, extensionRegistry);
983+
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
984+
throw e.setUnfinishedMessage(builder.buildPartial());
985+
} catch (com.google.protobuf.UninitializedMessageException e) {
986+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
987+
} catch (java.io.IOException e) {
988+
throw new com.google.protobuf.InvalidProtocolBufferException(e)
989+
.setUnfinishedMessage(builder.buildPartial());
990+
}
991+
return builder.buildPartial();
1014992
}
1015993
};
1016994

0 commit comments

Comments
 (0)