diff --git a/java-billing/README.md b/java-billing/README.md
index 2d62e8d62103..43db0dd905fe 100644
--- a/java-billing/README.md
+++ b/java-billing/README.md
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
com.google.cloud
google-cloud-billing
- 2.3.3
+ 2.3.4
```
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-billing:2.3.3'
+implementation 'com.google.cloud:google-cloud-billing:2.3.4'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-billing" % "2.3.3"
+libraryDependencies += "com.google.cloud" % "google-cloud-billing" % "2.3.4"
```
## Authentication
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/AggregationInfo.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/AggregationInfo.java
index 62063a256b74..1e2fd5308425 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/AggregationInfo.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/AggregationInfo.java
@@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private AggregationInfo(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8:
- {
- int rawValue = input.readEnum();
-
- aggregationLevel_ = rawValue;
- break;
- }
- case 16:
- {
- int rawValue = input.readEnum();
-
- aggregationInterval_ = rawValue;
- break;
- }
- case 24:
- {
- aggregationCount_ = input.readInt32();
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_AggregationInfo_descriptor;
@@ -457,7 +399,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (aggregationCount_ != 0) {
output.writeInt32(3, aggregationCount_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -481,7 +423,7 @@ public int getSerializedSize() {
if (aggregationCount_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, aggregationCount_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -500,7 +442,7 @@ public boolean equals(final java.lang.Object obj) {
if (aggregationLevel_ != other.aggregationLevel_) return false;
if (aggregationInterval_ != other.aggregationInterval_) return false;
if (getAggregationCount() != other.getAggregationCount()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -517,7 +459,7 @@ public int hashCode() {
hash = (53 * hash) + aggregationInterval_;
hash = (37 * hash) + AGGREGATION_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getAggregationCount();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -646,17 +588,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.AggregationInfo.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -756,7 +691,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.AggregationInfo other) {
if (other.getAggregationCount() != 0) {
setAggregationCount(other.getAggregationCount());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -771,17 +706,49 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.AggregationInfo parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8:
+ {
+ aggregationLevel_ = input.readEnum();
+
+ break;
+ } // case 8
+ case 16:
+ {
+ aggregationInterval_ = input.readEnum();
+
+ break;
+ } // case 16
+ case 24:
+ {
+ aggregationCount_ = input.readInt32();
+
+ break;
+ } // case 24
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.AggregationInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1010,7 +977,18 @@ public AggregationInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new AggregationInfo(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccount.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccount.java
index ee1c13f9c5d4..98d3e5b891a1 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccount.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/BillingAccount.java
@@ -55,71 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private BillingAccount(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 16:
- {
- open_ = input.readBool();
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- displayName_ = s;
- break;
- }
- case 34:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- masterBillingAccount_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_BillingAccount_descriptor;
@@ -344,7 +279,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(masterBillingAccount_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, masterBillingAccount_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -365,7 +300,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(masterBillingAccount_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, masterBillingAccount_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -385,7 +320,7 @@ public boolean equals(final java.lang.Object obj) {
if (getOpen() != other.getOpen()) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getMasterBillingAccount().equals(other.getMasterBillingAccount())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -404,7 +339,7 @@ public int hashCode() {
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + MASTER_BILLING_ACCOUNT_FIELD_NUMBER;
hash = (53 * hash) + getMasterBillingAccount().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -534,17 +469,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.BillingAccount.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -653,7 +581,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.BillingAccount other) {
masterBillingAccount_ = other.masterBillingAccount_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -668,17 +596,55 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.BillingAccount parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 16:
+ {
+ open_ = input.readBool();
+
+ break;
+ } // case 16
+ case 26:
+ {
+ displayName_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ case 34:
+ {
+ masterBillingAccount_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 34
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.BillingAccount) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1130,7 +1096,18 @@ public BillingAccount parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new BillingAccount(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Category.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Category.java
index 025c36b55cba..990aec419e3f 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Category.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Category.java
@@ -55,73 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private Category(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- serviceDisplayName_ = s;
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- resourceFamily_ = s;
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- resourceGroup_ = s;
- break;
- }
- case 34:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- usageType_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_Category_descriptor;
@@ -365,7 +298,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(usageType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, usageType_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -386,7 +319,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(usageType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, usageType_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -405,7 +338,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getResourceFamily().equals(other.getResourceFamily())) return false;
if (!getResourceGroup().equals(other.getResourceGroup())) return false;
if (!getUsageType().equals(other.getUsageType())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -424,7 +357,7 @@ public int hashCode() {
hash = (53 * hash) + getResourceGroup().hashCode();
hash = (37 * hash) + USAGE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getUsageType().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -552,17 +485,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.Category.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -671,7 +597,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.Category other) {
usageType_ = other.usageType_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -686,17 +612,55 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.Category parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ serviceDisplayName_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ resourceFamily_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ case 26:
+ {
+ resourceGroup_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ case 34:
+ {
+ usageType_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 34
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.Category) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1171,7 +1135,18 @@ public Category parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Category(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequest.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequest.java
index 29686a14be37..c56f22dc61d5 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequest.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/CreateBillingAccountRequest.java
@@ -50,61 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private CreateBillingAccountRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- com.google.cloud.billing.v1.BillingAccount.Builder subBuilder = null;
- if (billingAccount_ != null) {
- subBuilder = billingAccount_.toBuilder();
- }
- billingAccount_ =
- input.readMessage(
- com.google.cloud.billing.v1.BillingAccount.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(billingAccount_);
- billingAccount_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_CreateBillingAccountRequest_descriptor;
@@ -200,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (billingAccount_ != null) {
output.writeMessage(1, getBillingAccount());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -212,7 +157,7 @@ public int getSerializedSize() {
if (billingAccount_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBillingAccount());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -232,7 +177,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasBillingAccount()) {
if (!getBillingAccount().equals(other.getBillingAccount())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -247,7 +192,7 @@ public int hashCode() {
hash = (37 * hash) + BILLING_ACCOUNT_FIELD_NUMBER;
hash = (53 * hash) + getBillingAccount().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -377,17 +322,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.CreateBillingAccountRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -484,7 +422,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.CreateBillingAccountRequest
if (other.hasBillingAccount()) {
mergeBillingAccount(other.getBillingAccount());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -499,18 +437,37 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.CreateBillingAccountRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ input.readMessage(getBillingAccountFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 10
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.billing.v1.CreateBillingAccountRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -777,7 +734,18 @@ public CreateBillingAccountRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new CreateBillingAccountRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetBillingAccountRequest.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetBillingAccountRequest.java
index 618b11cd2eec..1072f771e723 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetBillingAccountRequest.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetBillingAccountRequest.java
@@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private GetBillingAccountRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_GetBillingAccountRequest_descriptor;
@@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -197,7 +151,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.billing.v1.GetBillingAccountRequest) obj;
if (!getName().equals(other.getName())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -227,7 +181,7 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.GetBillingAccountRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.GetBillingAccountRequest ot
name_ = other.name_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -471,18 +418,37 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.GetBillingAccountRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.billing.v1.GetBillingAccountRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -639,7 +605,18 @@ public GetBillingAccountRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetBillingAccountRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetProjectBillingInfoRequest.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetProjectBillingInfoRequest.java
index 8a989feca781..86887651feeb 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetProjectBillingInfoRequest.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/GetProjectBillingInfoRequest.java
@@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private GetProjectBillingInfoRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_GetProjectBillingInfoRequest_descriptor;
@@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -193,7 +147,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.billing.v1.GetProjectBillingInfoRequest) obj;
if (!getName().equals(other.getName())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -223,7 +177,7 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -353,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.GetProjectBillingInfoRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -453,7 +400,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.GetProjectBillingInfoReques
name_ = other.name_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -468,18 +415,37 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.GetProjectBillingInfoRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.billing.v1.GetProjectBillingInfoRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -626,7 +592,18 @@ public GetProjectBillingInfoRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetProjectBillingInfoRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListBillingAccountsRequest.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListBillingAccountsRequest.java
index 94e813ff426b..f5b92aab271b 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListBillingAccountsRequest.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListBillingAccountsRequest.java
@@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListBillingAccountsRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8:
- {
- pageSize_ = input.readInt32();
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- pageToken_ = s;
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- filter_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_ListBillingAccountsRequest_descriptor;
@@ -280,7 +222,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filter_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -298,7 +240,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filter_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -317,7 +259,7 @@ public boolean equals(final java.lang.Object obj) {
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
if (!getFilter().equals(other.getFilter())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -334,7 +276,7 @@ public int hashCode() {
hash = (53 * hash) + getPageToken().hashCode();
hash = (37 * hash) + FILTER_FIELD_NUMBER;
hash = (53 * hash) + getFilter().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -464,17 +406,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.ListBillingAccountsRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -577,7 +512,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.ListBillingAccountsRequest
filter_ = other.filter_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -592,18 +527,49 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.ListBillingAccountsRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8:
+ {
+ pageSize_ = input.readInt32();
+
+ break;
+ } // case 8
+ case 18:
+ {
+ pageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ case 26:
+ {
+ filter_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.billing.v1.ListBillingAccountsRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -941,7 +907,18 @@ public ListBillingAccountsRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListBillingAccountsRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListBillingAccountsResponse.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListBillingAccountsResponse.java
index 626e84d7aa2b..6fe85c1e0cca 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListBillingAccountsResponse.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListBillingAccountsResponse.java
@@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListBillingAccountsResponse(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- billingAccounts_ =
- new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- billingAccounts_.add(
- input.readMessage(
- com.google.cloud.billing.v1.BillingAccount.parser(), extensionRegistry));
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- nextPageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- billingAccounts_ = java.util.Collections.unmodifiableList(billingAccounts_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_ListBillingAccountsResponse_descriptor;
@@ -273,7 +211,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -288,7 +226,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -306,7 +244,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getBillingAccountsList().equals(other.getBillingAccountsList())) return false;
if (!getNextPageToken().equals(other.getNextPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -323,7 +261,7 @@ public int hashCode() {
}
hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getNextPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -453,19 +391,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.ListBillingAccountsResponse.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getBillingAccountsFieldBuilder();
- }
}
@java.lang.Override
@@ -473,10 +402,11 @@ public Builder clear() {
super.clear();
if (billingAccountsBuilder_ == null) {
billingAccounts_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ billingAccounts_ = null;
billingAccountsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
nextPageToken_ = "";
return this;
@@ -598,7 +528,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.ListBillingAccountsResponse
nextPageToken_ = other.nextPageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -613,18 +543,50 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.ListBillingAccountsResponse parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ com.google.cloud.billing.v1.BillingAccount m =
+ input.readMessage(
+ com.google.cloud.billing.v1.BillingAccount.parser(), extensionRegistry);
+ if (billingAccountsBuilder_ == null) {
+ ensureBillingAccountsIsMutable();
+ billingAccounts_.add(m);
+ } else {
+ billingAccountsBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 18:
+ {
+ nextPageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.billing.v1.ListBillingAccountsResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1133,7 +1095,18 @@ public ListBillingAccountsResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListBillingAccountsResponse(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListProjectBillingInfoRequest.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListProjectBillingInfoRequest.java
index 9844529330d9..e2bda302a819 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListProjectBillingInfoRequest.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListProjectBillingInfoRequest.java
@@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListProjectBillingInfoRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 16:
- {
- pageSize_ = input.readInt32();
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- pageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_ListProjectBillingInfoRequest_descriptor;
@@ -276,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -294,7 +236,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -313,7 +255,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getName().equals(other.getName())) return false;
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -330,7 +272,7 @@ public int hashCode() {
hash = (53 * hash) + getPageSize();
hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -460,17 +402,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.ListProjectBillingInfoRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -573,7 +508,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.ListProjectBillingInfoReque
pageToken_ = other.pageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -588,18 +523,49 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.ListProjectBillingInfoRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 16:
+ {
+ pageSize_ = input.readInt32();
+
+ break;
+ } // case 16
+ case 26:
+ {
+ pageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.billing.v1.ListProjectBillingInfoRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -927,7 +893,18 @@ public ListProjectBillingInfoRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListProjectBillingInfoRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListProjectBillingInfoResponse.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListProjectBillingInfoResponse.java
index fa51e9b18d50..bebc9dd64b11 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListProjectBillingInfoResponse.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListProjectBillingInfoResponse.java
@@ -54,68 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListProjectBillingInfoResponse(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- projectBillingInfo_ =
- new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- projectBillingInfo_.add(
- input.readMessage(
- com.google.cloud.billing.v1.ProjectBillingInfo.parser(), extensionRegistry));
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- nextPageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- projectBillingInfo_ = java.util.Collections.unmodifiableList(projectBillingInfo_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_ListProjectBillingInfoResponse_descriptor;
@@ -280,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -296,7 +234,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -314,7 +252,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getProjectBillingInfoList().equals(other.getProjectBillingInfoList())) return false;
if (!getNextPageToken().equals(other.getNextPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -331,7 +269,7 @@ public int hashCode() {
}
hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getNextPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -461,19 +399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.ListProjectBillingInfoResponse.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getProjectBillingInfoFieldBuilder();
- }
}
@java.lang.Override
@@ -481,10 +410,11 @@ public Builder clear() {
super.clear();
if (projectBillingInfoBuilder_ == null) {
projectBillingInfo_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ projectBillingInfo_ = null;
projectBillingInfoBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
nextPageToken_ = "";
return this;
@@ -606,7 +536,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.ListProjectBillingInfoRespo
nextPageToken_ = other.nextPageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -621,18 +551,50 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.ListProjectBillingInfoResponse parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ com.google.cloud.billing.v1.ProjectBillingInfo m =
+ input.readMessage(
+ com.google.cloud.billing.v1.ProjectBillingInfo.parser(), extensionRegistry);
+ if (projectBillingInfoBuilder_ == null) {
+ ensureProjectBillingInfoIsMutable();
+ projectBillingInfo_.add(m);
+ } else {
+ projectBillingInfoBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 18:
+ {
+ nextPageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.billing.v1.ListProjectBillingInfoResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1165,7 +1127,18 @@ public ListProjectBillingInfoResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListProjectBillingInfoResponse(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListServicesRequest.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListServicesRequest.java
index 5fcef038fc61..df2c4a1c900e 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListServicesRequest.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListServicesRequest.java
@@ -52,57 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListServicesRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8:
- {
- pageSize_ = input.readInt32();
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- pageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_ListServicesRequest_descriptor;
@@ -209,7 +158,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -224,7 +173,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -242,7 +191,7 @@ public boolean equals(final java.lang.Object obj) {
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -257,7 +206,7 @@ public int hashCode() {
hash = (53 * hash) + getPageSize();
hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -386,17 +335,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.ListServicesRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -492,7 +434,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.ListServicesRequest other)
pageToken_ = other.pageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -507,17 +449,43 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.ListServicesRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8:
+ {
+ pageSize_ = input.readInt32();
+
+ break;
+ } // case 8
+ case 18:
+ {
+ pageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.ListServicesRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -721,7 +689,18 @@ public ListServicesRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListServicesRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListServicesResponse.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListServicesResponse.java
index 00f6aa4563c3..5db566e1f213 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListServicesResponse.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListServicesResponse.java
@@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListServicesResponse(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- services_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- services_.add(
- input.readMessage(
- com.google.cloud.billing.v1.Service.parser(), extensionRegistry));
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- nextPageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- services_ = java.util.Collections.unmodifiableList(services_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_ListServicesResponse_descriptor;
@@ -271,7 +210,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -286,7 +225,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -304,7 +243,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getServicesList().equals(other.getServicesList())) return false;
if (!getNextPageToken().equals(other.getNextPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -321,7 +260,7 @@ public int hashCode() {
}
hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getNextPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -450,19 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.ListServicesResponse.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getServicesFieldBuilder();
- }
}
@java.lang.Override
@@ -470,10 +400,11 @@ public Builder clear() {
super.clear();
if (servicesBuilder_ == null) {
services_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ services_ = null;
servicesBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
nextPageToken_ = "";
return this;
@@ -595,7 +526,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.ListServicesResponse other)
nextPageToken_ = other.nextPageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -610,17 +541,50 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.ListServicesResponse parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ com.google.cloud.billing.v1.Service m =
+ input.readMessage(
+ com.google.cloud.billing.v1.Service.parser(), extensionRegistry);
+ if (servicesBuilder_ == null) {
+ ensureServicesIsMutable();
+ services_.add(m);
+ } else {
+ servicesBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 18:
+ {
+ nextPageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.ListServicesResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1122,7 +1086,18 @@ public ListServicesResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListServicesResponse(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListSkusRequest.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListSkusRequest.java
index a74bdaf96665..05c001f41197 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListSkusRequest.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListSkusRequest.java
@@ -54,101 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListSkusRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- parent_ = s;
- break;
- }
- case 18:
- {
- com.google.protobuf.Timestamp.Builder subBuilder = null;
- if (startTime_ != null) {
- subBuilder = startTime_.toBuilder();
- }
- startTime_ =
- input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(startTime_);
- startTime_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 26:
- {
- com.google.protobuf.Timestamp.Builder subBuilder = null;
- if (endTime_ != null) {
- subBuilder = endTime_.toBuilder();
- }
- endTime_ =
- input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(endTime_);
- endTime_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 34:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- currencyCode_ = s;
- break;
- }
- case 40:
- {
- pageSize_ = input.readInt32();
- break;
- }
- case 50:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- pageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_ListSkusRequest_descriptor;
@@ -497,7 +402,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -524,7 +429,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -552,7 +457,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getCurrencyCode().equals(other.getCurrencyCode())) return false;
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -579,7 +484,7 @@ public int hashCode() {
hash = (53 * hash) + getPageSize();
hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -708,17 +613,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.ListSkusRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -855,7 +753,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.ListSkusRequest other) {
pageToken_ = other.pageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -870,17 +768,67 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.ListSkusRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ parent_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 18
+ case 26:
+ {
+ input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 26
+ case 34:
+ {
+ currencyCode_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 34
+ case 40:
+ {
+ pageSize_ = input.readInt32();
+
+ break;
+ } // case 40
+ case 50:
+ {
+ pageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 50
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.ListSkusRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1769,7 +1717,18 @@ public ListSkusRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListSkusRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListSkusResponse.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListSkusResponse.java
index cb3cda446669..5ac8e7f644a5 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListSkusResponse.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ListSkusResponse.java
@@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListSkusResponse(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- skus_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- skus_.add(
- input.readMessage(com.google.cloud.billing.v1.Sku.parser(), extensionRegistry));
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- nextPageToken_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- skus_ = java.util.Collections.unmodifiableList(skus_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_ListSkusResponse_descriptor;
@@ -269,7 +209,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -284,7 +224,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -302,7 +242,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getSkusList().equals(other.getSkusList())) return false;
if (!getNextPageToken().equals(other.getNextPageToken())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -319,7 +259,7 @@ public int hashCode() {
}
hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getNextPageToken().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -448,19 +388,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.ListSkusResponse.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getSkusFieldBuilder();
- }
}
@java.lang.Override
@@ -468,10 +399,11 @@ public Builder clear() {
super.clear();
if (skusBuilder_ == null) {
skus_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ skus_ = null;
skusBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
nextPageToken_ = "";
return this;
@@ -592,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.ListSkusResponse other) {
nextPageToken_ = other.nextPageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -607,17 +539,49 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.ListSkusResponse parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ com.google.cloud.billing.v1.Sku m =
+ input.readMessage(com.google.cloud.billing.v1.Sku.parser(), extensionRegistry);
+ if (skusBuilder_ == null) {
+ ensureSkusIsMutable();
+ skus_.add(m);
+ } else {
+ skusBuilder_.addMessage(m);
+ }
+ break;
+ } // case 10
+ case 18:
+ {
+ nextPageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.ListSkusResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1116,7 +1080,18 @@ public ListSkusResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListSkusResponse(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpression.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpression.java
index 4943bb00de4a..adc4e7c4febc 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpression.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingExpression.java
@@ -63,101 +63,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private PricingExpression(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- usageUnit_ = s;
- break;
- }
- case 17:
- {
- displayQuantity_ = input.readDouble();
- break;
- }
- case 26:
- {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- tieredRates_ =
- new java.util.ArrayList<
- com.google.cloud.billing.v1.PricingExpression.TierRate>();
- mutable_bitField0_ |= 0x00000001;
- }
- tieredRates_.add(
- input.readMessage(
- com.google.cloud.billing.v1.PricingExpression.TierRate.parser(),
- extensionRegistry));
- break;
- }
- case 34:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- usageUnitDescription_ = s;
- break;
- }
- case 42:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- baseUnit_ = s;
- break;
- }
- case 50:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- baseUnitDescription_ = s;
- break;
- }
- case 57:
- {
- baseUnitConversionFactor_ = input.readDouble();
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- tieredRates_ = java.util.Collections.unmodifiableList(tieredRates_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_PricingExpression_descriptor;
@@ -263,64 +168,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private TierRate(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 9:
- {
- startUsageAmount_ = input.readDouble();
- break;
- }
- case 18:
- {
- com.google.type.Money.Builder subBuilder = null;
- if (unitPrice_ != null) {
- subBuilder = unitPrice_.toBuilder();
- }
- unitPrice_ = input.readMessage(com.google.type.Money.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(unitPrice_);
- unitPrice_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_PricingExpression_TierRate_descriptor;
@@ -425,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (unitPrice_ != null) {
output.writeMessage(2, getUnitPrice());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -440,7 +287,7 @@ public int getSerializedSize() {
if (unitPrice_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUnitPrice());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -462,7 +309,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasUnitPrice()) {
if (!getUnitPrice().equals(other.getUnitPrice())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -482,7 +329,7 @@ public int hashCode() {
hash = (37 * hash) + UNIT_PRICE_FIELD_NUMBER;
hash = (53 * hash) + getUnitPrice().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -614,17 +461,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.PricingExpression.TierRate.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -729,7 +569,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.PricingExpression.TierRate
if (other.hasUnitPrice()) {
mergeUnitPrice(other.getUnitPrice());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -744,18 +584,43 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.PricingExpression.TierRate parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 9:
+ {
+ startUsageAmount_ = input.readDouble();
+
+ break;
+ } // case 9
+ case 18:
+ {
+ input.readMessage(getUnitPriceFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.billing.v1.PricingExpression.TierRate) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1034,7 +899,19 @@ public TierRate parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new TierRate(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException()
+ .setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
@@ -1420,7 +1297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (java.lang.Double.doubleToRawLongBits(baseUnitConversionFactor_) != 0) {
output.writeDouble(7, baseUnitConversionFactor_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -1450,7 +1327,7 @@ public int getSerializedSize() {
if (java.lang.Double.doubleToRawLongBits(baseUnitConversionFactor_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(7, baseUnitConversionFactor_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1475,7 +1352,7 @@ public boolean equals(final java.lang.Object obj) {
if (java.lang.Double.doubleToLongBits(getDisplayQuantity())
!= java.lang.Double.doubleToLongBits(other.getDisplayQuantity())) return false;
if (!getTieredRatesList().equals(other.getTieredRatesList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1508,7 +1385,7 @@ public int hashCode() {
hash = (37 * hash) + TIERED_RATES_FIELD_NUMBER;
hash = (53 * hash) + getTieredRatesList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1644,19 +1521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.PricingExpression.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getTieredRatesFieldBuilder();
- }
}
@java.lang.Override
@@ -1676,10 +1544,11 @@ public Builder clear() {
if (tieredRatesBuilder_ == null) {
tieredRates_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ tieredRates_ = null;
tieredRatesBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@@ -1821,7 +1690,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.PricingExpression other) {
}
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1836,17 +1705,81 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.PricingExpression parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ usageUnit_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 17:
+ {
+ displayQuantity_ = input.readDouble();
+
+ break;
+ } // case 17
+ case 26:
+ {
+ com.google.cloud.billing.v1.PricingExpression.TierRate m =
+ input.readMessage(
+ com.google.cloud.billing.v1.PricingExpression.TierRate.parser(),
+ extensionRegistry);
+ if (tieredRatesBuilder_ == null) {
+ ensureTieredRatesIsMutable();
+ tieredRates_.add(m);
+ } else {
+ tieredRatesBuilder_.addMessage(m);
+ }
+ break;
+ } // case 26
+ case 34:
+ {
+ usageUnitDescription_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 34
+ case 42:
+ {
+ baseUnit_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 42
+ case 50:
+ {
+ baseUnitDescription_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 50
+ case 57:
+ {
+ baseUnitConversionFactor_ = input.readDouble();
+
+ break;
+ } // case 57
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.PricingExpression) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -2861,7 +2794,18 @@ public PricingExpression parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new PricingExpression(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingInfo.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingInfo.java
index 434e4d3bd55d..d002c19303a2 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingInfo.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/PricingInfo.java
@@ -52,104 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private PricingInfo(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- com.google.protobuf.Timestamp.Builder subBuilder = null;
- if (effectiveTime_ != null) {
- subBuilder = effectiveTime_.toBuilder();
- }
- effectiveTime_ =
- input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(effectiveTime_);
- effectiveTime_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- summary_ = s;
- break;
- }
- case 26:
- {
- com.google.cloud.billing.v1.PricingExpression.Builder subBuilder = null;
- if (pricingExpression_ != null) {
- subBuilder = pricingExpression_.toBuilder();
- }
- pricingExpression_ =
- input.readMessage(
- com.google.cloud.billing.v1.PricingExpression.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(pricingExpression_);
- pricingExpression_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 34:
- {
- com.google.cloud.billing.v1.AggregationInfo.Builder subBuilder = null;
- if (aggregationInfo_ != null) {
- subBuilder = aggregationInfo_.toBuilder();
- }
- aggregationInfo_ =
- input.readMessage(
- com.google.cloud.billing.v1.AggregationInfo.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(aggregationInfo_);
- aggregationInfo_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 41:
- {
- currencyConversionRate_ = input.readDouble();
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_PricingInfo_descriptor;
@@ -429,7 +331,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (java.lang.Double.doubleToRawLongBits(currencyConversionRate_) != 0) {
output.writeDouble(5, currencyConversionRate_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -453,7 +355,7 @@ public int getSerializedSize() {
if (java.lang.Double.doubleToRawLongBits(currencyConversionRate_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, currencyConversionRate_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -483,7 +385,7 @@ public boolean equals(final java.lang.Object obj) {
}
if (java.lang.Double.doubleToLongBits(getCurrencyConversionRate())
!= java.lang.Double.doubleToLongBits(other.getCurrencyConversionRate())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -513,7 +415,7 @@ public int hashCode() {
(53 * hash)
+ com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getCurrencyConversionRate()));
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -642,17 +544,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.PricingInfo.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -789,7 +684,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.PricingInfo other) {
if (other.getCurrencyConversionRate() != 0D) {
setCurrencyConversionRate(other.getCurrencyConversionRate());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -804,17 +699,62 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.PricingInfo parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ input.readMessage(getEffectiveTimeFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 10
+ case 18:
+ {
+ summary_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ case 26:
+ {
+ input.readMessage(
+ getPricingExpressionFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 26
+ case 34:
+ {
+ input.readMessage(getAggregationInfoFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 34
+ case 41:
+ {
+ currencyConversionRate_ = input.readDouble();
+
+ break;
+ } // case 41
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.PricingInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1636,7 +1576,18 @@ public PricingInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new PricingInfo(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java
index 2098162bddc6..6142aab76843 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/ProjectBillingInfo.java
@@ -56,71 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ProjectBillingInfo(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- projectId_ = s;
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- billingAccountName_ = s;
- break;
- }
- case 32:
- {
- billingEnabled_ = input.readBool();
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_ProjectBillingInfo_descriptor;
@@ -342,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (billingEnabled_ != false) {
output.writeBool(4, billingEnabled_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -363,7 +298,7 @@ public int getSerializedSize() {
if (billingEnabled_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, billingEnabled_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -383,7 +318,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getProjectId().equals(other.getProjectId())) return false;
if (!getBillingAccountName().equals(other.getBillingAccountName())) return false;
if (getBillingEnabled() != other.getBillingEnabled()) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -402,7 +337,7 @@ public int hashCode() {
hash = (53 * hash) + getBillingAccountName().hashCode();
hash = (37 * hash) + BILLING_ENABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getBillingEnabled());
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -533,17 +468,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.ProjectBillingInfo.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -652,7 +580,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.ProjectBillingInfo other) {
if (other.getBillingEnabled() != false) {
setBillingEnabled(other.getBillingEnabled());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -667,17 +595,55 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.ProjectBillingInfo parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ projectId_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ case 26:
+ {
+ billingAccountName_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ case 32:
+ {
+ billingEnabled_ = input.readBool();
+
+ break;
+ } // case 32
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.ProjectBillingInfo) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1122,7 +1088,18 @@ public ProjectBillingInfo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ProjectBillingInfo(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Service.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Service.java
index 40c33071e3d5..9f52737295a3 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Service.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Service.java
@@ -55,73 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private Service(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- serviceId_ = s;
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- displayName_ = s;
- break;
- }
- case 34:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- businessEntityName_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_Service_descriptor;
@@ -365,7 +298,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessEntityName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, businessEntityName_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -386,7 +319,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(businessEntityName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, businessEntityName_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -405,7 +338,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getServiceId().equals(other.getServiceId())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getBusinessEntityName().equals(other.getBusinessEntityName())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -424,7 +357,7 @@ public int hashCode() {
hash = (53 * hash) + getDisplayName().hashCode();
hash = (37 * hash) + BUSINESS_ENTITY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getBusinessEntityName().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -552,17 +485,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.Service.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -671,7 +597,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.Service other) {
businessEntityName_ = other.businessEntityName_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -686,17 +612,55 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.Service parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ serviceId_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ case 26:
+ {
+ displayName_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ case 34:
+ {
+ businessEntityName_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 34
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.Service) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1171,7 +1135,18 @@ public Service parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Service(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Sku.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Sku.java
index 5ef0ee9735ba..5e630ac93b17 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Sku.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/Sku.java
@@ -57,117 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private Sku(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- skuId_ = s;
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- description_ = s;
- break;
- }
- case 34:
- {
- com.google.cloud.billing.v1.Category.Builder subBuilder = null;
- if (category_ != null) {
- subBuilder = category_.toBuilder();
- }
- category_ =
- input.readMessage(
- com.google.cloud.billing.v1.Category.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(category_);
- category_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 42:
- {
- java.lang.String s = input.readStringRequireUtf8();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- serviceRegions_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- serviceRegions_.add(s);
- break;
- }
- case 50:
- {
- if (!((mutable_bitField0_ & 0x00000002) != 0)) {
- pricingInfo_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000002;
- }
- pricingInfo_.add(
- input.readMessage(
- com.google.cloud.billing.v1.PricingInfo.parser(), extensionRegistry));
- break;
- }
- case 58:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- serviceProviderName_ = s;
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- serviceRegions_ = serviceRegions_.getUnmodifiableView();
- }
- if (((mutable_bitField0_ & 0x00000002) != 0)) {
- pricingInfo_ = java.util.Collections.unmodifiableList(pricingInfo_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudCatalogProto
.internal_static_google_cloud_billing_v1_Sku_descriptor;
@@ -607,7 +496,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceProviderName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, serviceProviderName_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -642,7 +531,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceProviderName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, serviceProviderName_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -667,7 +556,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getServiceRegionsList().equals(other.getServiceRegionsList())) return false;
if (!getPricingInfoList().equals(other.getPricingInfoList())) return false;
if (!getServiceProviderName().equals(other.getServiceProviderName())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -698,7 +587,7 @@ public int hashCode() {
}
hash = (37 * hash) + SERVICE_PROVIDER_NAME_FIELD_NUMBER;
hash = (53 * hash) + getServiceProviderName().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -825,19 +714,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.Sku.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
- getPricingInfoFieldBuilder();
- }
}
@java.lang.Override
@@ -859,10 +739,11 @@ public Builder clear() {
bitField0_ = (bitField0_ & ~0x00000001);
if (pricingInfoBuilder_ == null) {
pricingInfo_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
} else {
+ pricingInfo_ = null;
pricingInfoBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000002);
serviceProviderName_ = "";
return this;
@@ -1020,7 +901,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.Sku other) {
serviceProviderName_ = other.serviceProviderName_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1035,17 +916,81 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.Sku parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ skuId_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ case 26:
+ {
+ description_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ case 34:
+ {
+ input.readMessage(getCategoryFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 34
+ case 42:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+ ensureServiceRegionsIsMutable();
+ serviceRegions_.add(s);
+ break;
+ } // case 42
+ case 50:
+ {
+ com.google.cloud.billing.v1.PricingInfo m =
+ input.readMessage(
+ com.google.cloud.billing.v1.PricingInfo.parser(), extensionRegistry);
+ if (pricingInfoBuilder_ == null) {
+ ensurePricingInfoIsMutable();
+ pricingInfo_.add(m);
+ } else {
+ pricingInfoBuilder_.addMessage(m);
+ }
+ break;
+ } // case 50
+ case 58:
+ {
+ serviceProviderName_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 58
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.cloud.billing.v1.Sku) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -2248,7 +2193,18 @@ public Sku parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Sku(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/UpdateBillingAccountRequest.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/UpdateBillingAccountRequest.java
index 4d5773167b17..0b82a1276676 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/UpdateBillingAccountRequest.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/UpdateBillingAccountRequest.java
@@ -52,83 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private UpdateBillingAccountRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18:
- {
- com.google.cloud.billing.v1.BillingAccount.Builder subBuilder = null;
- if (account_ != null) {
- subBuilder = account_.toBuilder();
- }
- account_ =
- input.readMessage(
- com.google.cloud.billing.v1.BillingAccount.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(account_);
- account_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 26:
- {
- com.google.protobuf.FieldMask.Builder subBuilder = null;
- if (updateMask_ != null) {
- subBuilder = updateMask_.toBuilder();
- }
- updateMask_ =
- input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(updateMask_);
- updateMask_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_UpdateBillingAccountRequest_descriptor;
@@ -323,7 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (updateMask_ != null) {
output.writeMessage(3, getUpdateMask());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -341,7 +264,7 @@ public int getSerializedSize() {
if (updateMask_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -366,7 +289,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasUpdateMask()) {
if (!getUpdateMask().equals(other.getUpdateMask())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -387,7 +310,7 @@ public int hashCode() {
hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER;
hash = (53 * hash) + getUpdateMask().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -517,17 +440,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.UpdateBillingAccountRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -645,7 +561,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.UpdateBillingAccountRequest
if (other.hasUpdateMask()) {
mergeUpdateMask(other.getUpdateMask());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -660,18 +576,49 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.UpdateBillingAccountRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ input.readMessage(getAccountFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 18
+ case 26:
+ {
+ input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 26
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.billing.v1.UpdateBillingAccountRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1218,7 +1165,18 @@ public UpdateBillingAccountRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new UpdateBillingAccountRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
diff --git a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/UpdateProjectBillingInfoRequest.java b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/UpdateProjectBillingInfoRequest.java
index 08e373be84ae..f7133bc6d733 100644
--- a/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/UpdateProjectBillingInfoRequest.java
+++ b/java-billing/proto-google-cloud-billing-v1/src/main/java/com/google/cloud/billing/v1/UpdateProjectBillingInfoRequest.java
@@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private UpdateProjectBillingInfoRequest(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new java.lang.NullPointerException();
- }
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- name_ = s;
- break;
- }
- case 18:
- {
- com.google.cloud.billing.v1.ProjectBillingInfo.Builder subBuilder = null;
- if (projectBillingInfo_ != null) {
- subBuilder = projectBillingInfo_.toBuilder();
- }
- projectBillingInfo_ =
- input.readMessage(
- com.google.cloud.billing.v1.ProjectBillingInfo.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(projectBillingInfo_);
- projectBillingInfo_ = subBuilder.buildPartial();
- }
-
- break;
- }
- default:
- {
- if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (com.google.protobuf.UninitializedMessageException e) {
- throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.billing.v1.CloudBillingProto
.internal_static_google_cloud_billing_v1_UpdateProjectBillingInfoRequest_descriptor;
@@ -252,7 +190,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (projectBillingInfo_ != null) {
output.writeMessage(2, getProjectBillingInfo());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -267,7 +205,7 @@ public int getSerializedSize() {
if (projectBillingInfo_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getProjectBillingInfo());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -288,7 +226,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasProjectBillingInfo()) {
if (!getProjectBillingInfo().equals(other.getProjectBillingInfo())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -305,7 +243,7 @@ public int hashCode() {
hash = (37 * hash) + PROJECT_BILLING_INFO_FIELD_NUMBER;
hash = (53 * hash) + getProjectBillingInfo().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -435,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
+ private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
-
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
}
@java.lang.Override
@@ -549,7 +480,7 @@ public Builder mergeFrom(com.google.cloud.billing.v1.UpdateProjectBillingInfoReq
if (other.hasProjectBillingInfo()) {
mergeProjectBillingInfo(other.getProjectBillingInfo());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -564,18 +495,44 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10:
+ {
+ name_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ input.readMessage(
+ getProjectBillingInfoFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 18
+ default:
+ {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
- (com.google.cloud.billing.v1.UpdateProjectBillingInfoRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -918,7 +875,18 @@ public UpdateProjectBillingInfoRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new UpdateProjectBillingInfoRequest(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};