diff --git a/java-resource-settings/README.md b/java-resource-settings/README.md
index 776aa0063263..e91ee02ac6a7 100644
--- a/java-resource-settings/README.md
+++ b/java-resource-settings/README.md
@@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file:
com.google.cloud
google-cloud-resource-settings
- 1.3.3
+ 1.3.4
```
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-resource-settings:1.3.3'
+implementation 'com.google.cloud:google-cloud-resource-settings:1.3.4'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-resource-settings" % "1.3.3"
+libraryDependencies += "com.google.cloud" % "google-cloud-resource-settings" % "1.3.4"
```
## Authentication
diff --git a/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/GetSettingRequest.java b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/GetSettingRequest.java
index ac07770956f9..2fc8190e8712 100644
--- a/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/GetSettingRequest.java
+++ b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/GetSettingRequest.java
@@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private GetSettingRequest(
- 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:
- {
- int rawValue = input.readEnum();
-
- view_ = rawValue;
- 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.resourcesettings.v1.ResourceSettingsProto
.internal_static_google_cloud_resourcesettings_v1_GetSettingRequest_descriptor;
@@ -233,7 +180,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
!= com.google.cloud.resourcesettings.v1.SettingView.SETTING_VIEW_UNSPECIFIED.getNumber()) {
output.writeEnum(2, view_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -249,7 +196,7 @@ public int getSerializedSize() {
!= com.google.cloud.resourcesettings.v1.SettingView.SETTING_VIEW_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, view_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -267,7 +214,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getName().equals(other.getName())) return false;
if (view_ != other.view_) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -282,7 +229,7 @@ public int hashCode() {
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + VIEW_FIELD_NUMBER;
hash = (53 * hash) + view_;
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -412,17 +359,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.resourcesettings.v1.GetSettingRequest.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
@@ -518,7 +458,7 @@ public Builder mergeFrom(com.google.cloud.resourcesettings.v1.GetSettingRequest
if (other.view_ != 0) {
setViewValue(other.getViewValue());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -533,18 +473,43 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.resourcesettings.v1.GetSettingRequest 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:
+ {
+ view_ = input.readEnum();
+
+ break;
+ } // case 16
+ 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.resourcesettings.v1.GetSettingRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -794,7 +759,18 @@ public GetSettingRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new GetSettingRequest(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-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/ListSettingsRequest.java b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/ListSettingsRequest.java
index 109319fa10c1..7e352e546548 100644
--- a/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/ListSettingsRequest.java
+++ b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/ListSettingsRequest.java
@@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListSettingsRequest(
- 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 16:
- {
- pageSize_ = input.readInt32();
- break;
- }
- case 26:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- pageToken_ = s;
- break;
- }
- case 32:
- {
- int rawValue = input.readEnum();
-
- view_ = rawValue;
- 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.resourcesettings.v1.ResourceSettingsProto
.internal_static_google_cloud_resourcesettings_v1_ListSettingsRequest_descriptor;
@@ -327,7 +262,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
!= com.google.cloud.resourcesettings.v1.SettingView.SETTING_VIEW_UNSPECIFIED.getNumber()) {
output.writeEnum(4, view_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -349,7 +284,7 @@ public int getSerializedSize() {
!= com.google.cloud.resourcesettings.v1.SettingView.SETTING_VIEW_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, view_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -369,7 +304,7 @@ public boolean equals(final java.lang.Object obj) {
if (getPageSize() != other.getPageSize()) return false;
if (!getPageToken().equals(other.getPageToken())) return false;
if (view_ != other.view_) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -388,7 +323,7 @@ public int hashCode() {
hash = (53 * hash) + getPageToken().hashCode();
hash = (37 * hash) + VIEW_FIELD_NUMBER;
hash = (53 * hash) + view_;
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -518,17 +453,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.resourcesettings.v1.ListSettingsRequest.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
@@ -637,7 +565,7 @@ public Builder mergeFrom(com.google.cloud.resourcesettings.v1.ListSettingsReques
if (other.view_ != 0) {
setViewValue(other.getViewValue());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -652,18 +580,55 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.resourcesettings.v1.ListSettingsRequest 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 16:
+ {
+ pageSize_ = input.readInt32();
+
+ break;
+ } // case 16
+ case 26:
+ {
+ pageToken_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 26
+ case 32:
+ {
+ view_ = input.readEnum();
+
+ 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.resourcesettings.v1.ListSettingsRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1091,7 +1056,18 @@ public ListSettingsRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListSettingsRequest(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-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/ListSettingsResponse.java b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/ListSettingsResponse.java
index ec4b0a173913..52488932bbf2 100644
--- a/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/ListSettingsResponse.java
+++ b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/ListSettingsResponse.java
@@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private ListSettingsResponse(
- 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)) {
- settings_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- settings_.add(
- input.readMessage(
- com.google.cloud.resourcesettings.v1.Setting.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)) {
- settings_ = java.util.Collections.unmodifiableList(settings_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.resourcesettings.v1.ResourceSettingsProto
.internal_static_google_cloud_resourcesettings_v1_ListSettingsResponse_descriptor;
@@ -267,7 +206,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
@@ -282,7 +221,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;
}
@@ -300,7 +239,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getSettingsList().equals(other.getSettingsList())) 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;
}
@@ -317,7 +256,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;
}
@@ -447,19 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.resourcesettings.v1.ListSettingsResponse.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) {
- getSettingsFieldBuilder();
- }
}
@java.lang.Override
@@ -467,10 +397,11 @@ public Builder clear() {
super.clear();
if (settingsBuilder_ == null) {
settings_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
} else {
+ settings_ = null;
settingsBuilder_.clear();
}
+ bitField0_ = (bitField0_ & ~0x00000001);
nextPageToken_ = "";
return this;
@@ -592,7 +523,7 @@ public Builder mergeFrom(com.google.cloud.resourcesettings.v1.ListSettingsRespon
nextPageToken_ = other.nextPageToken_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -607,18 +538,50 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.resourcesettings.v1.ListSettingsResponse 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.resourcesettings.v1.Setting m =
+ input.readMessage(
+ com.google.cloud.resourcesettings.v1.Setting.parser(), extensionRegistry);
+ if (settingsBuilder_ == null) {
+ ensureSettingsIsMutable();
+ settings_.add(m);
+ } else {
+ settingsBuilder_.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.resourcesettings.v1.ListSettingsResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1113,7 +1076,18 @@ public ListSettingsResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ListSettingsResponse(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-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/Setting.java b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/Setting.java
index dbaebe55e878..f7a7de539ca8 100644
--- a/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/Setting.java
+++ b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/Setting.java
@@ -53,108 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private Setting(
- 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 58:
- {
- com.google.cloud.resourcesettings.v1.SettingMetadata.Builder subBuilder = null;
- if (metadata_ != null) {
- subBuilder = metadata_.toBuilder();
- }
- metadata_ =
- input.readMessage(
- com.google.cloud.resourcesettings.v1.SettingMetadata.parser(),
- extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(metadata_);
- metadata_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 66:
- {
- com.google.cloud.resourcesettings.v1.Value.Builder subBuilder = null;
- if (localValue_ != null) {
- subBuilder = localValue_.toBuilder();
- }
- localValue_ =
- input.readMessage(
- com.google.cloud.resourcesettings.v1.Value.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(localValue_);
- localValue_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 74:
- {
- com.google.cloud.resourcesettings.v1.Value.Builder subBuilder = null;
- if (effectiveValue_ != null) {
- subBuilder = effectiveValue_.toBuilder();
- }
- effectiveValue_ =
- input.readMessage(
- com.google.cloud.resourcesettings.v1.Value.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(effectiveValue_);
- effectiveValue_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 82:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- etag_ = 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.resourcesettings.v1.ResourceSettingsProto
.internal_static_google_cloud_resourcesettings_v1_Setting_descriptor;
@@ -501,7 +399,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, etag_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -525,7 +423,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, etag_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -555,7 +453,7 @@ public boolean equals(final java.lang.Object obj) {
if (!getEffectiveValue().equals(other.getEffectiveValue())) return false;
}
if (!getEtag().equals(other.getEtag())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -582,7 +480,7 @@ public int hashCode() {
}
hash = (37 * hash) + ETAG_FIELD_NUMBER;
hash = (53 * hash) + getEtag().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -711,17 +609,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.resourcesettings.v1.Setting.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
@@ -859,7 +750,7 @@ public Builder mergeFrom(com.google.cloud.resourcesettings.v1.Setting other) {
etag_ = other.etag_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -874,17 +765,61 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.resourcesettings.v1.Setting 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 58:
+ {
+ input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 58
+ case 66:
+ {
+ input.readMessage(getLocalValueFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 66
+ case 74:
+ {
+ input.readMessage(getEffectiveValueFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 74
+ case 82:
+ {
+ etag_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 82
+ 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.resourcesettings.v1.Setting) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1864,7 +1799,18 @@ public Setting parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Setting(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-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/SettingMetadata.java b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/SettingMetadata.java
index 04cd2ec27cd6..3f0fd22b646c 100644
--- a/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/SettingMetadata.java
+++ b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/SettingMetadata.java
@@ -54,87 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private SettingMetadata(
- 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();
-
- displayName_ = s;
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
-
- description_ = s;
- break;
- }
- case 24:
- {
- readOnly_ = input.readBool();
- break;
- }
- case 32:
- {
- int rawValue = input.readEnum();
-
- dataType_ = rawValue;
- break;
- }
- case 42:
- {
- com.google.cloud.resourcesettings.v1.Value.Builder subBuilder = null;
- if (defaultValue_ != null) {
- subBuilder = defaultValue_.toBuilder();
- }
- defaultValue_ =
- input.readMessage(
- com.google.cloud.resourcesettings.v1.Value.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(defaultValue_);
- defaultValue_ = 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.resourcesettings.v1.ResourceSettingsProto
.internal_static_google_cloud_resourcesettings_v1_SettingMetadata_descriptor;
@@ -594,7 +513,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (defaultValue_ != null) {
output.writeMessage(5, getDefaultValue());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -620,7 +539,7 @@ public int getSerializedSize() {
if (defaultValue_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDefaultValue());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -644,7 +563,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasDefaultValue()) {
if (!getDefaultValue().equals(other.getDefaultValue())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -667,7 +586,7 @@ public int hashCode() {
hash = (37 * hash) + DEFAULT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + getDefaultValue().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -796,17 +715,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.resourcesettings.v1.SettingMetadata.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
@@ -929,7 +841,7 @@ public Builder mergeFrom(com.google.cloud.resourcesettings.v1.SettingMetadata ot
if (other.hasDefaultValue()) {
mergeDefaultValue(other.getDefaultValue());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -944,18 +856,61 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.resourcesettings.v1.SettingMetadata 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:
+ {
+ displayName_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 10
+ case 18:
+ {
+ description_ = input.readStringRequireUtf8();
+
+ break;
+ } // case 18
+ case 24:
+ {
+ readOnly_ = input.readBool();
+
+ break;
+ } // case 24
+ case 32:
+ {
+ dataType_ = input.readEnum();
+
+ break;
+ } // case 32
+ case 42:
+ {
+ input.readMessage(getDefaultValueFieldBuilder().getBuilder(), extensionRegistry);
+
+ break;
+ } // case 42
+ 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.resourcesettings.v1.SettingMetadata) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1556,7 +1511,18 @@ public SettingMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new SettingMetadata(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-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/UpdateSettingRequest.java b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/UpdateSettingRequest.java
index c5eda507e012..1510c3f4b178 100644
--- a/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/UpdateSettingRequest.java
+++ b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/UpdateSettingRequest.java
@@ -50,61 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private UpdateSettingRequest(
- 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.resourcesettings.v1.Setting.Builder subBuilder = null;
- if (setting_ != null) {
- subBuilder = setting_.toBuilder();
- }
- setting_ =
- input.readMessage(
- com.google.cloud.resourcesettings.v1.Setting.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(setting_);
- setting_ = 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.resourcesettings.v1.ResourceSettingsProto
.internal_static_google_cloud_resourcesettings_v1_UpdateSettingRequest_descriptor;
@@ -191,7 +136,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (setting_ != null) {
output.writeMessage(1, getSetting());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -203,7 +148,7 @@ public int getSerializedSize() {
if (setting_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSetting());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -223,7 +168,7 @@ public boolean equals(final java.lang.Object obj) {
if (hasSetting()) {
if (!getSetting().equals(other.getSetting())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -238,7 +183,7 @@ public int hashCode() {
hash = (37 * hash) + SETTING_FIELD_NUMBER;
hash = (53 * hash) + getSetting().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -368,17 +313,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.resourcesettings.v1.UpdateSettingRequest.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
@@ -475,7 +413,7 @@ public Builder mergeFrom(com.google.cloud.resourcesettings.v1.UpdateSettingReque
if (other.hasSetting()) {
mergeSetting(other.getSetting());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -490,18 +428,37 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.resourcesettings.v1.UpdateSettingRequest 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(getSettingFieldBuilder().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.resourcesettings.v1.UpdateSettingRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -741,7 +698,18 @@ public UpdateSettingRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new UpdateSettingRequest(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-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/Value.java b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/Value.java
index 699224a77f2e..10e6877dc513 100644
--- a/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/Value.java
+++ b/java-resource-settings/proto-google-cloud-resource-settings-v1/src/main/java/com/google/cloud/resourcesettings/v1/Value.java
@@ -50,94 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private Value(
- 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:
- {
- value_ = input.readBool();
- valueCase_ = 1;
- break;
- }
- case 18:
- {
- java.lang.String s = input.readStringRequireUtf8();
- valueCase_ = 2;
- value_ = s;
- break;
- }
- case 26:
- {
- com.google.cloud.resourcesettings.v1.Value.StringSet.Builder subBuilder = null;
- if (valueCase_ == 3) {
- subBuilder =
- ((com.google.cloud.resourcesettings.v1.Value.StringSet) value_).toBuilder();
- }
- value_ =
- input.readMessage(
- com.google.cloud.resourcesettings.v1.Value.StringSet.parser(),
- extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom((com.google.cloud.resourcesettings.v1.Value.StringSet) value_);
- value_ = subBuilder.buildPartial();
- }
- valueCase_ = 3;
- break;
- }
- case 34:
- {
- com.google.cloud.resourcesettings.v1.Value.EnumValue.Builder subBuilder = null;
- if (valueCase_ == 4) {
- subBuilder =
- ((com.google.cloud.resourcesettings.v1.Value.EnumValue) value_).toBuilder();
- }
- value_ =
- input.readMessage(
- com.google.cloud.resourcesettings.v1.Value.EnumValue.parser(),
- extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom((com.google.cloud.resourcesettings.v1.Value.EnumValue) value_);
- value_ = subBuilder.buildPartial();
- }
- valueCase_ = 4;
- 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.resourcesettings.v1.ResourceSettingsProto
.internal_static_google_cloud_resourcesettings_v1_Value_descriptor;
@@ -245,59 +157,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private StringSet(
- 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();
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- values_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- values_.add(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)) {
- values_ = values_.getUnmodifiableView();
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
-
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.resourcesettings.v1.ResourceSettingsProto
.internal_static_google_cloud_resourcesettings_v1_Value_StringSet_descriptor;
@@ -391,7 +250,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
for (int i = 0; i < values_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, values_.getRaw(i));
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -408,7 +267,7 @@ public int getSerializedSize() {
size += dataSize;
size += 1 * getValuesList().size();
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -425,7 +284,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.resourcesettings.v1.Value.StringSet) obj;
if (!getValuesList().equals(other.getValuesList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -440,7 +299,7 @@ public int hashCode() {
hash = (37 * hash) + VALUES_FIELD_NUMBER;
hash = (53 * hash) + getValuesList().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -574,17 +433,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.resourcesettings.v1.Value.StringSet.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
@@ -687,7 +539,7 @@ public Builder mergeFrom(com.google.cloud.resourcesettings.v1.Value.StringSet ot
}
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -702,18 +554,38 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.resourcesettings.v1.Value.StringSet 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:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+ ensureValuesIsMutable();
+ values_.add(s);
+ 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.resourcesettings.v1.Value.StringSet) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -920,7 +792,19 @@ public StringSet parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new StringSet(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();
}
};
@@ -1005,52 +889,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
- private EnumValue(
- 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();
-
- value_ = 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.resourcesettings.v1.ResourceSettingsProto
.internal_static_google_cloud_resourcesettings_v1_Value_EnumValue_descriptor;
@@ -1132,7 +970,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -1144,7 +982,7 @@ public int getSerializedSize() {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1161,7 +999,7 @@ public boolean equals(final java.lang.Object obj) {
(com.google.cloud.resourcesettings.v1.Value.EnumValue) obj;
if (!getValue().equals(other.getValue())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1174,7 +1012,7 @@ public int hashCode() {
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1308,17 +1146,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.resourcesettings.v1.Value.EnumValue.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
@@ -1410,7 +1241,7 @@ public Builder mergeFrom(com.google.cloud.resourcesettings.v1.Value.EnumValue ot
value_ = other.value_;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -1425,18 +1256,37 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.resourcesettings.v1.Value.EnumValue 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:
+ {
+ value_ = 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.resourcesettings.v1.Value.EnumValue) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -1579,7 +1429,19 @@ public EnumValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new EnumValue(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();
}
};
@@ -1885,7 +1747,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
if (valueCase_ == 4) {
output.writeMessage(4, (com.google.cloud.resourcesettings.v1.Value.EnumValue) value_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
@java.lang.Override
@@ -1912,7 +1774,7 @@ public int getSerializedSize() {
com.google.protobuf.CodedOutputStream.computeMessageSize(
4, (com.google.cloud.resourcesettings.v1.Value.EnumValue) value_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@@ -1945,7 +1807,7 @@ public boolean equals(final java.lang.Object obj) {
case 0:
default:
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@@ -1976,7 +1838,7 @@ public int hashCode() {
case 0:
default:
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -2105,22 +1967,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
}
// Construct using com.google.cloud.resourcesettings.v1.Value.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
public Builder clear() {
super.clear();
+ if (stringSetValueBuilder_ != null) {
+ stringSetValueBuilder_.clear();
+ }
+ if (enumValueBuilder_ != null) {
+ enumValueBuilder_.clear();
+ }
valueCase_ = 0;
value_ = null;
return this;
@@ -2248,7 +2109,7 @@ public Builder mergeFrom(com.google.cloud.resourcesettings.v1.Value other) {
break;
}
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@@ -2263,17 +2124,56 @@ public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
- com.google.cloud.resourcesettings.v1.Value 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:
+ {
+ value_ = input.readBool();
+ valueCase_ = 1;
+ break;
+ } // case 8
+ case 18:
+ {
+ java.lang.String s = input.readStringRequireUtf8();
+ valueCase_ = 2;
+ value_ = s;
+ break;
+ } // case 18
+ case 26:
+ {
+ input.readMessage(getStringSetValueFieldBuilder().getBuilder(), extensionRegistry);
+ valueCase_ = 3;
+ break;
+ } // case 26
+ case 34:
+ {
+ input.readMessage(getEnumValueFieldBuilder().getBuilder(), extensionRegistry);
+ valueCase_ = 4;
+ 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.resourcesettings.v1.Value) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
@@ -2949,7 +2849,18 @@ public Value parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Value(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();
}
};