diff --git a/java-compute/.kokoro/build.sh b/java-compute/.kokoro/build.sh index 53d9f5922abb..e99bc9bcb6fa 100755 --- a/java-compute/.kokoro/build.sh +++ b/java-compute/.kokoro/build.sh @@ -71,12 +71,12 @@ integration) ;; graalvm) # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative-0.9.14 -Penable-integration-tests test RETURN_CODE=$? ;; graalvm17) # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative-0.9.14 -Penable-integration-tests test RETURN_CODE=$? ;; samples) diff --git a/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/BaseTest.java b/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/BaseTest.java index cbe07e4ee3bd..784429c5e05f 100644 --- a/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/BaseTest.java +++ b/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/BaseTest.java @@ -22,8 +22,9 @@ public class BaseTest { protected static final String DEFAULT_PROJECT = ServiceOptions.getDefaultProjectId(); protected static final String DEFAULT_ZONE = "us-central1-a"; protected static final String DEFAULT_REGION = "us-west1"; + protected static final String COMPUTE_PREFIX = "gapic-"; public static String generateRandomName(String placeholder) { - return "gapic-" + placeholder + UUID.randomUUID().toString().substring(0, 8); + return COMPUTE_PREFIX + placeholder + UUID.randomUUID().toString().substring(0, 8); } } diff --git a/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/ITAddressesTest.java b/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/ITAddressesTest.java index f36ffdb304cd..fe7475c2c175 100644 --- a/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/ITAddressesTest.java +++ b/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/ITAddressesTest.java @@ -46,6 +46,7 @@ public static void setUp() throws IOException { addresses = new ArrayList<>(); AddressesSettings addressesSettings = AddressesSettings.newBuilder().build(); addressesClient = AddressesClient.create(addressesSettings); + Util.cleanUpComputeAddresses(addressesClient, DEFAULT_PROJECT, DEFAULT_REGION, COMPUTE_PREFIX); } @Before @@ -122,7 +123,7 @@ private void insertAddress(String description) { .insertAsync(DEFAULT_PROJECT, DEFAULT_REGION, address) .get(60, TimeUnit.SECONDS); } catch (InterruptedException | ExecutionException | TimeoutException e) { - fail("Insert operation failed."); + fail("Insert operation failed: " + e.getMessage()); } addresses.add(address); } diff --git a/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/ITSmokeInstancesTest.java b/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/ITSmokeInstancesTest.java index 33bec397c973..c19ba63ea4e7 100644 --- a/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/ITSmokeInstancesTest.java +++ b/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/ITSmokeInstancesTest.java @@ -72,6 +72,7 @@ public static void setUp() throws IOException { instances = new ArrayList<>(); InstancesSettings instanceSettings = InstancesSettings.newBuilder().build(); instancesClient = InstancesClient.create(instanceSettings); + Util.cleanUpComputeInstances(instancesClient, DEFAULT_PROJECT, DEFAULT_ZONE, COMPUTE_PREFIX); } @Before diff --git a/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/Util.java b/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/Util.java new file mode 100644 index 000000000000..1a65c4e7e6af --- /dev/null +++ b/java-compute/google-cloud-compute/src/test/java/com/google/cloud/compute/v1/integration/Util.java @@ -0,0 +1,73 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.compute.v1.integration; + +import com.google.cloud.compute.v1.Address; +import com.google.cloud.compute.v1.AddressesClient; +import com.google.cloud.compute.v1.DeleteInstanceRequest; +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstancesClient; +import com.google.cloud.compute.v1.InstancesClient.ListPagedResponse; +import java.time.Instant; +import java.time.OffsetDateTime; +import java.time.ZonedDateTime; +import java.time.temporal.ChronoUnit; + +public class Util { + + // Cleans existing test resources if any. + private static final int DELETION_THRESHOLD_TIME_HOURS = 24; + + /** Bring down any instances that are older than 24 hours */ + public static void cleanUpComputeInstances( + InstancesClient instancesClient, String project, String zone, String prefix) { + ListPagedResponse listPagedResponse = instancesClient.list(project, zone); + for (Instance instance : listPagedResponse.iterateAll()) { + if (isCreatedBeforeThresholdTime( + ZonedDateTime.parse(instance.getCreationTimestamp()).toInstant()) + && instance.getName().startsWith(prefix)) { + instancesClient.deleteAsync( + DeleteInstanceRequest.newBuilder() + .setInstance(instance.getName()) + .setProject(project) + .setZone(zone) + .build()); + } + } + } + + /** Bring down any addresses that are older than 24 hours */ + public static void cleanUpComputeAddresses( + AddressesClient addressesClient, String project, String region, String prefix) { + AddressesClient.ListPagedResponse listPagedResponse = addressesClient.list(project, region); + for (Address address : listPagedResponse.iterateAll()) { + if (isCreatedBeforeThresholdTime(address.getCreationTimestamp()) + && address.getName().startsWith(prefix)) { + addressesClient.deleteAsync(project, region, address.getName()); + } + } + } + + private static boolean isCreatedBeforeThresholdTime(Instant instant) { + return instant.isBefore(Instant.now().minus(DELETION_THRESHOLD_TIME_HOURS, ChronoUnit.HOURS)); + } + + private static boolean isCreatedBeforeThresholdTime(String timestamp) { + return OffsetDateTime.parse(timestamp) + .toInstant() + .isBefore(Instant.now().minus(DELETION_THRESHOLD_TIME_HOURS, ChronoUnit.HOURS)); + } +} diff --git a/java-compute/owlbot.py b/java-compute/owlbot.py index dca9d8672536..7d8404ba61a1 100644 --- a/java-compute/owlbot.py +++ b/java-compute/owlbot.py @@ -21,4 +21,6 @@ s.move(library) s.remove_staging_dirs() -java.common_templates() +java.common_templates(excludes=[ + '.kokoro/build.sh' +]) diff --git a/java-compute/pom.xml b/java-compute/pom.xml index 49c82fda8fb0..0a554253d128 100644 --- a/java-compute/pom.xml +++ b/java-compute/pom.xml @@ -110,6 +110,70 @@ google-cloud-compute-bom + + + native-0.9.14 + + + + + org.junit.vintage + junit-vintage-engine + 5.9.1 + test + + + + org.graalvm.buildtools + junit-platform-native + 0.9.14 + test + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + 2.22.2 + + + + + **/IT*.java + + **/*ClientTest.java + + + + + + org.graalvm.buildtools + native-maven-plugin + 0.9.14 + true + + + test-native + + test + + test + + + + + --no-fallback + + + + + + + + diff --git a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AbandonInstancesInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AbandonInstancesInstanceGroupManagerRequest.java index 6280e050a78e..858026f105c4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AbandonInstancesInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AbandonInstancesInstanceGroupManagerRequest.java @@ -58,93 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AbandonInstancesInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -1727535166: - { - com.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequest.Builder - subBuilder = null; - if (instanceGroupManagersAbandonInstancesRequestResource_ != null) { - subBuilder = instanceGroupManagersAbandonInstancesRequestResource_.toBuilder(); - } - instanceGroupManagersAbandonInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagersAbandonInstancesRequestResource_); - instanceGroupManagersAbandonInstancesRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AbandonInstancesInstanceGroupManagerRequest_descriptor; @@ -470,7 +383,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupManagersAbandonInstancesRequestResource_ != null) { output.writeMessage(320929016, getInstanceGroupManagersAbandonInstancesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -498,7 +411,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 320929016, getInstanceGroupManagersAbandonInstancesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -527,7 +440,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -552,7 +465,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -686,17 +599,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest.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 @@ -838,7 +744,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -853,19 +759,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AbandonInstancesInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -1727535166: + { + input.readMessage( + getInstanceGroupManagersAbandonInstancesRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -1727535166 + 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.compute.v1.AbandonInstancesInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1588,7 +1539,19 @@ public AbandonInstancesInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AbandonInstancesInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AbandonInstancesRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AbandonInstancesRegionInstanceGroupManagerRequest.java index 5f9e10e28180..eed2aecf705f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AbandonInstancesRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AbandonInstancesRegionInstanceGroupManagerRequest.java @@ -57,95 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AbandonInstancesRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -386971366: - { - com.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest.Builder - subBuilder = null; - if (regionInstanceGroupManagersAbandonInstancesRequestResource_ != null) { - subBuilder = - regionInstanceGroupManagersAbandonInstancesRequestResource_.toBuilder(); - } - regionInstanceGroupManagersAbandonInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupManagersAbandonInstancesRequestResource_); - regionInstanceGroupManagersAbandonInstancesRequestResource_ = - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AbandonInstancesRegionInstanceGroupManagerRequest_descriptor; @@ -473,7 +384,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 488499491, getRegionInstanceGroupManagersAbandonInstancesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -501,7 +412,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 488499491, getRegionInstanceGroupManagersAbandonInstancesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -532,7 +443,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -560,7 +471,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -698,17 +609,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerRequest.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 @@ -852,7 +756,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -867,20 +771,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AbandonInstancesRegionInstanceGroupManagerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -386971366: + { + input.readMessage( + getRegionInstanceGroupManagersAbandonInstancesRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -386971366 + 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.compute.v1.AbandonInstancesRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1608,8 +1556,19 @@ public AbandonInstancesRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AbandonInstancesRegionInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorConfig.java index 15b051250f2d..d79759ecb632 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorConfig.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AcceleratorConfig( - 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 1104249970: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - acceleratorType_ = s; - break; - } - case -255929896: - { - bitField0_ |= 0x00000001; - acceleratorCount_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AcceleratorConfig_descriptor; @@ -238,7 +185,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(504879675, acceleratorCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -253,7 +200,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(504879675, acceleratorCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -277,7 +224,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAcceleratorType()) { if (!getAcceleratorType().equals(other.getAcceleratorType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -296,7 +243,7 @@ public int hashCode() { hash = (37 * hash) + ACCELERATOR_TYPE_FIELD_NUMBER; hash = (53 * hash) + getAcceleratorType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -425,17 +372,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AcceleratorConfig.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 @@ -540,7 +480,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AcceleratorConfig other) { acceleratorType_ = other.acceleratorType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -555,17 +495,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AcceleratorConfig 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 1104249970: + { + acceleratorType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1104249970 + case -255929896: + { + acceleratorCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -255929896 + 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.compute.v1.AcceleratorConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -790,7 +756,18 @@ public AcceleratorConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AcceleratorConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorType.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorType.java index 6a707543ce71..81ae4767979b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorType.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorType.java @@ -57,116 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AcceleratorType( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 2110515856: - { - bitField0_ |= 0x00000020; - maximumCardsPerInstance_ = input.readInt32(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - selfLink_ = s; - break; - } - case -173855334: - { - com.google.cloud.compute.v1.DeprecationStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = deprecated_.toBuilder(); - } - deprecated_ = - input.readMessage( - com.google.cloud.compute.v1.DeprecationStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deprecated_); - deprecated_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AcceleratorType_descriptor; @@ -724,7 +614,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(515138995, getDeprecated()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -763,7 +653,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(515138995, getDeprecated()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -815,7 +705,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -862,7 +752,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1189,7 +1079,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AcceleratorType other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1204,17 +1094,85 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AcceleratorType 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26989658 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 2110515856: + { + maximumCardsPerInstance_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 2110515856 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -645248918 + case -173855334: + { + input.readMessage(getDeprecatedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -173855334 + 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.compute.v1.AcceleratorType) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2293,7 +2251,18 @@ public AcceleratorType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AcceleratorType(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeAggregatedList.java index 70b5a1e08e4f..b972e8e0e0c6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AcceleratorTypeAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.AcceleratorTypesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AcceleratorTypeAggregatedList_descriptor; @@ -710,7 +597,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -755,7 +642,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -793,7 +680,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -832,7 +719,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1161,7 +1048,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AcceleratorTypeAggregatedLi if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1176,18 +1063,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AcceleratorTypeAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.AcceleratorTypesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.AcceleratorTypeAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2245,7 +2193,18 @@ public AcceleratorTypeAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AcceleratorTypeAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeList.java index be1aeb40c63f..fd84e1afa460 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypeList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AcceleratorTypeList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.AcceleratorType.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AcceleratorTypeList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AcceleratorTypeList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,17 +921,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AcceleratorTypeList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.AcceleratorType m = + input.readMessage( + com.google.cloud.compute.v1.AcceleratorType.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.AcceleratorTypeList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2081,7 +2041,18 @@ public AcceleratorTypeList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AcceleratorTypeList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypesScopedList.java index 1568b330f8bb..3d7d9e779a63 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AcceleratorTypesScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AcceleratorTypesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -127988438: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - acceleratorTypes_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - acceleratorTypes_.add( - input.readMessage( - com.google.cloud.compute.v1.AcceleratorType.parser(), extensionRegistry)); - 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)) { - acceleratorTypes_ = java.util.Collections.unmodifiableList(acceleratorTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AcceleratorTypesScopedList_descriptor; @@ -274,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < acceleratorTypes_.size(); i++) { output.writeMessage(520872357, acceleratorTypes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +220,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 520872357, acceleratorTypes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,10 +410,11 @@ public Builder clear() { super.clear(); if (acceleratorTypesBuilder_ == null) { acceleratorTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + acceleratorTypes_ = null; acceleratorTypesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -618,7 +548,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AcceleratorTypesScopedList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,18 +563,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AcceleratorTypesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -127988438: + { + com.google.cloud.compute.v1.AcceleratorType m = + input.readMessage( + com.google.cloud.compute.v1.AcceleratorType.parser(), extensionRegistry); + if (acceleratorTypesBuilder_ == null) { + ensureAcceleratorTypesIsMutable(); + acceleratorTypes_.add(m); + } else { + acceleratorTypesBuilder_.addMessage(m); + } + break; + } // case -127988438 + 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.compute.v1.AcceleratorTypesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1189,18 @@ public AcceleratorTypesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AcceleratorTypesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Accelerators.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Accelerators.java index a1a2df7cb777..dae80eafb5f3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Accelerators.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Accelerators.java @@ -51,59 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Accelerators( - 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 -1950449494: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - guestAcceleratorType_ = s; - break; - } - case -462332768: - { - bitField0_ |= 0x00000001; - guestAcceleratorCount_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Accelerators_descriptor; @@ -237,7 +184,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(479079316, guestAcceleratorCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -255,7 +202,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt32Size(479079316, guestAcceleratorCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -278,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (hasGuestAcceleratorType()) { if (!getGuestAcceleratorType().equals(other.getGuestAcceleratorType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -297,7 +244,7 @@ public int hashCode() { hash = (37 * hash) + GUEST_ACCELERATOR_TYPE_FIELD_NUMBER; hash = (53 * hash) + getGuestAcceleratorType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -425,17 +372,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Accelerators.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 @@ -540,7 +480,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Accelerators other) { guestAcceleratorType_ = other.guestAcceleratorType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -555,17 +495,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Accelerators 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 -1950449494: + { + guestAcceleratorType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1950449494 + case -462332768: + { + guestAcceleratorCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -462332768 + 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.compute.v1.Accelerators) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -790,7 +756,18 @@ public Accelerators parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Accelerators(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AccessConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AccessConfig.java index 896d212c9e26..1583202b3e22 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AccessConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AccessConfig.java @@ -58,107 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AccessConfig( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - name_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - type_ = s; - break; - } - case 941076450: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - natIP_ = s; - break; - } - case -1762173958: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - publicPtrDomainName_ = s; - break; - } - case -889590152: - { - bitField0_ |= 0x00000002; - externalIpv6PrefixLength_ = input.readInt32(); - break; - } - case -155784550: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - networkTier_ = s; - break; - } - case -104005464: - { - bitField0_ |= 0x00000080; - setPublicPtr_ = input.readBool(); - break; - } - case -33337638: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - externalIpv6_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AccessConfig_descriptor; @@ -1062,7 +961,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 532703707, externalIpv6_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1101,7 +1000,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(532703707, externalIpv6_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1152,7 +1051,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1199,7 +1098,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1328,17 +1227,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AccessConfig.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 @@ -1518,7 +1410,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AccessConfig other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1533,17 +1425,85 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AccessConfig 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26989658 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 28604882 + case 941076450: + { + natIP_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 941076450 + case -1762173958: + { + publicPtrDomainName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -1762173958 + case -889590152: + { + externalIpv6PrefixLength_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case -889590152 + case -155784550: + { + networkTier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -155784550 + case -104005464: + { + setPublicPtr_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case -104005464 + case -33337638: + { + externalIpv6_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -33337638 + 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.compute.v1.AccessConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2567,7 +2527,18 @@ public AccessConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AccessConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAccessConfigInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAccessConfigInstanceRequest.java index 7dead5abafc0..3a4a0321fb9e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAccessConfigInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAccessConfigInstanceRequest.java @@ -57,97 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddAccessConfigInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1371864254: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkInterface_ = s; - break; - } - case -1192362878: - { - com.google.cloud.compute.v1.AccessConfig.Builder subBuilder = null; - if (accessConfigResource_ != null) { - subBuilder = accessConfigResource_.toBuilder(); - } - accessConfigResource_ = - input.readMessage( - com.google.cloud.compute.v1.AccessConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(accessConfigResource_); - accessConfigResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddAccessConfigInstanceRequest_descriptor; @@ -518,7 +427,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (accessConfigResource_ != null) { output.writeMessage(387825552, getAccessConfigResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -548,7 +457,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 387825552, getAccessConfigResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -576,7 +485,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -603,7 +512,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -733,17 +642,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddAccessConfigInstanceRequest.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 @@ -882,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddAccessConfigInstanceRequ zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -897,18 +799,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddAccessConfigInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1371864254: + { + networkInterface_ = input.readStringRequireUtf8(); + + break; + } // case -1371864254 + case -1192362878: + { + input.readMessage( + getAccessConfigResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1192362878 + 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.compute.v1.AddAccessConfigInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1666,18 @@ public AddAccessConfigInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddAccessConfigInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationFirewallPolicyRequest.java index 8516c318b627..758002711016 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationFirewallPolicyRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddAssociationFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1676329920: - { - bitField0_ |= 0x00000001; - replaceExistingAssociation_ = input.readBool(); - break; - } - case 2076369362: - { - com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder subBuilder = null; - if (firewallPolicyAssociationResource_ != null) { - subBuilder = firewallPolicyAssociationResource_.toBuilder(); - } - firewallPolicyAssociationResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyAssociation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyAssociationResource_); - firewallPolicyAssociationResource_ = subBuilder.buildPartial(); - } - - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddAssociationFirewallPolicyRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -401,7 +324,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -432,7 +355,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -458,7 +381,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -588,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddAssociationFirewallPolicyRequest.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 +645,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,19 +660,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddAssociationFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1676329920: + { + replaceExistingAssociation_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 1676329920 + case 2076369362: + { + input.readMessage( + getFirewallPolicyAssociationResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2076369362 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.AddAssociationFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1301,7 +1255,18 @@ public AddAssociationFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddAssociationFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationNetworkFirewallPolicyRequest.java index ebbe33f4c330..ecd360c06d49 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationNetworkFirewallPolicyRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddAssociationNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1676329920: - { - bitField0_ |= 0x00000001; - replaceExistingAssociation_ = input.readBool(); - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2076369362: - { - com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder subBuilder = null; - if (firewallPolicyAssociationResource_ != null) { - subBuilder = firewallPolicyAssociationResource_.toBuilder(); - } - firewallPolicyAssociationResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyAssociation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyAssociationResource_); - firewallPolicyAssociationResource_ = subBuilder.buildPartial(); - } - - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddAssociationNetworkFirewallPolicyRequest_descriptor; @@ -440,7 +356,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -468,7 +384,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -500,7 +416,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -528,7 +444,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -660,17 +576,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AddAssociationNetworkFirewallPolicyRequest.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 @@ -811,7 +720,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -826,19 +735,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddAssociationNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1676329920: + { + replaceExistingAssociation_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 1676329920 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2076369362: + { + input.readMessage( + getFirewallPolicyAssociationResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2076369362 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.AddAssociationNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1500,7 +1453,19 @@ public AddAssociationNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddAssociationNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationRegionNetworkFirewallPolicyRequest.java index 308eb6fe3307..3f8315d0f417 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddAssociationRegionNetworkFirewallPolicyRequest.java @@ -57,97 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddAssociationRegionNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1676329920: - { - bitField0_ |= 0x00000001; - replaceExistingAssociation_ = input.readBool(); - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2076369362: - { - com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder subBuilder = null; - if (firewallPolicyAssociationResource_ != null) { - subBuilder = firewallPolicyAssociationResource_.toBuilder(); - } - firewallPolicyAssociationResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyAssociation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyAssociationResource_); - firewallPolicyAssociationResource_ = subBuilder.buildPartial(); - } - - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddAssociationRegionNetworkFirewallPolicyRequest_descriptor; @@ -505,7 +414,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -536,7 +445,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -570,7 +479,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -600,7 +509,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -738,17 +647,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest.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 @@ -898,7 +800,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -913,20 +815,69 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1676329920: + { + replaceExistingAssociation_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 1676329920 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2076369362: + { + input.readMessage( + getFirewallPolicyAssociationResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2076369362 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.AddAssociationRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1706,7 +1657,19 @@ public AddAssociationRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddAssociationRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddHealthCheckTargetPoolRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddHealthCheckTargetPoolRequest.java index 7bc80003639b..0a7691464701 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddHealthCheckTargetPoolRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddHealthCheckTargetPoolRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddHealthCheckTargetPoolRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 502370386: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetPool_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2138379998: - { - com.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequest.Builder subBuilder = - null; - if (targetPoolsAddHealthCheckRequestResource_ != null) { - subBuilder = targetPoolsAddHealthCheckRequestResource_.toBuilder(); - } - targetPoolsAddHealthCheckRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetPoolsAddHealthCheckRequestResource_); - targetPoolsAddHealthCheckRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddHealthCheckTargetPoolRequest_descriptor; @@ -463,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetPoolsAddHealthCheckRequestResource_ != null) { output.writeMessage(269573412, getTargetPoolsAddHealthCheckRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +403,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 269573412, getTargetPoolsAddHealthCheckRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTargetPoolsAddHealthCheckRequestResource() .equals(other.getTargetPoolsAddHealthCheckRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +457,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_POOLS_ADD_HEALTH_CHECK_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetPoolsAddHealthCheckRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddHealthCheckTargetPoolRequest.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 @@ -818,7 +725,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddHealthCheckTargetPoolReq mergeTargetPoolsAddHealthCheckRequestResource( other.getTargetPoolsAddHealthCheckRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -833,18 +740,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddHealthCheckTargetPoolRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 502370386: + { + targetPool_ = input.readStringRequireUtf8(); + + break; + } // case 502370386 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2138379998: + { + input.readMessage( + getTargetPoolsAddHealthCheckRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2138379998 + 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.compute.v1.AddHealthCheckTargetPoolRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1552,7 +1504,18 @@ public AddHealthCheckTargetPoolRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddHealthCheckTargetPoolRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddInstanceTargetPoolRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddInstanceTargetPoolRequest.java index 20b2ac5ec57c..3d56b27cdfb8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddInstanceTargetPoolRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddInstanceTargetPoolRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddInstanceTargetPoolRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 502370386: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetPool_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -864596062: - { - com.google.cloud.compute.v1.TargetPoolsAddInstanceRequest.Builder subBuilder = null; - if (targetPoolsAddInstanceRequestResource_ != null) { - subBuilder = targetPoolsAddInstanceRequestResource_.toBuilder(); - } - targetPoolsAddInstanceRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetPoolsAddInstanceRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetPoolsAddInstanceRequestResource_); - targetPoolsAddInstanceRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddInstanceTargetPoolRequest_descriptor; @@ -461,7 +376,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetPoolsAddInstanceRequestResource_ != null) { output.writeMessage(428796404, getTargetPoolsAddInstanceRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +402,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 428796404, getTargetPoolsAddInstanceRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -516,7 +431,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTargetPoolsAddInstanceRequestResource() .equals(other.getTargetPoolsAddInstanceRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -541,7 +456,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_POOLS_ADD_INSTANCE_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetPoolsAddInstanceRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -671,17 +586,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddInstanceTargetPoolRequest.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 @@ -815,7 +723,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddInstanceTargetPoolReques mergeTargetPoolsAddInstanceRequestResource( other.getTargetPoolsAddInstanceRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -830,18 +738,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddInstanceTargetPoolRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 502370386: + { + targetPool_ = input.readStringRequireUtf8(); + + break; + } // case 502370386 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -864596062: + { + input.readMessage( + getTargetPoolsAddInstanceRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -864596062 + 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.compute.v1.AddInstanceTargetPoolRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1549,7 +1502,18 @@ public AddInstanceTargetPoolRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddInstanceTargetPoolRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddInstancesInstanceGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddInstancesInstanceGroupRequest.java index 9332911072e8..6088c437edda 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddInstancesInstanceGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddInstancesInstanceGroupRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddInstancesInstanceGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 648762026: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroup_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -665261326: - { - com.google.cloud.compute.v1.InstanceGroupsAddInstancesRequest.Builder subBuilder = - null; - if (instanceGroupsAddInstancesRequestResource_ != null) { - subBuilder = instanceGroupsAddInstancesRequestResource_.toBuilder(); - } - instanceGroupsAddInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupsAddInstancesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupsAddInstancesRequestResource_); - instanceGroupsAddInstancesRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddInstancesInstanceGroupRequest_descriptor; @@ -463,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupsAddInstancesRequestResource_ != null) { output.writeMessage(453713246, getInstanceGroupsAddInstancesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +403,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 453713246, getInstanceGroupsAddInstancesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +457,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddInstancesInstanceGroupRequest.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 @@ -820,7 +727,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddInstancesInstanceGroupRe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -835,18 +742,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddInstancesInstanceGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 648762026: + { + instanceGroup_ = input.readStringRequireUtf8(); + + break; + } // case 648762026 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -665261326: + { + input.readMessage( + getInstanceGroupsAddInstancesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -665261326 + 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.compute.v1.AddInstancesInstanceGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1555,7 +1507,18 @@ public AddInstancesInstanceGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddInstancesInstanceGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddNodesNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddNodesNodeGroupRequest.java index de1368f2a92b..538545df7f0d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddNodesNodeGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddNodesNodeGroupRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddNodesNodeGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1050106306: - { - com.google.cloud.compute.v1.NodeGroupsAddNodesRequest.Builder subBuilder = null; - if (nodeGroupsAddNodesRequestResource_ != null) { - subBuilder = nodeGroupsAddNodesRequestResource_.toBuilder(); - } - nodeGroupsAddNodesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.NodeGroupsAddNodesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(nodeGroupsAddNodesRequestResource_); - nodeGroupsAddNodesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -535302126: - { - java.lang.String s = input.readStringRequireUtf8(); - - nodeGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddNodesNodeGroupRequest_descriptor; @@ -460,7 +375,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 469958146, nodeGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +401,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(469958146, nodeGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -515,7 +430,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -540,7 +455,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -669,17 +584,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddNodesNodeGroupRequest.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 @@ -812,7 +720,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddNodesNodeGroupRequest ot zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -827,18 +735,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddNodesNodeGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1050106306: + { + input.readMessage( + getNodeGroupsAddNodesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1050106306 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -535302126: + { + nodeGroup_ = input.readStringRequireUtf8(); + + break; + } // case -535302126 + 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.compute.v1.AddNodesNodeGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1546,7 +1499,18 @@ public AddNodesNodeGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddNodesNodeGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddPeeringNetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddPeeringNetworkRequest.java index 1ce0015b4529..a6709896aa8b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddPeeringNetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddPeeringNetworkRequest.java @@ -54,84 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddPeeringNetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = s; - break; - } - case -1184483926: - { - com.google.cloud.compute.v1.NetworksAddPeeringRequest.Builder subBuilder = null; - if (networksAddPeeringRequestResource_ != null) { - subBuilder = networksAddPeeringRequestResource_.toBuilder(); - } - networksAddPeeringRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworksAddPeeringRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networksAddPeeringRequestResource_); - networksAddPeeringRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddPeeringNetworkRequest_descriptor; @@ -396,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (networksAddPeeringRequestResource_ != null) { output.writeMessage(388810421, getNetworksAddPeeringRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -419,7 +341,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 388810421, getNetworksAddPeeringRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -470,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddPeeringNetworkRequest.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 @@ -735,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddPeeringNetworkRequest ot requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -750,18 +665,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddPeeringNetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 1862979954 + case -1184483926: + { + input.readMessage( + getNetworksAddPeeringRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1184483926 + 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.compute.v1.AddPeeringNetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1353,7 +1307,18 @@ public AddPeeringNetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddPeeringNetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesDiskRequest.java index 75c3b7dde1e9..9356ebd4d50f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesDiskRequest.java @@ -56,91 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddResourcePoliciesDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -323100390: - { - com.google.cloud.compute.v1.DisksAddResourcePoliciesRequest.Builder subBuilder = null; - if (disksAddResourcePoliciesRequestResource_ != null) { - subBuilder = disksAddResourcePoliciesRequestResource_.toBuilder(); - } - disksAddResourcePoliciesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.DisksAddResourcePoliciesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(disksAddResourcePoliciesRequestResource_); - disksAddResourcePoliciesRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddResourcePoliciesDiskRequest_descriptor; @@ -462,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disksAddResourcePoliciesRequestResource_ != null) { output.writeMessage(496483363, getDisksAddResourcePoliciesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -488,7 +403,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 496483363, getDisksAddResourcePoliciesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -517,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -542,7 +457,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -672,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddResourcePoliciesDiskRequest.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 @@ -816,7 +724,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddResourcePoliciesDiskRequ zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -831,18 +739,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddResourcePoliciesDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -323100390: + { + input.readMessage( + getDisksAddResourcePoliciesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -323100390 + 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.compute.v1.AddResourcePoliciesDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1550,7 +1503,18 @@ public AddResourcePoliciesDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddResourcePoliciesDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesInstanceRequest.java index b49c954bf2aa..9fe48900c292 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesInstanceRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddResourcePoliciesInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -380151590: - { - com.google.cloud.compute.v1.InstancesAddResourcePoliciesRequest.Builder subBuilder = - null; - if (instancesAddResourcePoliciesRequestResource_ != null) { - subBuilder = instancesAddResourcePoliciesRequestResource_.toBuilder(); - } - instancesAddResourcePoliciesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstancesAddResourcePoliciesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instancesAddResourcePoliciesRequestResource_); - instancesAddResourcePoliciesRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddResourcePoliciesInstanceRequest_descriptor; @@ -463,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instancesAddResourcePoliciesRequestResource_ != null) { output.writeMessage(489351963, getInstancesAddResourcePoliciesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +403,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 489351963, getInstancesAddResourcePoliciesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +457,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest.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 @@ -820,7 +727,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddResourcePoliciesInstance zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -835,19 +742,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddResourcePoliciesInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -380151590: + { + input.readMessage( + getInstancesAddResourcePoliciesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -380151590 + 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.compute.v1.AddResourcePoliciesInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1559,7 +1510,18 @@ public AddResourcePoliciesInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddResourcePoliciesInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesRegionDiskRequest.java index 2270668230b3..5e41248f7b80 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddResourcePoliciesRegionDiskRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddResourcePoliciesRegionDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2021393294: - { - com.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequest.Builder subBuilder = - null; - if (regionDisksAddResourcePoliciesRequestResource_ != null) { - subBuilder = regionDisksAddResourcePoliciesRequestResource_.toBuilder(); - } - regionDisksAddResourcePoliciesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionDisksAddResourcePoliciesRequestResource_); - regionDisksAddResourcePoliciesRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddResourcePoliciesRegionDiskRequest_descriptor; @@ -465,7 +379,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionDisksAddResourcePoliciesRequestResource_ != null) { output.writeMessage(284196750, getRegionDisksAddResourcePoliciesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -491,7 +405,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 284196750, getRegionDisksAddResourcePoliciesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -520,7 +434,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -545,7 +459,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -675,17 +589,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest.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 @@ -823,7 +730,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -838,19 +745,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddResourcePoliciesRegionDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2021393294: + { + input.readMessage( + getRegionDisksAddResourcePoliciesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2021393294 + 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.compute.v1.AddResourcePoliciesRegionDiskRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1562,7 +1513,18 @@ public AddResourcePoliciesRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddResourcePoliciesRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleFirewallPolicyRequest.java index afd1b62d38d4..6797787f1d6f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleFirewallPolicyRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddRuleFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 2004188186: - { - com.google.cloud.compute.v1.FirewallPolicyRule.Builder subBuilder = null; - if (firewallPolicyRuleResource_ != null) { - subBuilder = firewallPolicyRuleResource_.toBuilder(); - } - firewallPolicyRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyRuleResource_); - firewallPolicyRuleResource_ = subBuilder.buildPartial(); - } - - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddRuleFirewallPolicyRequest_descriptor; @@ -330,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -350,7 +280,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -376,7 +306,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +327,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -527,17 +457,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddRuleFirewallPolicyRequest.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 @@ -655,7 +578,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddRuleFirewallPolicyReques requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -670,18 +593,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddRuleFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 2004188186: + { + input.readMessage( + getFirewallPolicyRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 2004188186 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.AddRuleFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1153,7 +1108,18 @@ public AddRuleFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddRuleFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleNetworkFirewallPolicyRequest.java index 38e9f7d3f460..bd4834245cbe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleNetworkFirewallPolicyRequest.java @@ -56,95 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddRuleNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2004188186: - { - com.google.cloud.compute.v1.FirewallPolicyRule.Builder subBuilder = null; - if (firewallPolicyRuleResource_ != null) { - subBuilder = firewallPolicyRuleResource_.toBuilder(); - } - firewallPolicyRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyRuleResource_); - firewallPolicyRuleResource_ = subBuilder.buildPartial(); - } - - break; - } - case 2137524104: - { - bitField0_ |= 0x00000002; - minPriority_ = input.readInt32(); - break; - } - case -1657884424: - { - bitField0_ |= 0x00000001; - maxPriority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddRuleNetworkFirewallPolicyRequest_descriptor; @@ -480,7 +391,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -509,7 +420,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -544,7 +455,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -575,7 +486,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -705,17 +616,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddRuleNetworkFirewallPolicyRequest.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 @@ -861,7 +765,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -876,19 +780,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddRuleNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2004188186: + { + input.readMessage( + getFirewallPolicyRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 2004188186 + case 2137524104: + { + minPriority_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 2137524104 + case -1657884424: + { + maxPriority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -1657884424 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.AddRuleNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1612,7 +1565,18 @@ public AddRuleNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddRuleNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleRegionNetworkFirewallPolicyRequest.java index c3efe7808007..749f215faa68 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleRegionNetworkFirewallPolicyRequest.java @@ -57,102 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddRuleRegionNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2004188186: - { - com.google.cloud.compute.v1.FirewallPolicyRule.Builder subBuilder = null; - if (firewallPolicyRuleResource_ != null) { - subBuilder = firewallPolicyRuleResource_.toBuilder(); - } - firewallPolicyRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyRuleResource_); - firewallPolicyRuleResource_ = subBuilder.buildPartial(); - } - - break; - } - case 2137524104: - { - bitField0_ |= 0x00000002; - minPriority_ = input.readInt32(); - break; - } - case -1657884424: - { - bitField0_ |= 0x00000001; - maxPriority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddRuleRegionNetworkFirewallPolicyRequest_descriptor; @@ -544,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -576,7 +480,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -612,7 +516,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -645,7 +549,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -777,17 +681,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest.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 @@ -942,7 +839,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -957,19 +854,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2004188186: + { + input.readMessage( + getFirewallPolicyRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 2004188186 + case 2137524104: + { + minPriority_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 2137524104 + case -1657884424: + { + maxPriority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -1657884424 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.AddRuleRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1810,7 +1762,19 @@ public AddRuleRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddRuleRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleSecurityPolicyRequest.java index 30147191c7bf..0bb83b7ae17e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddRuleSecurityPolicyRequest.java @@ -53,82 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddRuleSecurityPolicyRequest( - 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 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - - securityPolicy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1941957032: - { - bitField0_ |= 0x00000001; - validateOnly_ = input.readBool(); - break; - } - case -1073419750: - { - com.google.cloud.compute.v1.SecurityPolicyRule.Builder subBuilder = null; - if (securityPolicyRuleResource_ != null) { - subBuilder = securityPolicyRuleResource_.toBuilder(); - } - securityPolicyRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityPolicyRuleResource_); - securityPolicyRuleResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddRuleSecurityPolicyRequest_descriptor; @@ -361,7 +285,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (securityPolicyRuleResource_ != null) { output.writeMessage(402693443, getSecurityPolicyRuleResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -384,7 +308,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 402693443, getSecurityPolicyRuleResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -411,7 +335,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValidateOnly()) { if (getValidateOnly() != other.getValidateOnly()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -434,7 +358,7 @@ public int hashCode() { hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -564,17 +488,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddRuleSecurityPolicyRequest.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 @@ -697,7 +614,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddRuleSecurityPolicyReques if (other.hasValidateOnly()) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -712,18 +629,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddRuleSecurityPolicyRequest 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 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1368660106 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1941957032: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 1941957032 + case -1073419750: + { + input.readMessage( + getSecurityPolicyRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1073419750 + 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.compute.v1.AddRuleSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1258,7 +1213,18 @@ public AddRuleSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddRuleSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddSignedUrlKeyBackendBucketRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddSignedUrlKeyBackendBucketRequest.java index 1f7eeb2d1634..92b0f0b4b1eb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddSignedUrlKeyBackendBucketRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddSignedUrlKeyBackendBucketRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddSignedUrlKeyBackendBucketRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 733712298: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendBucket_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -633959414: - { - com.google.cloud.compute.v1.SignedUrlKey.Builder subBuilder = null; - if (signedUrlKeyResource_ != null) { - subBuilder = signedUrlKeyResource_.toBuilder(); - } - signedUrlKeyResource_ = - input.readMessage( - com.google.cloud.compute.v1.SignedUrlKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(signedUrlKeyResource_); - signedUrlKeyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddSignedUrlKeyBackendBucketRequest_descriptor; @@ -395,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (signedUrlKeyResource_ != null) { output.writeMessage(457625985, getSignedUrlKeyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -418,7 +341,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 457625985, getSignedUrlKeyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +367,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSignedUrlKeyResource()) { if (!getSignedUrlKeyResource().equals(other.getSignedUrlKeyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -467,7 +390,7 @@ public int hashCode() { hash = (37 * hash) + SIGNED_URL_KEY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSignedUrlKeyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -597,17 +520,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddSignedUrlKeyBackendBucketRequest.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 @@ -735,7 +651,7 @@ public Builder mergeFrom( if (other.hasSignedUrlKeyResource()) { mergeSignedUrlKeyResource(other.getSignedUrlKeyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -750,19 +666,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddSignedUrlKeyBackendBucketRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 733712298: + { + backendBucket_ = input.readStringRequireUtf8(); + + break; + } // case 733712298 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -633959414: + { + input.readMessage( + getSignedUrlKeyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -633959414 + 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.compute.v1.AddSignedUrlKeyBackendBucketRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1348,7 +1301,18 @@ public AddSignedUrlKeyBackendBucketRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddSignedUrlKeyBackendBucketRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddSignedUrlKeyBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddSignedUrlKeyBackendServiceRequest.java index 3399ca2a9aa6..0acd1fd34ccf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddSignedUrlKeyBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddSignedUrlKeyBackendServiceRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddSignedUrlKeyBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = s; - break; - } - case -633959414: - { - com.google.cloud.compute.v1.SignedUrlKey.Builder subBuilder = null; - if (signedUrlKeyResource_ != null) { - subBuilder = signedUrlKeyResource_.toBuilder(); - } - signedUrlKeyResource_ = - input.readMessage( - com.google.cloud.compute.v1.SignedUrlKey.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(signedUrlKeyResource_); - signedUrlKeyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddSignedUrlKeyBackendServiceRequest_descriptor; @@ -395,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (signedUrlKeyResource_ != null) { output.writeMessage(457625985, getSignedUrlKeyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -418,7 +341,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 457625985, getSignedUrlKeyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +367,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSignedUrlKeyResource()) { if (!getSignedUrlKeyResource().equals(other.getSignedUrlKeyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -467,7 +390,7 @@ public int hashCode() { hash = (37 * hash) + SIGNED_URL_KEY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSignedUrlKeyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -597,17 +520,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AddSignedUrlKeyBackendServiceRequest.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 @@ -735,7 +651,7 @@ public Builder mergeFrom( if (other.hasSignedUrlKeyResource()) { mergeSignedUrlKeyResource(other.getSignedUrlKeyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -750,19 +666,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddSignedUrlKeyBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + case -633959414: + { + input.readMessage( + getSignedUrlKeyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -633959414 + 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.compute.v1.AddSignedUrlKeyBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1348,7 +1301,18 @@ public AddSignedUrlKeyBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddSignedUrlKeyBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Address.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Address.java index 1cdb99392d0b..a4a37475c4a3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Address.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Address.java @@ -66,169 +66,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Address( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - creationTimestamp_ = s; - break; - } - case 892629058: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00010000) != 0)) { - users_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00010000; - } - users_.add(s); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - region_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - status_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - network_ = s; - break; - } - case 2114463018: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - addressType_ = s; - break; - } - case -1935290878: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - ipVersion_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - subnetwork_ = s; - break; - } - case -1763710734: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - purpose_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - description_ = s; - break; - } - case -666441320: - { - bitField0_ |= 0x00000400; - prefixLength_ = input.readInt32(); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - selfLink_ = s; - break; - } - case -591601758: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - address_ = s; - break; - } - case -155784550: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - networkTier_ = 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_ & 0x00010000) != 0)) { - users_ = users_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Address_descriptor; @@ -2311,7 +2148,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517397843, networkTier_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2377,7 +2214,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517397843, networkTier_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2457,7 +2294,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSubnetwork().equals(other.getSubnetwork())) return false; } if (!getUsersList().equals(other.getUsersList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2536,7 +2373,7 @@ public int hashCode() { hash = (37 * hash) + USERS_FIELD_NUMBER; hash = (53 * hash) + getUsersList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2664,17 +2501,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Address.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 @@ -2947,7 +2777,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Address other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2962,17 +2792,134 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Address 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 244202930 + case 892629058: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUsersIsMutable(); + users_.add(s); + break; + } // case 892629058 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 1111570338 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 1450082194 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 1862979954 + case 2114463018: + { + addressType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 2114463018 + case -1935290878: + { + ipVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -1935290878 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case -1832345742 + case -1763710734: + { + purpose_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -1763710734 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -666441320: + { + prefixLength_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case -666441320 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case -645248918 + case -591601758: + { + address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -591601758 + case -155784550: + { + networkTier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -155784550 + 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.compute.v1.Address) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5022,7 +4969,18 @@ public Address parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Address(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressAggregatedList.java index 644053e555f8..dfdd504111bd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddressAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.AddressesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddressAggregatedList_descriptor; @@ -704,7 +591,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -748,7 +635,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -786,7 +673,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -825,7 +712,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1153,7 +1040,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddressAggregatedList other if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1168,18 +1055,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddressAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.AddressesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.AddressAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2228,7 +2176,18 @@ public AddressAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddressAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressList.java index 495e247720a2..ca126d2a5435 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddressList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Address.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddressList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -823,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddressList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddressList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Address m = + input.readMessage( + com.google.cloud.compute.v1.Address.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.AddressList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2078,7 +2038,18 @@ public AddressList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddressList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressesScopedList.java index b662b325a8e4..257d11882d97 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AddressesScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddressesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1593582318: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - addresses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - addresses_.add( - input.readMessage( - com.google.cloud.compute.v1.Address.parser(), extensionRegistry)); - 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)) { - addresses_ = java.util.Collections.unmodifiableList(addresses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AddressesScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < addresses_.size(); i++) { output.writeMessage(337673122, addresses_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(337673122, addresses_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (addressesBuilder_ == null) { addresses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + addresses_ = null; addressesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AddressesScopedList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,17 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AddressesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1593582318: + { + com.google.cloud.compute.v1.Address m = + input.readMessage( + com.google.cloud.compute.v1.Address.parser(), extensionRegistry); + if (addressesBuilder_ == null) { + ensureAddressesIsMutable(); + addresses_.add(m); + } else { + addressesBuilder_.addMessage(m); + } + break; + } // case -1593582318 + 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.compute.v1.AddressesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1211,7 +1175,18 @@ public AddressesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddressesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AdvancedMachineFeatures.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AdvancedMachineFeatures.java index ef28d6466acc..5957272e04aa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AdvancedMachineFeatures.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AdvancedMachineFeatures.java @@ -50,70 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AdvancedMachineFeatures( - 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 133114920: - { - bitField0_ |= 0x00000001; - enableNestedVirtualization_ = input.readBool(); - break; - } - case 1545589472: - { - bitField0_ |= 0x00000008; - visibleCoreCount_ = input.readInt32(); - break; - } - case -1619081952: - { - bitField0_ |= 0x00000002; - enableUefiNetworking_ = input.readBool(); - break; - } - case -1474073928: - { - bitField0_ |= 0x00000004; - threadsPerCore_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AdvancedMachineFeatures_descriptor; @@ -288,7 +224,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeInt32(352611671, threadsPerCore_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -312,7 +248,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(352611671, threadsPerCore_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -344,7 +280,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVisibleCoreCount()) { if (getVisibleCoreCount() != other.getVisibleCoreCount()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -372,7 +308,7 @@ public int hashCode() { hash = (37 * hash) + VISIBLE_CORE_COUNT_FIELD_NUMBER; hash = (53 * hash) + getVisibleCoreCount(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -501,17 +437,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AdvancedMachineFeatures.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 @@ -633,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AdvancedMachineFeatures oth if (other.hasVisibleCoreCount()) { setVisibleCoreCount(other.getVisibleCoreCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,18 +577,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AdvancedMachineFeatures 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 133114920: + { + enableNestedVirtualization_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 133114920 + case 1545589472: + { + visibleCoreCount_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 1545589472 + case -1619081952: + { + enableUefiNetworking_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1619081952 + case -1474073928: + { + threadsPerCore_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case -1474073928 + 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.compute.v1.AdvancedMachineFeatures) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -965,7 +931,18 @@ public AdvancedMachineFeatures parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AdvancedMachineFeatures(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAcceleratorTypesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAcceleratorTypesRequest.java index 24f9bb706e47..7491702402b1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAcceleratorTypesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAcceleratorTypesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListAcceleratorTypesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListAcceleratorTypesRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListAcceleratorTypesRequest.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 @@ -941,7 +848,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -956,19 +863,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListAcceleratorTypesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListAcceleratorTypesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1675,7 +1636,18 @@ public AggregatedListAcceleratorTypesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListAcceleratorTypesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAddressesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAddressesRequest.java index f94aa8067e47..08045a3cc06a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAddressesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAddressesRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListAddressesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListAddressesRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListAddressesRequest.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 @@ -935,7 +842,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListAddressesRequ if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -950,18 +857,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListAddressesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListAddressesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1666,7 +1628,18 @@ public AggregatedListAddressesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListAddressesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAutoscalersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAutoscalersRequest.java index 08d09f0ded26..664802f6569e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAutoscalersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListAutoscalersRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListAutoscalersRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListAutoscalersRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListAutoscalersRequest.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 @@ -937,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListAutoscalersRe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -952,18 +859,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListAutoscalersRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListAutoscalersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1669,7 +1631,18 @@ public AggregatedListAutoscalersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListAutoscalersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListBackendServicesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListBackendServicesRequest.java index 181ef69e6115..98f18e0b37f3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListBackendServicesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListBackendServicesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListBackendServicesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListBackendServicesRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -773,17 +687,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListBackendServicesRequest.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 @@ -939,7 +846,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -954,19 +861,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListBackendServicesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListBackendServicesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1673,7 +1634,18 @@ public AggregatedListBackendServicesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListBackendServicesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListDiskTypesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListDiskTypesRequest.java index ecb44ad1f96c..4b61390c8f29 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListDiskTypesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListDiskTypesRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListDiskTypesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListDiskTypesRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListDiskTypesRequest.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 @@ -935,7 +842,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListDiskTypesRequ if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -950,18 +857,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListDiskTypesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListDiskTypesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1666,7 +1628,18 @@ public AggregatedListDiskTypesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListDiskTypesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListDisksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListDisksRequest.java index 18cb8544894d..e563131a5344 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListDisksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListDisksRequest.java @@ -55,92 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListDisksRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListDisksRequest_descriptor; @@ -532,7 +446,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -563,7 +477,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -604,7 +518,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -641,7 +555,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -771,17 +685,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListDisksRequest.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 @@ -934,7 +841,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListDisksRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -949,18 +856,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListDisksRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListDisksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1665,7 +1627,18 @@ public AggregatedListDisksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListDisksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListForwardingRulesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListForwardingRulesRequest.java index ec7a8a6410b2..f7877bae934f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListForwardingRulesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListForwardingRulesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListForwardingRulesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListForwardingRulesRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -773,17 +687,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListForwardingRulesRequest.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 @@ -939,7 +846,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -954,19 +861,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListForwardingRulesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListForwardingRulesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1673,7 +1634,18 @@ public AggregatedListForwardingRulesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListForwardingRulesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListGlobalOperationsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListGlobalOperationsRequest.java index 67224d03deda..fc87e19c4a50 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListGlobalOperationsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListGlobalOperationsRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListGlobalOperationsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListGlobalOperationsRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListGlobalOperationsRequest.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 @@ -941,7 +848,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -956,19 +863,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListGlobalOperationsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListGlobalOperationsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1675,7 +1636,18 @@ public AggregatedListGlobalOperationsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListGlobalOperationsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListHealthChecksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListHealthChecksRequest.java index cb2769d62330..816b3d5eac54 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListHealthChecksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListHealthChecksRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListHealthChecksRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListHealthChecksRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListHealthChecksRequest.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 @@ -937,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListHealthChecksR if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -952,19 +859,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListHealthChecksRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListHealthChecksRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1670,7 +1631,18 @@ public AggregatedListHealthChecksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListHealthChecksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupManagersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupManagersRequest.java index c3b8cfadbedf..cba2d16800fa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupManagersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupManagersRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListInstanceGroupManagersRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListInstanceGroupManagersRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListInstanceGroupManagersRequest.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 @@ -944,7 +851,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,19 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListInstanceGroupManagersRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListInstanceGroupManagersRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1679,7 +1640,19 @@ public AggregatedListInstanceGroupManagersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListInstanceGroupManagersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupsRequest.java index d2386bd7a6b8..f439b78c3427 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstanceGroupsRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListInstanceGroupsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListInstanceGroupsRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -773,17 +687,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListInstanceGroupsRequest.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 @@ -939,7 +846,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -954,19 +861,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListInstanceGroupsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListInstanceGroupsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1673,7 +1634,18 @@ public AggregatedListInstanceGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListInstanceGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstancesRequest.java index af76c32ab8d5..dd8ee68cfe38 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInstancesRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListInstancesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListInstancesRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListInstancesRequest.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 @@ -935,7 +842,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListInstancesRequ if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -950,18 +857,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListInstancesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListInstancesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1666,7 +1628,18 @@ public AggregatedListInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInterconnectAttachmentsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInterconnectAttachmentsRequest.java index c57a58f7e48b..dc3235df7c55 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInterconnectAttachmentsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListInterconnectAttachmentsRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListInterconnectAttachmentsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListInterconnectAttachmentsRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -607,7 +521,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -644,7 +558,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -777,17 +691,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListInterconnectAttachmentsRequest.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 @@ -947,7 +854,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -962,19 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListInterconnectAttachmentsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListInterconnectAttachmentsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1683,7 +1644,19 @@ public AggregatedListInterconnectAttachmentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListInterconnectAttachmentsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListMachineTypesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListMachineTypesRequest.java index 95796902f5dd..b288feba14e4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListMachineTypesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListMachineTypesRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListMachineTypesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListMachineTypesRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListMachineTypesRequest.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 @@ -937,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListMachineTypesR if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -952,19 +859,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListMachineTypesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListMachineTypesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1670,7 +1631,18 @@ public AggregatedListMachineTypesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListMachineTypesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEdgeSecurityServicesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEdgeSecurityServicesRequest.java index 7feb48db7d68..e46e8ef4e620 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEdgeSecurityServicesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEdgeSecurityServicesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListNetworkEdgeSecurityServicesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListNetworkEdgeSecurityServicesRequest_descriptor; @@ -535,7 +449,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -566,7 +480,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -608,7 +522,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -645,7 +559,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListNetworkEdgeSecurityServicesRequest.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 @@ -954,7 +861,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -969,20 +876,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListNetworkEdgeSecurityServicesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListNetworkEdgeSecurityServicesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1692,7 +1652,19 @@ public AggregatedListNetworkEdgeSecurityServicesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListNetworkEdgeSecurityServicesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsRequest.java index ea7eae035ffd..2dbbf6c271e8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNetworkEndpointGroupsRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListNetworkEndpointGroupsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListNetworkEndpointGroupsRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListNetworkEndpointGroupsRequest.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 @@ -944,7 +851,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,19 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListNetworkEndpointGroupsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListNetworkEndpointGroupsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1679,7 +1640,19 @@ public AggregatedListNetworkEndpointGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListNetworkEndpointGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeGroupsRequest.java index 5d96f354fdd7..1214b65d5a55 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeGroupsRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListNodeGroupsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListNodeGroupsRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListNodeGroupsRequest.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 @@ -935,7 +842,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListNodeGroupsReq if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -950,18 +857,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListNodeGroupsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListNodeGroupsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1666,7 +1628,18 @@ public AggregatedListNodeGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListNodeGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTemplatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTemplatesRequest.java index 2d652217e582..17be3d382baf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTemplatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTemplatesRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListNodeTemplatesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListNodeTemplatesRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListNodeTemplatesRequest.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 @@ -937,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListNodeTemplates if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -952,19 +859,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListNodeTemplatesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListNodeTemplatesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1671,7 +1632,18 @@ public AggregatedListNodeTemplatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListNodeTemplatesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTypesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTypesRequest.java index c1927a1d44a1..504e3dd627ff 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTypesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListNodeTypesRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListNodeTypesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListNodeTypesRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListNodeTypesRequest.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 @@ -935,7 +842,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListNodeTypesRequ if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -950,18 +857,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListNodeTypesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListNodeTypesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1666,7 +1628,18 @@ public AggregatedListNodeTypesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListNodeTypesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListPacketMirroringsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListPacketMirroringsRequest.java index 78cb78d5ee65..fa2d7a618528 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListPacketMirroringsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListPacketMirroringsRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListPacketMirroringsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListPacketMirroringsRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListPacketMirroringsRequest.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 @@ -941,7 +848,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -956,19 +863,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListPacketMirroringsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListPacketMirroringsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1675,7 +1636,18 @@ public AggregatedListPacketMirroringsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListPacketMirroringsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListPublicDelegatedPrefixesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListPublicDelegatedPrefixesRequest.java index e1b34ac0cfd0..771ab8587051 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListPublicDelegatedPrefixesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListPublicDelegatedPrefixesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListPublicDelegatedPrefixesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListPublicDelegatedPrefixesRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -607,7 +521,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -644,7 +558,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -777,17 +691,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListPublicDelegatedPrefixesRequest.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 @@ -947,7 +854,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -962,19 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListPublicDelegatedPrefixesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListPublicDelegatedPrefixesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1683,7 +1644,19 @@ public AggregatedListPublicDelegatedPrefixesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListPublicDelegatedPrefixesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListRegionCommitmentsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListRegionCommitmentsRequest.java index c912a8774924..44b3e8404125 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListRegionCommitmentsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListRegionCommitmentsRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListRegionCommitmentsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListRegionCommitmentsRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListRegionCommitmentsRequest.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 @@ -943,7 +850,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -958,19 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListRegionCommitmentsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListRegionCommitmentsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1677,7 +1638,18 @@ public AggregatedListRegionCommitmentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListRegionCommitmentsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListReservationsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListReservationsRequest.java index 6be4d329b06a..383661aef7d3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListReservationsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListReservationsRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListReservationsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListReservationsRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListReservationsRequest.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 @@ -937,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListReservationsR if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -952,19 +859,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListReservationsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListReservationsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1670,7 +1631,18 @@ public AggregatedListReservationsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListReservationsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListResourcePoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListResourcePoliciesRequest.java index 2d83ffb6a3e2..2b905d2fbe33 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListResourcePoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListResourcePoliciesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListResourcePoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListResourcePoliciesRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListResourcePoliciesRequest.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 @@ -941,7 +848,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -956,19 +863,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListResourcePoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListResourcePoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1675,7 +1636,18 @@ public AggregatedListResourcePoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListResourcePoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListRoutersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListRoutersRequest.java index cc382a10ce70..7d1fa8968d7f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListRoutersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListRoutersRequest.java @@ -55,92 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListRoutersRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListRoutersRequest_descriptor; @@ -532,7 +446,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -563,7 +477,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -604,7 +518,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -641,7 +555,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -771,17 +685,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListRoutersRequest.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 @@ -934,7 +841,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListRoutersReques if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -949,18 +856,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListRoutersRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListRoutersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1665,7 +1627,18 @@ public AggregatedListRoutersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListRoutersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSecurityPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSecurityPoliciesRequest.java index 98ddac976fad..eab746827c23 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSecurityPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSecurityPoliciesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListSecurityPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListSecurityPoliciesRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListSecurityPoliciesRequest.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 @@ -941,7 +848,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -956,19 +863,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListSecurityPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListSecurityPoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1675,7 +1636,18 @@ public AggregatedListSecurityPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListSecurityPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListServiceAttachmentsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListServiceAttachmentsRequest.java index c9b1a13d5433..ac96bdbd728c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListServiceAttachmentsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListServiceAttachmentsRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListServiceAttachmentsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListServiceAttachmentsRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListServiceAttachmentsRequest.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 @@ -943,7 +850,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -958,19 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListServiceAttachmentsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListServiceAttachmentsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1677,7 +1638,18 @@ public AggregatedListServiceAttachmentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListServiceAttachmentsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSslCertificatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSslCertificatesRequest.java index 9971367af1d7..d18902f00f63 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSslCertificatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSslCertificatesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListSslCertificatesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListSslCertificatesRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -773,17 +687,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListSslCertificatesRequest.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 @@ -939,7 +846,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -954,19 +861,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListSslCertificatesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListSslCertificatesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1673,7 +1634,18 @@ public AggregatedListSslCertificatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListSslCertificatesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSslPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSslPoliciesRequest.java index de2221d40982..f3ff88c9099b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSslPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSslPoliciesRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListSslPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListSslPoliciesRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListSslPoliciesRequest.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 @@ -937,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListSslPoliciesRe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -952,18 +859,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListSslPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListSslPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1669,7 +1631,18 @@ public AggregatedListSslPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListSslPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSubnetworksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSubnetworksRequest.java index 8b53e3bceed4..6d4bbae47c65 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSubnetworksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListSubnetworksRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListSubnetworksRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListSubnetworksRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListSubnetworksRequest.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 @@ -937,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListSubnetworksRe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -952,18 +859,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListSubnetworksRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListSubnetworksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1669,7 +1631,18 @@ public AggregatedListSubnetworksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListSubnetworksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpProxiesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpProxiesRequest.java index 9c204c5fa81a..12eb09c26bf2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpProxiesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpProxiesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListTargetHttpProxiesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListTargetHttpProxiesRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListTargetHttpProxiesRequest.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 @@ -943,7 +850,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -958,19 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListTargetHttpProxiesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListTargetHttpProxiesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1677,7 +1638,18 @@ public AggregatedListTargetHttpProxiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListTargetHttpProxiesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpsProxiesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpsProxiesRequest.java index 981f38cc5ebe..39796b5eda5f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpsProxiesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetHttpsProxiesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListTargetHttpsProxiesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListTargetHttpsProxiesRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListTargetHttpsProxiesRequest.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 @@ -943,7 +850,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -958,19 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListTargetHttpsProxiesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListTargetHttpsProxiesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1677,7 +1638,18 @@ public AggregatedListTargetHttpsProxiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListTargetHttpsProxiesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetInstancesRequest.java index 812b0e366a4d..9a76ee6e9a5d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetInstancesRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListTargetInstancesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListTargetInstancesRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -773,17 +687,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListTargetInstancesRequest.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 @@ -939,7 +846,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -954,19 +861,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListTargetInstancesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListTargetInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1673,7 +1634,18 @@ public AggregatedListTargetInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListTargetInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetPoolsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetPoolsRequest.java index e60974b37d0c..63d051fc4297 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetPoolsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetPoolsRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListTargetPoolsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListTargetPoolsRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListTargetPoolsRequest.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 @@ -937,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListTargetPoolsRe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -952,18 +859,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListTargetPoolsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListTargetPoolsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1669,7 +1631,18 @@ public AggregatedListTargetPoolsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListTargetPoolsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetVpnGatewaysRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetVpnGatewaysRequest.java index 9f46d6467205..2387fd0e46da 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetVpnGatewaysRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListTargetVpnGatewaysRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListTargetVpnGatewaysRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListTargetVpnGatewaysRequest_descriptor; @@ -534,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -565,7 +479,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +520,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -643,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -775,17 +689,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AggregatedListTargetVpnGatewaysRequest.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 @@ -943,7 +850,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -958,19 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListTargetVpnGatewaysRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListTargetVpnGatewaysRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1677,7 +1638,18 @@ public AggregatedListTargetVpnGatewaysRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListTargetVpnGatewaysRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListUrlMapsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListUrlMapsRequest.java index a65afd58cd28..fb0eafb6da5e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListUrlMapsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListUrlMapsRequest.java @@ -55,92 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListUrlMapsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListUrlMapsRequest_descriptor; @@ -532,7 +446,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -563,7 +477,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -604,7 +518,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -641,7 +555,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -771,17 +685,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListUrlMapsRequest.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 @@ -934,7 +841,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListUrlMapsReques if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -949,18 +856,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListUrlMapsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListUrlMapsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1665,7 +1627,18 @@ public AggregatedListUrlMapsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListUrlMapsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnGatewaysRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnGatewaysRequest.java index a6927e6612cb..43f362136d3c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnGatewaysRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnGatewaysRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListVpnGatewaysRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListVpnGatewaysRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListVpnGatewaysRequest.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 @@ -937,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListVpnGatewaysRe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -952,18 +859,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListVpnGatewaysRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListVpnGatewaysRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1669,7 +1631,18 @@ public AggregatedListVpnGatewaysRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListVpnGatewaysRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnTunnelsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnTunnelsRequest.java index 261b8ee92b02..55a4317d458f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnTunnelsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AggregatedListVpnTunnelsRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AggregatedListVpnTunnelsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1164343392: - { - bitField0_ |= 0x00000002; - includeAllScopes_ = input.readBool(); - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AggregatedListVpnTunnelsRequest_descriptor; @@ -533,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -564,7 +478,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -605,7 +519,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -642,7 +556,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -772,17 +686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AggregatedListVpnTunnelsRequest.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 @@ -935,7 +842,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AggregatedListVpnTunnelsReq if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -950,18 +857,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AggregatedListVpnTunnelsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1164343392: + { + includeAllScopes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1164343392 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.AggregatedListVpnTunnelsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1666,7 +1628,18 @@ public AggregatedListVpnTunnelsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AggregatedListVpnTunnelsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AliasIpRange.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AliasIpRange.java index bf81809f4f07..2a4b454f7b27 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AliasIpRange.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AliasIpRange.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AliasIpRange( - 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 784938578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - ipCidrRange_ = s; - break; - } - case -1190999566: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - subnetworkRangeName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AliasIpRange_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 387995966, subnetworkRangeName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +233,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(387995966, subnetworkRangeName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSubnetworkRangeName()) { if (!getSubnetworkRangeName().equals(other.getSubnetworkRangeName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +275,7 @@ public int hashCode() { hash = (37 * hash) + SUBNETWORK_RANGE_NAME_FIELD_NUMBER; hash = (53 * hash) + getSubnetworkRangeName().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AliasIpRange.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 @@ -575,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AliasIpRange other) { subnetworkRangeName_ = other.subnetworkRangeName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,17 +529,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AliasIpRange 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 784938578: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 784938578 + case -1190999566: + { + subnetworkRangeName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1190999566 + 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.compute.v1.AliasIpRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -878,7 +843,18 @@ public AliasIpRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AliasIpRange(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk.java index 6601d6d6f3ae..508ec5eda0a6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk( - 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 -1764857416: - { - bitField0_ |= 0x00000001; - diskSizeGb_ = input.readInt64(); - break; - } - case -273978934: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - interface_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk_descriptor; @@ -376,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 502623545, interface_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -391,7 +338,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(502623545, interface_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -422,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInterface()) { if (!getInterface().equals(other.getInterface())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -441,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + INTERFACE_FIELD_NUMBER; hash = (53 * hash) + getInterface().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +543,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk.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 @@ -736,7 +676,7 @@ public Builder mergeFrom( interface_ = other.interface_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -751,22 +691,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1 - .AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk - 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 -1764857416: + { + diskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case -1764857416 + case -273978934: + { + interface_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -273978934 + 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.compute.v1 - .AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1007,8 +968,19 @@ public final Builder mergeUnknownFields( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUAllocationReservedInstanceProperties.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUAllocationReservedInstanceProperties.java index 73db6b021417..ae89b5793212 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUAllocationReservedInstanceProperties.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUAllocationReservedInstanceProperties.java @@ -59,102 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AllocationSpecificSKUAllocationReservedInstanceProperties( - 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 1821688210: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - machineType_ = s; - break; - } - case 1839610394: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - localSsds_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk>(); - mutable_bitField0_ |= 0x00000002; - } - localSsds_.add( - input.readMessage( - com.google.cloud.compute.v1 - .AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk - .parser(), - extensionRegistry)); - break; - } - case 1943302074: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - minCpuPlatform_ = s; - break; - } - case -1490811254: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - locationHint_ = s; - break; - } - case -586206342: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - guestAccelerators_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - guestAccelerators_.add( - input.readMessage( - com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry)); - 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_ & 0x00000002) != 0)) { - localSsds_ = java.util.Collections.unmodifiableList(localSsds_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - guestAccelerators_ = java.util.Collections.unmodifiableList(guestAccelerators_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AllocationSpecificSKUAllocationReservedInstanceProperties_descriptor; @@ -561,7 +465,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < guestAccelerators_.size(); i++) { output.writeMessage(463595119, guestAccelerators_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -588,7 +492,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 463595119, guestAccelerators_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +524,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMinCpuPlatform()) { if (!getMinCpuPlatform().equals(other.getMinCpuPlatform())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -651,7 +555,7 @@ public int hashCode() { hash = (37 * hash) + MIN_CPU_PLATFORM_FIELD_NUMBER; hash = (53 * hash) + getMinCpuPlatform().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -805,20 +709,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AllocationSpecificSKUAllocationReservedInstanceProperties.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) { - getGuestAcceleratorsFieldBuilder(); - getLocalSsdsFieldBuilder(); - } } @java.lang.Override @@ -826,16 +720,18 @@ public Builder clear() { super.clear(); if (guestAcceleratorsBuilder_ == null) { guestAccelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + guestAccelerators_ = null; guestAcceleratorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (localSsdsBuilder_ == null) { localSsds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + localSsds_ = null; localSsdsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); locationHint_ = ""; bitField0_ = (bitField0_ & ~0x00000004); machineType_ = ""; @@ -1034,7 +930,7 @@ public Builder mergeFrom( minCpuPlatform_ = other.minCpuPlatform_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1049,20 +945,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AllocationSpecificSKUAllocationReservedInstanceProperties - 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 1821688210: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1821688210 + case 1839610394: + { + com.google.cloud.compute.v1 + .AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk + m = + input.readMessage( + com.google.cloud.compute.v1 + .AllocationSpecificSKUAllocationAllocatedInstancePropertiesReservedDisk + .parser(), + extensionRegistry); + if (localSsdsBuilder_ == null) { + ensureLocalSsdsIsMutable(); + localSsds_.add(m); + } else { + localSsdsBuilder_.addMessage(m); + } + break; + } // case 1839610394 + case 1943302074: + { + minCpuPlatform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1943302074 + case -1490811254: + { + locationHint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1490811254 + case -586206342: + { + com.google.cloud.compute.v1.AcceleratorConfig m = + input.readMessage( + com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry); + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.add(m); + } else { + guestAcceleratorsBuilder_.addMessage(m); + } + break; + } // case -586206342 + 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.compute.v1.AllocationSpecificSKUAllocationReservedInstanceProperties) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2296,8 +2252,19 @@ public AllocationSpecificSKUAllocationReservedInstanceProperties parsePartialFro com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AllocationSpecificSKUAllocationReservedInstanceProperties( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUReservation.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUReservation.java index c15ffc3adc7a..d844a1722d2d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUReservation.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AllocationSpecificSKUReservation.java @@ -51,84 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AllocationSpecificSKUReservation( - 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 758810744: - { - bitField0_ |= 0x00000002; - count_ = input.readInt64(); - break; - } - case 1722841322: - { - com.google.cloud.compute.v1.AllocationSpecificSKUAllocationReservedInstanceProperties - .Builder - subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = instanceProperties_.toBuilder(); - } - instanceProperties_ = - input.readMessage( - com.google.cloud.compute.v1 - .AllocationSpecificSKUAllocationReservedInstanceProperties.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceProperties_); - instanceProperties_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case -2045386136: - { - bitField0_ |= 0x00000001; - assuredCount_ = input.readInt64(); - break; - } - case -347296280: - { - bitField0_ |= 0x00000004; - inUseCount_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AllocationSpecificSKUReservation_descriptor; @@ -332,7 +254,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeInt64(493458877, inUseCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -355,7 +277,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(493458877, inUseCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -387,7 +309,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInstanceProperties()) { if (!getInstanceProperties().equals(other.getInstanceProperties())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCE_PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + getInstanceProperties().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -688,7 +610,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AllocationSpecificSKUReserv if (other.hasInstanceProperties()) { mergeInstanceProperties(other.getInstanceProperties()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -703,18 +625,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AllocationSpecificSKUReservation 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 758810744: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 758810744 + case 1722841322: + { + input.readMessage( + getInstancePropertiesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 1722841322 + case -2045386136: + { + assuredCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case -2045386136 + case -347296280: + { + inUseCount_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case -347296280 + 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.compute.v1.AllocationSpecificSKUReservation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1184,7 +1144,18 @@ public AllocationSpecificSKUReservation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AllocationSpecificSKUReservation(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Allowed.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Allowed.java index c0e8edba92ca..fb157348041b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Allowed.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Allowed.java @@ -52,66 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Allowed( - 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 854835346: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ports_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ports_.add(s); - break; - } - case -390211094: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - iPProtocol_ = 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_ & 0x00000002) != 0)) { - ports_ = ports_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Allowed_descriptor; @@ -273,7 +213,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 488094525, iPProtocol_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -293,7 +233,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(488094525, iPProtocol_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIPProtocol().equals(other.getIPProtocol())) return false; } if (!getPortsList().equals(other.getPortsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -332,7 +272,7 @@ public int hashCode() { hash = (37 * hash) + PORTS_FIELD_NUMBER; hash = (53 * hash) + getPortsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,17 +399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Allowed.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 @@ -581,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Allowed other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -596,17 +529,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Allowed 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 854835346: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePortsIsMutable(); + ports_.add(s); + break; + } // case 854835346 + case -390211094: + { + iPProtocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -390211094 + 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.compute.v1.Allowed) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -932,7 +892,18 @@ public Allowed parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Allowed(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesInstanceGroupManagerRequest.java index 291ac8b8eb99..86a40c5522bd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesInstanceGroupManagerRequest.java @@ -56,84 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ApplyUpdatesToInstancesInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case 2073942682: - { - com.google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequest.Builder - subBuilder = null; - if (instanceGroupManagersApplyUpdatesRequestResource_ != null) { - subBuilder = instanceGroupManagersApplyUpdatesRequestResource_.toBuilder(); - } - instanceGroupManagersApplyUpdatesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagersApplyUpdatesRequestResource_); - instanceGroupManagersApplyUpdatesRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ApplyUpdatesToInstancesInstanceGroupManagerRequest_descriptor; @@ -391,7 +313,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupManagersApplyUpdatesRequestResource_ != null) { output.writeMessage(259242835, getInstanceGroupManagersApplyUpdatesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +338,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 259242835, getInstanceGroupManagersApplyUpdatesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -443,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -464,7 +386,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -603,17 +525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest.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 @@ -743,7 +658,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -758,20 +673,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case 2073942682: + { + input.readMessage( + getInstanceGroupManagersApplyUpdatesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2073942682 + 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.compute.v1.ApplyUpdatesToInstancesInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1375,8 +1327,19 @@ public ApplyUpdatesToInstancesInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ApplyUpdatesToInstancesInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.java index 2b7fe4a6da21..86865192e700 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.java @@ -57,85 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest( - 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 609986546: - { - com.google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequest.Builder - subBuilder = null; - if (regionInstanceGroupManagersApplyUpdatesRequestResource_ != null) { - subBuilder = regionInstanceGroupManagersApplyUpdatesRequestResource_.toBuilder(); - } - regionInstanceGroupManagersApplyUpdatesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupManagersApplyUpdatesRequestResource_); - regionInstanceGroupManagersApplyUpdatesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest_descriptor; @@ -395,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +341,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +368,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRegionInstanceGroupManagersApplyUpdatesRequestResource() .equals(other.getRegionInstanceGroupManagersApplyUpdatesRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +390,7 @@ public int hashCode() { (37 * hash) + REGION_INSTANCE_GROUP_MANAGERS_APPLY_UPDATES_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getRegionInstanceGroupManagersApplyUpdatesRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -611,17 +532,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.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 @@ -755,7 +669,7 @@ public Builder mergeFrom( mergeRegionInstanceGroupManagersApplyUpdatesRequestResource( other.getRegionInstanceGroupManagersApplyUpdatesRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -770,20 +684,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest - 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 609986546: + { + input.readMessage( + getRegionInstanceGroupManagersApplyUpdatesRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 609986546 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1388,8 +1340,19 @@ public ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest parsePartialFrom com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachDiskInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachDiskInstanceRequest.java index 87065aeda220..d86c21497b08 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachDiskInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachDiskInstanceRequest.java @@ -55,96 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttachDiskInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 724846762: - { - com.google.cloud.compute.v1.AttachedDisk.Builder subBuilder = null; - if (attachedDiskResource_ != null) { - subBuilder = attachedDiskResource_.toBuilder(); - } - attachedDiskResource_ = - input.readMessage( - com.google.cloud.compute.v1.AttachedDisk.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attachedDiskResource_); - attachedDiskResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1142067400: - { - bitField0_ |= 0x00000001; - forceAttach_ = input.readBool(); - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AttachDiskInstanceRequest_descriptor; @@ -499,7 +409,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -528,7 +438,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -559,7 +469,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +498,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +628,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AttachDiskInstanceRequest.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 @@ -869,7 +772,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AttachDiskInstanceRequest o zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -884,18 +787,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AttachDiskInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 724846762: + { + input.readMessage( + getAttachedDiskResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 724846762 + case 1142067400: + { + forceAttach_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 1142067400 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.AttachDiskInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1662,7 +1615,18 @@ public AttachDiskInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttachDiskInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest.java index c603ea95ae0a..99d570d2a912 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest.java @@ -57,87 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest( - 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 245532506: - { - com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequest.Builder - subBuilder = null; - if (globalNetworkEndpointGroupsAttachEndpointsRequestResource_ != null) { - subBuilder = globalNetworkEndpointGroupsAttachEndpointsRequestResource_.toBuilder(); - } - globalNetworkEndpointGroupsAttachEndpointsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalNetworkEndpointGroupsAttachEndpointsRequestResource_); - globalNetworkEndpointGroupsAttachEndpointsRequestResource_ = - subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest_descriptor; @@ -409,7 +328,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkEndpointGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 433907078, networkEndpointGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -434,7 +353,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 433907078, networkEndpointGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -465,7 +384,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -491,7 +410,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -632,17 +551,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest.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 @@ -782,7 +694,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -797,20 +709,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest - 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 245532506: + { + input.readMessage( + getGlobalNetworkEndpointGroupsAttachEndpointsRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 245532506 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + 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.compute.v1.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1424,8 +1374,19 @@ public AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsNetworkEndpointGroupRequest.java index 211d634b7848..24c8559080e3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachNetworkEndpointsNetworkEndpointGroupRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttachNetworkEndpointsNetworkEndpointGroupRequest( - 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 4248634: - { - com.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequest.Builder - subBuilder = null; - if (networkEndpointGroupsAttachEndpointsRequestResource_ != null) { - subBuilder = networkEndpointGroupsAttachEndpointsRequestResource_.toBuilder(); - } - networkEndpointGroupsAttachEndpointsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkEndpointGroupsAttachEndpointsRequestResource_); - networkEndpointGroupsAttachEndpointsRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AttachNetworkEndpointsNetworkEndpointGroupRequest_descriptor; @@ -470,7 +383,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkEndpointGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 433907078, networkEndpointGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -498,7 +411,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 433907078, networkEndpointGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -528,7 +441,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -553,7 +466,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -691,17 +604,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupRequest.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 @@ -845,7 +751,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -860,20 +766,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupRequest 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 4248634: + { + input.readMessage( + getNetworkEndpointGroupsAttachEndpointsRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 4248634 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + 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.compute.v1.AttachNetworkEndpointsNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1597,8 +1547,19 @@ public AttachNetworkEndpointsNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttachNetworkEndpointsNetworkEndpointGroupRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java index c8c8b30bec12..61a848046b5d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java @@ -60,203 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttachedDisk( - 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 24237968: - { - bitField0_ |= 0x00000004; - boot_ = input.readBool(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - kind_ = s; - break; - } - case 26856730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - mode_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - type_ = s; - break; - } - case 141576362: - { - com.google.cloud.compute.v1.AttachedDiskInitializeParams.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = initializeParams_.toBuilder(); - } - initializeParams_ = - input.readMessage( - com.google.cloud.compute.v1.AttachedDiskInitializeParams.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(initializeParams_); - initializeParams_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case 540333730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - deviceName_ = s; - break; - } - case 634356362: - { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - guestOsFeatures_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - guestOsFeatures_.add( - input.readMessage( - com.google.cloud.compute.v1.GuestOsFeature.parser(), extensionRegistry)); - break; - } - case 802768528: - { - bitField0_ |= 0x00000080; - index_ = input.readInt32(); - break; - } - case 1142067400: - { - bitField0_ |= 0x00000040; - forceAttach_ = input.readBool(); - break; - } - case 1417887962: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - source_ = s; - break; - } - case 1538854938: - { - com.google.cloud.compute.v1.InitialStateConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00001000) != 0)) { - subBuilder = shieldedInstanceInitialState_.toBuilder(); - } - shieldedInstanceInitialState_ = - input.readMessage( - com.google.cloud.compute.v1.InitialStateConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shieldedInstanceInitialState_); - shieldedInstanceInitialState_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00001000; - break; - } - case -2121681878: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = diskEncryptionKey_.toBuilder(); - } - diskEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diskEncryptionKey_); - diskEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case -1872541030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - architecture_ = s; - break; - } - case -1764857416: - { - bitField0_ |= 0x00000020; - diskSizeGb_ = input.readInt64(); - break; - } - case -1593826670: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - licenses_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00001000; - } - licenses_.add(s); - break; - } - case -576876072: - { - bitField0_ |= 0x00000002; - autoDelete_ = input.readBool(); - break; - } - case -273978934: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - interface_ = 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_ & 0x00000080) != 0)) { - guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_); - } - if (((mutable_bitField0_ & 0x00001000) != 0)) { - licenses_ = licenses_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AttachedDisk_descriptor; @@ -1848,7 +1651,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 502623545, interface_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1920,7 +1723,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(502623545, interface_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1998,7 +1801,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2077,7 +1880,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2247,10 +2050,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000040); if (guestOsFeaturesBuilder_ == null) { guestOsFeatures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); } else { + guestOsFeatures_ = null; guestOsFeaturesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000080); index_ = 0; bitField0_ = (bitField0_ & ~0x00000100); if (initializeParamsBuilder_ == null) { @@ -2538,7 +2342,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AttachedDisk other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2553,17 +2357,144 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AttachedDisk 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 24237968: + { + boot_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24237968 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 26336418 + case 26856730: + { + mode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 26856730 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 28604882 + case 141576362: + { + input.readMessage( + getInitializeParamsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 141576362 + case 540333730: + { + deviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 540333730 + case 634356362: + { + com.google.cloud.compute.v1.GuestOsFeature m = + input.readMessage( + com.google.cloud.compute.v1.GuestOsFeature.parser(), extensionRegistry); + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(m); + } else { + guestOsFeaturesBuilder_.addMessage(m); + } + break; + } // case 634356362 + case 802768528: + { + index_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 802768528 + case 1142067400: + { + forceAttach_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 1142067400 + case 1417887962: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 1417887962 + case 1538854938: + { + input.readMessage( + getShieldedInstanceInitialStateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 1538854938 + case -2121681878: + { + input.readMessage( + getDiskEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case -2121681878 + case -1872541030: + { + architecture_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1872541030 + case -1764857416: + { + diskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case -1764857416 + case -1593826670: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicensesIsMutable(); + licenses_.add(s); + break; + } // case -1593826670 + case -576876072: + { + autoDelete_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -576876072 + case -273978934: + { + interface_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -273978934 + 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.compute.v1.AttachedDisk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4951,7 +4882,18 @@ public AttachedDisk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttachedDisk(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDiskInitializeParams.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDiskInitializeParams.java index bea89789005f..dfc35a940021 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDiskInitializeParams.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDiskInitializeParams.java @@ -60,198 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttachedDiskInitializeParams( - 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 177763082: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000400; - } - resourcePolicies_.add(s); - break; - } - case 403546554: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - sourceImage_ = s; - break; - } - case 742457194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - diskName_ = s; - break; - } - case 744072418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - diskType_ = s; - break; - } - case 1008495426: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - sourceSnapshot_ = s; - break; - } - case 1494152864: - { - bitField0_ |= 0x00000040; - provisionedIops_ = input.readInt64(); - break; - } - case 1619615842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - onUpdateAction_ = s; - break; - } - case -1872541030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - architecture_ = s; - break; - } - case -1865532718: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00000400) != 0)) { - subBuilder = sourceSnapshotEncryptionKey_.toBuilder(); - } - sourceSnapshotEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceSnapshotEncryptionKey_); - sourceSnapshotEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000400; - break; - } - case -1764857416: - { - bitField0_ |= 0x00000008; - diskSizeGb_ = input.readInt64(); - break; - } - case -1593826670: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - licenses_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - licenses_.add(s); - break; - } - case -1273597982: - { - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - resourceManagerTags_ = - com.google.protobuf.MapField.newMapField( - ResourceManagerTagsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000200; - } - com.google.protobuf.MapEntry - resourceManagerTags__ = - input.readMessage( - ResourceManagerTagsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - resourceManagerTags_ - .getMutableMap() - .put(resourceManagerTags__.getKey(), resourceManagerTags__.getValue()); - break; - } - case -1242938022: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = sourceImageEncryptionKey_.toBuilder(); - } - sourceImageEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceImageEncryptionKey_); - sourceImageEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000020; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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_ & 0x00000400) != 0)) { - resourcePolicies_ = resourcePolicies_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - licenses_ = licenses_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AttachedDiskInitializeParams_descriptor; @@ -1661,7 +1469,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1745,7 +1553,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1811,7 +1619,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceSnapshotEncryptionKey().equals(other.getSourceSnapshotEncryptionKey())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1882,7 +1690,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_SNAPSHOT_ENCRYPTION_KEY_FIELD_NUMBER; hash = (53 * hash) + getSourceSnapshotEncryptionKey().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2306,7 +2114,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AttachedDiskInitializeParam if (other.hasSourceSnapshotEncryptionKey()) { mergeSourceSnapshotEncryptionKey(other.getSourceSnapshotEncryptionKey()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2321,18 +2129,136 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AttachedDiskInitializeParams 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 177763082: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 177763082 + case 403546554: + { + sourceImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 403546554 + case 742457194: + { + diskName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 742457194 + case 744072418: + { + diskType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 744072418 + case 1008495426: + { + sourceSnapshot_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 1008495426 + case 1494152864: + { + provisionedIops_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 1494152864 + case 1619615842: + { + onUpdateAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1619615842 + case -1872541030: + { + architecture_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1872541030 + case -1865532718: + { + input.readMessage( + getSourceSnapshotEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case -1865532718 + case -1764857416: + { + diskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case -1764857416 + case -1593826670: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicensesIsMutable(); + licenses_.add(s); + break; + } // case -1593826670 + case -1273597982: + { + com.google.protobuf.MapEntry + resourceManagerTags__ = + input.readMessage( + ResourceManagerTagsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableResourceManagerTags() + .getMutableMap() + .put(resourceManagerTags__.getKey(), resourceManagerTags__.getValue()); + break; + } // case -1273597982 + case -1242938022: + { + input.readMessage( + getSourceImageEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case -1242938022 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.AttachedDiskInitializeParams) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4437,7 +4363,18 @@ public AttachedDiskInitializeParams parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttachedDiskInitializeParams(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuditConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuditConfig.java index 86ef0fcec6a4..2633231bc756 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuditConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuditConfig.java @@ -54,81 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AuditConfig( - 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 1860924610: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - exemptedMembers_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - exemptedMembers_.add(s); - break; - } - case -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - service_ = s; - break; - } - case -387602286: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - auditLogConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - auditLogConfigs_.add( - input.readMessage( - com.google.cloud.compute.v1.AuditLogConfig.parser(), extensionRegistry)); - 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_ & 0x00000002) != 0)) { - exemptedMembers_ = exemptedMembers_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - auditLogConfigs_ = java.util.Collections.unmodifiableList(auditLogConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AuditConfig_descriptor; @@ -364,7 +289,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < auditLogConfigs_.size(); i++) { output.writeMessage(488420626, auditLogConfigs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -389,7 +314,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 488420626, auditLogConfigs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -410,7 +335,7 @@ public boolean equals(final java.lang.Object obj) { if (hasService()) { if (!getService().equals(other.getService())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -433,7 +358,7 @@ public int hashCode() { hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -562,19 +487,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AuditConfig.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) { - getAuditLogConfigsFieldBuilder(); - } } @java.lang.Override @@ -582,10 +498,11 @@ public Builder clear() { super.clear(); if (auditLogConfigsBuilder_ == null) { auditLogConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + auditLogConfigs_ = null; auditLogConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); exemptedMembers_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); service_ = ""; @@ -729,7 +646,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AuditConfig other) { service_ = other.service_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,17 +661,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AuditConfig 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 1860924610: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExemptedMembersIsMutable(); + exemptedMembers_.add(s); + break; + } // case 1860924610 + case -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1306643030 + case -387602286: + { + com.google.cloud.compute.v1.AuditLogConfig m = + input.readMessage( + com.google.cloud.compute.v1.AuditLogConfig.parser(), extensionRegistry); + if (auditLogConfigsBuilder_ == null) { + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.add(m); + } else { + auditLogConfigsBuilder_.addMessage(m); + } + break; + } // case -387602286 + 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.compute.v1.AuditConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1435,7 +1392,18 @@ public AuditConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AuditConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuditLogConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuditLogConfig.java index 337a98cfc19d..eeba531746d9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuditLogConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuditLogConfig.java @@ -53,72 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AuditLogConfig( - 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 561134800: - { - bitField0_ |= 0x00000001; - ignoreChildExemptions_ = input.readBool(); - break; - } - case 1860924610: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - exemptedMembers_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - exemptedMembers_.add(s); - break; - } - case -1070040406: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - logType_ = 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)) { - exemptedMembers_ = exemptedMembers_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AuditLogConfig_descriptor; @@ -521,7 +455,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 403115861, logType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -545,7 +479,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(403115861, logType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -570,7 +504,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLogType()) { if (!getLogType().equals(other.getLogType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -593,7 +527,7 @@ public int hashCode() { hash = (37 * hash) + LOG_TYPE_FIELD_NUMBER; hash = (53 * hash) + getLogType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -722,17 +656,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AuditLogConfig.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 @@ -854,7 +781,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AuditLogConfig other) { logType_ = other.logType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -869,17 +796,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AuditLogConfig 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 561134800: + { + ignoreChildExemptions_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 561134800 + case 1860924610: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExemptedMembersIsMutable(); + exemptedMembers_.add(s); + break; + } // case 1860924610 + case -1070040406: + { + logType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1070040406 + 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.compute.v1.AuditLogConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1278,7 +1238,18 @@ public AuditLogConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AuditLogConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuthorizationLoggingOptions.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuthorizationLoggingOptions.java index 10320555167c..92b0c843ed9a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuthorizationLoggingOptions.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AuthorizationLoggingOptions.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AuthorizationLoggingOptions( - 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 -87138990: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - permissionType_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AuthorizationLoggingOptions_descriptor; @@ -424,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 525978538, permissionType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -436,7 +389,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(525978538, permissionType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -456,7 +409,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPermissionType()) { if (!getPermissionType().equals(other.getPermissionType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -471,7 +424,7 @@ public int hashCode() { hash = (37 * hash) + PERMISSION_TYPE_FIELD_NUMBER; hash = (53 * hash) + getPermissionType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -601,17 +554,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AuthorizationLoggingOptions.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 @@ -708,7 +654,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AuthorizationLoggingOptions permissionType_ = other.permissionType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -723,18 +669,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AuthorizationLoggingOptions 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 -87138990: + { + permissionType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -87138990 + 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.compute.v1.AuthorizationLoggingOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -898,7 +863,18 @@ public AuthorizationLoggingOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AuthorizationLoggingOptions(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Autoscaler.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Autoscaler.java index 22678bf06e11..6ab07c92c12c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Autoscaler.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Autoscaler.java @@ -61,172 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Autoscaler( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - region_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - status_ = s; - break; - } - case 1542687882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - target_ = s; - break; - } - case 1775600330: - { - com.google.cloud.compute.v1.AutoscalingPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = autoscalingPolicy_.toBuilder(); - } - autoscalingPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.AutoscalingPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalingPolicy_); - autoscalingPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 2063325992: - { - bitField0_ |= 0x00000040; - recommendedSize_ = input.readInt32(); - break; - } - case -1388136534: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - statusDetails_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - statusDetails_.add( - input.readMessage( - com.google.cloud.compute.v1.AutoscalerStatusDetails.parser(), - extensionRegistry)); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = s; - break; - } - case -567365870: - { - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - scalingScheduleStatus_ = - com.google.protobuf.MapField.newMapField( - ScalingScheduleStatusDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000100; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> - scalingScheduleStatus__ = - input.readMessage( - ScalingScheduleStatusDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - scalingScheduleStatus_ - .getMutableMap() - .put(scalingScheduleStatus__.getKey(), scalingScheduleStatus__.getValue()); - 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_ & 0x00000800) != 0)) { - statusDetails_ = java.util.Collections.unmodifiableList(statusDetails_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Autoscaler_descriptor; @@ -1408,7 +1242,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io internalGetScalingScheduleStatus(), ScalingScheduleStatusDefaultEntryHolder.defaultEntry, 465950178); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1475,7 +1309,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 465950178, scalingScheduleStatus__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1541,7 +1375,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1608,7 +1442,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1803,10 +1637,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (statusDetailsBuilder_ == null) { statusDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + statusDetails_ = null; statusDetailsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); target_ = ""; bitField0_ = (bitField0_ & ~0x00001000); zone_ = ""; @@ -2035,7 +1870,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Autoscaler other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2050,17 +1885,131 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Autoscaler 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1111570338 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1450082194 + case 1542687882: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 1542687882 + case 1775600330: + { + input.readMessage( + getAutoscalingPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1775600330 + case 2063325992: + { + recommendedSize_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 2063325992 + case -1388136534: + { + com.google.cloud.compute.v1.AutoscalerStatusDetails m = + input.readMessage( + com.google.cloud.compute.v1.AutoscalerStatusDetails.parser(), + extensionRegistry); + if (statusDetailsBuilder_ == null) { + ensureStatusDetailsIsMutable(); + statusDetails_.add(m); + } else { + statusDetailsBuilder_.addMessage(m); + } + break; + } // case -1388136534 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -645248918 + case -567365870: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.ScalingScheduleStatus> + scalingScheduleStatus__ = + input.readMessage( + ScalingScheduleStatusDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableScalingScheduleStatus() + .getMutableMap() + .put(scalingScheduleStatus__.getKey(), scalingScheduleStatus__.getValue()); + break; + } // case -567365870 + 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.compute.v1.Autoscaler) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4083,7 +4032,18 @@ public Autoscaler parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Autoscaler(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerAggregatedList.java index 9fed3cc618f5..b262bb4de480 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalerAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.AutoscalersScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AutoscalerAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1157,7 +1044,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AutoscalerAggregatedList ot if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1172,18 +1059,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AutoscalerAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.AutoscalersScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.AutoscalerAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2232,7 +2180,18 @@ public AutoscalerAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalerAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerList.java index 2b57c4ea2123..e85c49a5ce6b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalerList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AutoscalerList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AutoscalerList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AutoscalerList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Autoscaler m = + input.readMessage( + com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.AutoscalerList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public AutoscalerList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalerList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerStatusDetails.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerStatusDetails.java index 5c23b1f35afb..e2cd344f7ebe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerStatusDetails.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalerStatusDetails.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalerStatusDetails( - 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 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - type_ = s; - break; - } - case -950534086: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - message_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AutoscalerStatusDetails_descriptor; @@ -812,7 +758,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 418054151, message_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -827,7 +773,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(418054151, message_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -851,7 +797,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -870,7 +816,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -998,17 +944,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AutoscalerStatusDetails.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 @@ -1116,7 +1055,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AutoscalerStatusDetails oth type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1131,18 +1070,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AutoscalerStatusDetails 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 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 28604882 + case -950534086: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -950534086 + 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.compute.v1.AutoscalerStatusDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1426,7 +1390,18 @@ public AutoscalerStatusDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalerStatusDetails(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalersScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalersScopedList.java index b2f666c03b5f..682febd52c4e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalersScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalersScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalersScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -568794142: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - autoscalers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - autoscalers_.add( - input.readMessage( - com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry)); - 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)) { - autoscalers_ = java.util.Collections.unmodifiableList(autoscalers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AutoscalersScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < autoscalers_.size(); i++) { output.writeMessage(465771644, autoscalers_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(465771644, autoscalers_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (autoscalersBuilder_ == null) { autoscalers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + autoscalers_ = null; autoscalersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AutoscalersScopedList other if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,18 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AutoscalersScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -568794142: + { + com.google.cloud.compute.v1.Autoscaler m = + input.readMessage( + com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry); + if (autoscalersBuilder_ == null) { + ensureAutoscalersIsMutable(); + autoscalers_.add(m); + } else { + autoscalersBuilder_.addMessage(m); + } + break; + } // case -568794142 + 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.compute.v1.AutoscalersScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1214,7 +1177,18 @@ public AutoscalersScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalersScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicy.java index 17b1fc28ccc5..b47d27b5c401 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicy.java @@ -53,162 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalingPolicy( - 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 26856730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - mode_ = s; - break; - } - case 498619000: - { - bitField0_ |= 0x00000008; - maxNumReplicas_ = input.readInt32(); - break; - } - case 861543632: - { - bitField0_ |= 0x00000001; - coolDownPeriodSec_ = input.readInt32(); - break; - } - case 1055782802: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - customMetricUtilizations_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization>(); - mutable_bitField0_ |= 0x00000004; - } - customMetricUtilizations_.add( - input.readMessage( - com.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization.parser(), - extensionRegistry)); - break; - } - case -1451634654: - { - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - scalingSchedules_ = - com.google.protobuf.MapField.newMapField( - ScalingSchedulesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000100; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.compute.v1.AutoscalingPolicyScalingSchedule> - scalingSchedules__ = - input.readMessage( - ScalingSchedulesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - scalingSchedules_ - .getMutableMap() - .put(scalingSchedules__.getKey(), scalingSchedules__.getValue()); - break; - } - case -1245278118: - { - com.google.cloud.compute.v1.AutoscalingPolicyCpuUtilization.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = cpuUtilization_.toBuilder(); - } - cpuUtilization_ = - input.readMessage( - com.google.cloud.compute.v1.AutoscalingPolicyCpuUtilization.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cpuUtilization_); - cpuUtilization_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -856996070: - { - com.google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization.Builder - subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = loadBalancingUtilization_.toBuilder(); - } - loadBalancingUtilization_ = - input.readMessage( - com.google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(loadBalancingUtilization_); - loadBalancingUtilization_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -73600318: - { - com.google.cloud.compute.v1.AutoscalingPolicyScaleInControl.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = scaleInControl_.toBuilder(); - } - scaleInControl_ = - input.readMessage( - com.google.cloud.compute.v1.AutoscalingPolicyScaleInControl.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(scaleInControl_); - scaleInControl_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case -12328696: - { - bitField0_ |= 0x00000010; - minNumReplicas_ = 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 { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - customMetricUtilizations_ = - java.util.Collections.unmodifiableList(customMetricUtilizations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_AutoscalingPolicy_descriptor; @@ -1010,7 +854,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeInt32(535329825, minNumReplicas_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1063,7 +907,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(535329825, minNumReplicas_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1110,7 +954,7 @@ public boolean equals(final java.lang.Object obj) { if (!getScaleInControl().equals(other.getScaleInControl())) return false; } if (!internalGetScalingSchedules().equals(other.internalGetScalingSchedules())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1157,7 +1001,7 @@ public int hashCode() { hash = (37 * hash) + SCALING_SCHEDULES_FIELD_NUMBER; hash = (53 * hash) + internalGetScalingSchedules().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1337,10 +1181,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (customMetricUtilizationsBuilder_ == null) { customMetricUtilizations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + customMetricUtilizations_ = null; customMetricUtilizationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (loadBalancingUtilizationBuilder_ == null) { loadBalancingUtilization_ = null; } else { @@ -1542,7 +1387,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AutoscalingPolicy other) { mergeScaleInControl(other.getScaleInControl()); } internalGetMutableScalingSchedules().mergeFrom(other.internalGetScalingSchedules()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1557,17 +1402,103 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AutoscalingPolicy 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 26856730: + { + mode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26856730 + case 498619000: + { + maxNumReplicas_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 498619000 + case 861543632: + { + coolDownPeriodSec_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 861543632 + case 1055782802: + { + com.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization m = + input.readMessage( + com.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization + .parser(), + extensionRegistry); + if (customMetricUtilizationsBuilder_ == null) { + ensureCustomMetricUtilizationsIsMutable(); + customMetricUtilizations_.add(m); + } else { + customMetricUtilizationsBuilder_.addMessage(m); + } + break; + } // case 1055782802 + case -1451634654: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.compute.v1.AutoscalingPolicyScalingSchedule> + scalingSchedules__ = + input.readMessage( + ScalingSchedulesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableScalingSchedules() + .getMutableMap() + .put(scalingSchedules__.getKey(), scalingSchedules__.getValue()); + break; + } // case -1451634654 + case -1245278118: + { + input.readMessage(getCpuUtilizationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1245278118 + case -856996070: + { + input.readMessage( + getLoadBalancingUtilizationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -856996070 + case -73600318: + { + input.readMessage(getScaleInControlFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case -73600318 + case -12328696: + { + minNumReplicas_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case -12328696 + 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.compute.v1.AutoscalingPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3129,7 +3060,18 @@ public AutoscalingPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalingPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyCpuUtilization.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyCpuUtilization.java index c7795a654522..4d0fa3b485b3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyCpuUtilization.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyCpuUtilization.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalingPolicyCpuUtilization( - 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 1727246961: - { - bitField0_ |= 0x00000002; - utilizationTarget_ = input.readDouble(); - break; - } - case -1173201398: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - predictiveMethod_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AutoscalingPolicyCpuUtilization_descriptor; @@ -403,7 +350,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 390220737, predictiveMethod_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +367,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(390220737, predictiveMethod_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -445,7 +392,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Double.doubleToLongBits(getUtilizationTarget()) != java.lang.Double.doubleToLongBits(other.getUtilizationTarget())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -467,7 +414,7 @@ public int hashCode() { + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getUtilizationTarget())); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -597,17 +544,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AutoscalingPolicyCpuUtilization.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 @@ -713,7 +653,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AutoscalingPolicyCpuUtiliza if (other.hasUtilizationTarget()) { setUtilizationTarget(other.getUtilizationTarget()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -728,18 +668,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AutoscalingPolicyCpuUtilization 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 1727246961: + { + utilizationTarget_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 1727246961 + case -1173201398: + { + predictiveMethod_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1173201398 + 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.compute.v1.AutoscalingPolicyCpuUtilization) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -970,7 +935,18 @@ public AutoscalingPolicyCpuUtilization parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalingPolicyCpuUtilization(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyCustomMetricUtilization.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyCustomMetricUtilization.java index a6ceccb34164..2f733032781d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyCustomMetricUtilization.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyCustomMetricUtilization.java @@ -56,79 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalingPolicyCustomMetricUtilization( - 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 1727246961: - { - bitField0_ |= 0x00000008; - utilizationTarget_ = input.readDouble(); - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -1573612454: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - utilizationTargetType_ = s; - break; - } - case -256822783: - { - bitField0_ |= 0x00000004; - singleInstanceAssignment_ = input.readDouble(); - break; - } - case -30429822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - metric_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AutoscalingPolicyCustomMetricUtilization_descriptor; @@ -620,7 +547,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 533067184, metric_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -649,7 +576,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(533067184, metric_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -687,7 +614,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUtilizationTargetType()) { if (!getUtilizationTargetType().equals(other.getUtilizationTargetType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -724,7 +651,7 @@ public int hashCode() { hash = (37 * hash) + UTILIZATION_TARGET_TYPE_FIELD_NUMBER; hash = (53 * hash) + getUtilizationTargetType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -856,17 +783,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization.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 @@ -1008,7 +928,7 @@ public Builder mergeFrom( utilizationTargetType_ = other.utilizationTargetType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1023,19 +943,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AutoscalingPolicyCustomMetricUtilization 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 1727246961: + { + utilizationTarget_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 1727246961 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -1573612454: + { + utilizationTargetType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -1573612454 + case -256822783: + { + singleInstanceAssignment_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case -256822783 + case -30429822: + { + metric_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -30429822 + 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.compute.v1.AutoscalingPolicyCustomMetricUtilization) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1575,7 +1537,18 @@ public AutoscalingPolicyCustomMetricUtilization parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalingPolicyCustomMetricUtilization(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyLoadBalancingUtilization.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyLoadBalancingUtilization.java index 4d49504f8c95..6f4f11c03d05 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyLoadBalancingUtilization.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyLoadBalancingUtilization.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalingPolicyLoadBalancingUtilization( - 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 1727246961: - { - bitField0_ |= 0x00000001; - utilizationTarget_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AutoscalingPolicyLoadBalancingUtilization_descriptor; @@ -164,7 +118,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeDouble(215905870, utilizationTarget_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -177,7 +131,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(215905870, utilizationTarget_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -198,7 +152,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Double.doubleToLongBits(getUtilizationTarget()) != java.lang.Double.doubleToLongBits(other.getUtilizationTarget())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -216,7 +170,7 @@ public int hashCode() { + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getUtilizationTarget())); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -348,17 +302,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization.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 @@ -458,7 +405,7 @@ public Builder mergeFrom( if (other.hasUtilizationTarget()) { setUtilizationTarget(other.getUtilizationTarget()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -473,19 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AutoscalingPolicyLoadBalancingUtilization 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 1727246961: + { + utilizationTarget_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 1727246961 + 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.compute.v1.AutoscalingPolicyLoadBalancingUtilization) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -593,7 +558,19 @@ public AutoscalingPolicyLoadBalancingUtilization parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalingPolicyLoadBalancingUtilization(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyScaleInControl.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyScaleInControl.java index 229dadeac0b6..04b7372a3c47 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyScaleInControl.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyScaleInControl.java @@ -51,68 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalingPolicyScaleInControl( - 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 291242400: - { - bitField0_ |= 0x00000002; - timeWindowSec_ = input.readInt32(); - break; - } - case 1445680986: - { - com.google.cloud.compute.v1.FixedOrPercent.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = maxScaledInReplicas_.toBuilder(); - } - maxScaledInReplicas_ = - input.readMessage( - com.google.cloud.compute.v1.FixedOrPercent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxScaledInReplicas_); - maxScaledInReplicas_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AutoscalingPolicyScaleInControl_descriptor; @@ -235,7 +173,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(180710123, getMaxScaledInReplicas()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -252,7 +190,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 180710123, getMaxScaledInReplicas()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -276,7 +214,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTimeWindowSec()) { if (getTimeWindowSec() != other.getTimeWindowSec()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +233,7 @@ public int hashCode() { hash = (37 * hash) + TIME_WINDOW_SEC_FIELD_NUMBER; hash = (53 * hash) + getTimeWindowSec(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -549,7 +487,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AutoscalingPolicyScaleInCon if (other.hasTimeWindowSec()) { setTimeWindowSec(other.getTimeWindowSec()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -564,18 +502,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AutoscalingPolicyScaleInControl 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 291242400: + { + timeWindowSec_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 291242400 + case 1445680986: + { + input.readMessage( + getMaxScaledInReplicasFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1445680986 + 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.compute.v1.AutoscalingPolicyScaleInControl) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -877,7 +841,18 @@ public AutoscalingPolicyScaleInControl parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalingPolicyScaleInControl(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyScalingSchedule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyScalingSchedule.java index 8b27f6c8f681..fab7def1400a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyScalingSchedule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AutoscalingPolicyScalingSchedule.java @@ -55,85 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AutoscalingPolicyScalingSchedule( - 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 294784754: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - timeZone_ = s; - break; - } - case 1698855216: - { - bitField0_ |= 0x00000004; - durationSec_ = input.readInt32(); - break; - } - case -2127440928: - { - bitField0_ |= 0x00000002; - disabled_ = input.readBool(); - break; - } - case -1370851984: - { - bitField0_ |= 0x00000008; - minRequiredReplicas_ = input.readInt32(); - break; - } - case -1288399686: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - schedule_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - description_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_AutoscalingPolicyScalingSchedule_descriptor; @@ -473,7 +394,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -501,7 +422,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -541,7 +462,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTimeZone()) { if (!getTimeZone().equals(other.getTimeZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -576,7 +497,7 @@ public int hashCode() { hash = (37 * hash) + TIME_ZONE_FIELD_NUMBER; hash = (53 * hash) + getTimeZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -706,17 +627,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.AutoscalingPolicyScalingSchedule.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 @@ -864,7 +778,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.AutoscalingPolicyScalingSch timeZone_ = other.timeZone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -879,18 +793,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.AutoscalingPolicyScalingSchedule 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 294784754: + { + timeZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 294784754 + case 1698855216: + { + durationSec_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 1698855216 + case -2127440928: + { + disabled_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -2127440928 + case -1370851984: + { + minRequiredReplicas_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case -1370851984 + case -1288399686: + { + schedule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -1288399686 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -911466526 + 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.compute.v1.AutoscalingPolicyScalingSchedule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1490,7 +1453,18 @@ public AutoscalingPolicyScalingSchedule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AutoscalingPolicyScalingSchedule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Backend.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Backend.java index 3184a4f14dd8..e28a9247b4c0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Backend.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Backend.java @@ -54,121 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Backend( - 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 140796637: - { - bitField0_ |= 0x00000400; - maxRatePerInstance_ = input.readFloat(); - break; - } - case 789033978: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - group_ = s; - break; - } - case 837375200: - { - bitField0_ |= 0x00000080; - maxConnectionsPerInstance_ = input.readInt32(); - break; - } - case 885217232: - { - bitField0_ |= 0x00000020; - maxConnections_ = input.readInt32(); - break; - } - case 1038658269: - { - bitField0_ |= 0x00000200; - maxRatePerEndpoint_ = input.readFloat(); - break; - } - case 1111140240: - { - bitField0_ |= 0x00000008; - failover_ = input.readBool(); - break; - } - case 1185537597: - { - bitField0_ |= 0x00000800; - maxUtilization_ = input.readFloat(); - break; - } - case 1735236832: - { - bitField0_ |= 0x00000040; - maxConnectionsPerEndpoint_ = input.readInt32(); - break; - } - case -1767302035: - { - bitField0_ |= 0x00000002; - capacityScaler_ = input.readFloat(); - break; - } - case -1030687016: - { - bitField0_ |= 0x00000100; - maxRate_ = input.readInt32(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -852677558: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - balancingMode_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Backend_descriptor; @@ -906,7 +791,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 430286217, balancingMode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -956,7 +841,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(430286217, balancingMode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1023,7 +908,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getMaxUtilization()) != java.lang.Float.floatToIntBits(other.getMaxUtilization())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1082,7 +967,7 @@ public int hashCode() { hash = (37 * hash) + MAX_UTILIZATION_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getMaxUtilization()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1210,17 +1095,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Backend.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 @@ -1418,7 +1296,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Backend other) { if (other.hasMaxUtilization()) { setMaxUtilization(other.getMaxUtilization()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1433,17 +1311,103 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Backend 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 140796637: + { + maxRatePerInstance_ = input.readFloat(); + bitField0_ |= 0x00000400; + break; + } // case 140796637 + case 789033978: + { + group_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 789033978 + case 837375200: + { + maxConnectionsPerInstance_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 837375200 + case 885217232: + { + maxConnections_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 885217232 + case 1038658269: + { + maxRatePerEndpoint_ = input.readFloat(); + bitField0_ |= 0x00000200; + break; + } // case 1038658269 + case 1111140240: + { + failover_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 1111140240 + case 1185537597: + { + maxUtilization_ = input.readFloat(); + bitField0_ |= 0x00000800; + break; + } // case 1185537597 + case 1735236832: + { + maxConnectionsPerEndpoint_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 1735236832 + case -1767302035: + { + capacityScaler_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case -1767302035 + case -1030687016: + { + maxRate_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case -1030687016 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -852677558: + { + balancingMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -852677558 + 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.compute.v1.Backend) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2450,7 +2414,18 @@ public Backend parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Backend(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucket.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucket.java index 91da8551f7de..58af8697fbee 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucket.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucket.java @@ -60,144 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendBucket( - 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 26840: - { - bitField0_ |= 0x00000080; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - creationTimestamp_ = s; - break; - } - case 328295546: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - edgeSecurityPolicy_ = s; - break; - } - case 764167906: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - compressionMode_ = s; - break; - } - case 1711811618: - { - com.google.cloud.compute.v1.BackendBucketCdnPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = cdnPolicy_.toBuilder(); - } - cdnPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.BackendBucketCdnPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cdnPolicy_); - cdnPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -2031428728: - { - bitField0_ |= 0x00000040; - enableCdn_ = input.readBool(); - break; - } - case -2026086910: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - bucketName_ = s; - break; - } - case -1194654542: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - customResponseHeaders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - customResponseHeaders_.add(s); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - selfLink_ = 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_ & 0x00000010) != 0)) { - customResponseHeaders_ = customResponseHeaders_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendBucket_descriptor; @@ -1116,7 +978,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000400) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1168,7 +1030,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000400) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1229,7 +1091,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSelfLink()) { if (!getSelfLink().equals(other.getSelfLink())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1288,7 +1150,7 @@ public int hashCode() { hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; hash = (53 * hash) + getSelfLink().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1654,7 +1516,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendBucket other) { selfLink_ = other.selfLink_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1669,17 +1531,104 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendBucket 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 244202930 + case 328295546: + { + edgeSecurityPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 328295546 + case 764167906: + { + compressionMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 764167906 + case 1711811618: + { + input.readMessage(getCdnPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 1711811618 + case -2031428728: + { + enableCdn_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case -2031428728 + case -2026086910: + { + bucketName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -2026086910 + case -1194654542: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCustomResponseHeadersIsMutable(); + customResponseHeaders_.add(s); + break; + } // case -1194654542 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -645248918 + 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.compute.v1.BackendBucket) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3174,7 +3123,18 @@ public BackendBucket parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendBucket(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicy.java index d691ab41ee66..0ec93e45137b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicy.java @@ -55,164 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendBucketCdnPolicy( - 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 231023106: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - cacheMode_ = s; - break; - } - case 232274880: - { - bitField0_ |= 0x00000004; - clientTtl_ = input.readInt32(); - break; - } - case 802027376: - { - bitField0_ |= 0x00000008; - defaultTtl_ = input.readInt32(); - break; - } - case 1242879970: - { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - negativeCachingPolicy_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy>(); - mutable_bitField0_ |= 0x00000080; - } - negativeCachingPolicy_.add( - input.readMessage( - com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy - .parser(), - extensionRegistry)); - break; - } - case 1274109818: - { - com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.Builder subBuilder = - null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = cacheKeyPolicy_.toBuilder(); - } - cacheKeyPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cacheKeyPolicy_); - cacheKeyPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1893457624: - { - bitField0_ |= 0x00000080; - serveWhileStale_ = input.readInt32(); - break; - } - case -2139971024: - { - bitField0_ |= 0x00000100; - signedUrlCacheMaxAgeSec_ = input.readInt64(); - break; - } - case -1834343288: - { - bitField0_ |= 0x00000010; - maxTtl_ = input.readInt32(); - break; - } - case -1606087256: - { - bitField0_ |= 0x00000020; - negativeCaching_ = input.readBool(); - break; - } - case -1320176214: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - signedUrlKeyNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000800; - } - signedUrlKeyNames_.add(s); - break; - } - case -405342638: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bypassCacheOnRequestHeaders_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .BackendBucketCdnPolicyBypassCacheOnRequestHeader>(); - mutable_bitField0_ |= 0x00000001; - } - bypassCacheOnRequestHeaders_.add( - input.readMessage( - com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader - .parser(), - extensionRegistry)); - break; - } - case -32501088: - { - bitField0_ |= 0x00000040; - requestCoalescing_ = 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 { - if (((mutable_bitField0_ & 0x00000080) != 0)) { - negativeCachingPolicy_ = java.util.Collections.unmodifiableList(negativeCachingPolicy_); - } - if (((mutable_bitField0_ & 0x00000800) != 0)) { - signedUrlKeyNames_ = signedUrlKeyNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - bypassCacheOnRequestHeaders_ = - java.util.Collections.unmodifiableList(bypassCacheOnRequestHeaders_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendBucketCdnPolicy_descriptor; @@ -1055,7 +897,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { output.writeBool(532808276, requestCoalescing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1112,7 +954,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(532808276, requestCoalescing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1168,7 +1010,7 @@ public boolean equals(final java.lang.Object obj) { if (getSignedUrlCacheMaxAgeSec() != other.getSignedUrlCacheMaxAgeSec()) return false; } if (!getSignedUrlKeyNamesList().equals(other.getSignedUrlKeyNamesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1227,7 +1069,7 @@ public int hashCode() { hash = (37 * hash) + SIGNED_URL_KEY_NAMES_FIELD_NUMBER; hash = (53 * hash) + getSignedUrlKeyNamesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1378,10 +1220,11 @@ public Builder clear() { super.clear(); if (bypassCacheOnRequestHeadersBuilder_ == null) { bypassCacheOnRequestHeaders_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bypassCacheOnRequestHeaders_ = null; bypassCacheOnRequestHeadersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (cacheKeyPolicyBuilder_ == null) { cacheKeyPolicy_ = null; } else { @@ -1400,10 +1243,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000040); if (negativeCachingPolicyBuilder_ == null) { negativeCachingPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); } else { + negativeCachingPolicy_ = null; negativeCachingPolicyBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000080); requestCoalescing_ = false; bitField0_ = (bitField0_ & ~0x00000100); serveWhileStale_ = 0; @@ -1649,7 +1493,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendBucketCdnPolicy othe } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1664,18 +1508,122 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendBucketCdnPolicy 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 231023106: + { + cacheMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 231023106 + case 232274880: + { + clientTtl_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 232274880 + case 802027376: + { + defaultTtl_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 802027376 + case 1242879970: + { + com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy m = + input.readMessage( + com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy + .parser(), + extensionRegistry); + if (negativeCachingPolicyBuilder_ == null) { + ensureNegativeCachingPolicyIsMutable(); + negativeCachingPolicy_.add(m); + } else { + negativeCachingPolicyBuilder_.addMessage(m); + } + break; + } // case 1242879970 + case 1274109818: + { + input.readMessage(getCacheKeyPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 1274109818 + case 1893457624: + { + serveWhileStale_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case 1893457624 + case -2139971024: + { + signedUrlCacheMaxAgeSec_ = input.readInt64(); + bitField0_ |= 0x00000400; + break; + } // case -2139971024 + case -1834343288: + { + maxTtl_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case -1834343288 + case -1606087256: + { + negativeCaching_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case -1606087256 + case -1320176214: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSignedUrlKeyNamesIsMutable(); + signedUrlKeyNames_.add(s); + break; + } // case -1320176214 + case -405342638: + { + com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader m = + input.readMessage( + com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader + .parser(), + extensionRegistry); + if (bypassCacheOnRequestHeadersBuilder_ == null) { + ensureBypassCacheOnRequestHeadersIsMutable(); + bypassCacheOnRequestHeaders_.add(m); + } else { + bypassCacheOnRequestHeadersBuilder_.addMessage(m); + } + break; + } // case -405342638 + case -32501088: + { + requestCoalescing_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case -32501088 + 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.compute.v1.BackendBucketCdnPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3529,7 +3477,18 @@ public BackendBucketCdnPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendBucketCdnPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyBypassCacheOnRequestHeader.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyBypassCacheOnRequestHeader.java index 10435fc6263e..ead4546daf20 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyBypassCacheOnRequestHeader.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyBypassCacheOnRequestHeader.java @@ -54,53 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendBucketCdnPolicyBypassCacheOnRequestHeader( - 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 881788906: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - headerName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendBucketCdnPolicyBypassCacheOnRequestHeader_descriptor; @@ -199,7 +152,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 110223613, headerName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -211,7 +164,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(110223613, headerName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -232,7 +185,7 @@ public boolean equals(final java.lang.Object obj) { if (hasHeaderName()) { if (!getHeaderName().equals(other.getHeaderName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -247,7 +200,7 @@ public int hashCode() { hash = (37 * hash) + HEADER_NAME_FIELD_NUMBER; hash = (53 * hash) + getHeaderName().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -385,17 +338,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader.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 @@ -500,7 +446,7 @@ public Builder mergeFrom( headerName_ = other.headerName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -515,20 +461,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader 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 881788906: + { + headerName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 881788906 + 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.compute.v1.BackendBucketCdnPolicyBypassCacheOnRequestHeader) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -691,7 +654,19 @@ public BackendBucketCdnPolicyBypassCacheOnRequestHeader parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendBucketCdnPolicyBypassCacheOnRequestHeader(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyCacheKeyPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyCacheKeyPolicy.java index ea133307439f..bd434225df2d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyCacheKeyPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyCacheKeyPolicy.java @@ -55,72 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendBucketCdnPolicyCacheKeyPolicy( - 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 19916850: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - includeHttpHeaders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - includeHttpHeaders_.add(s); - break; - } - case 419651970: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - queryStringWhitelist_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - queryStringWhitelist_.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)) { - includeHttpHeaders_ = includeHttpHeaders_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - queryStringWhitelist_ = queryStringWhitelist_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendBucketCdnPolicyCacheKeyPolicy_descriptor; @@ -280,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 52456496, queryStringWhitelist_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -305,7 +239,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getQueryStringWhitelistList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -323,7 +257,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIncludeHttpHeadersList().equals(other.getIncludeHttpHeadersList())) return false; if (!getQueryStringWhitelistList().equals(other.getQueryStringWhitelistList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -342,7 +276,7 @@ public int hashCode() { hash = (37 * hash) + QUERY_STRING_WHITELIST_FIELD_NUMBER; hash = (53 * hash) + getQueryStringWhitelistList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -472,17 +406,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy.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 @@ -603,7 +530,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -618,19 +545,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy 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 19916850: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludeHttpHeadersIsMutable(); + includeHttpHeaders_.add(s); + break; + } // case 19916850 + case 419651970: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryStringWhitelistIsMutable(); + queryStringWhitelist_.add(s); + break; + } // case 419651970 + 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.compute.v1.BackendBucketCdnPolicyCacheKeyPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1006,7 +959,18 @@ public BackendBucketCdnPolicyCacheKeyPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendBucketCdnPolicyCacheKeyPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyNegativeCachingPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyNegativeCachingPolicy.java index b048594e81f3..dcbaddd39b23 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyNegativeCachingPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketCdnPolicyNegativeCachingPolicy.java @@ -52,58 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendBucketCdnPolicyNegativeCachingPolicy( - 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 921440: - { - bitField0_ |= 0x00000002; - ttl_ = input.readInt32(); - break; - } - case 24473448: - { - bitField0_ |= 0x00000001; - code_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendBucketCdnPolicyNegativeCachingPolicy_descriptor; @@ -206,7 +154,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(3059181, code_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -221,7 +169,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3059181, code_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -245,7 +193,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTtl()) { if (getTtl() != other.getTtl()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -264,7 +212,7 @@ public int hashCode() { hash = (37 * hash) + TTL_FIELD_NUMBER; hash = (53 * hash) + getTtl(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -397,17 +345,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy.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 +459,7 @@ public Builder mergeFrom( if (other.hasTtl()) { setTtl(other.getTtl()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -533,19 +474,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy 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 921440: + { + ttl_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 921440 + case 24473448: + { + code_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 24473448 + 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.compute.v1.BackendBucketCdnPolicyNegativeCachingPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -721,7 +686,19 @@ public BackendBucketCdnPolicyNegativeCachingPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendBucketCdnPolicyNegativeCachingPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketList.java index 1703d399aa34..d1efa1e594bc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendBucketList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendBucketList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.BackendBucket.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendBucketList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendBucketList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendBucketList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.BackendBucket m = + input.readMessage( + com.google.cloud.compute.v1.BackendBucket.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.BackendBucketList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public BackendBucketList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendBucketList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendService.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendService.java index b8d442b0fd97..22a9a29716ca 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendService.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendService.java @@ -73,473 +73,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendService( - 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; - int mutable_bitField1_ = 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 26840: - { - bitField0_ |= 0x00004000; - id_ = input.readUInt64(); - break; - } - case 832194: - { - com.google.cloud.compute.v1.BackendServiceIAP.Builder subBuilder = null; - if (((bitField0_ & 0x00002000) != 0)) { - subBuilder = iap_.toBuilder(); - } - iap_ = - input.readMessage( - com.google.cloud.compute.v1.BackendServiceIAP.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(iap_); - iap_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00002000; - break; - } - case 7247066: - { - com.google.cloud.compute.v1.ConsistentHashLoadBalancerSettings.Builder subBuilder = - null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = consistentHash_.toBuilder(); - } - consistentHash_ = - input.readMessage( - com.google.cloud.compute.v1.ConsistentHashLoadBalancerSettings.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(consistentHash_); - consistentHash_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00100000; - name_ = s; - break; - } - case 27575304: - { - bitField0_ |= 0x00800000; - port_ = input.readInt32(); - break; - } - case 223823938: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - customRequestHeaders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000200; - } - customRequestHeaders_.add(s); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - creationTimestamp_ = s; - break; - } - case 328295546: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - edgeSecurityPolicy_ = s; - break; - } - case 332274762: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x01000000; - portName_ = s; - break; - } - case 491427010: - { - com.google.cloud.compute.v1.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00080000) != 0)) { - subBuilder = maxStreamDuration_.toBuilder(); - } - maxStreamDuration_ = - input.readMessage( - com.google.cloud.compute.v1.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxStreamDuration_); - maxStreamDuration_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00080000; - break; - } - case 639959960: - { - bitField1_ |= 0x00000001; - timeoutSec_ = input.readInt32(); - break; - } - case 676623554: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x02000000; - protocol_ = s; - break; - } - case 764167906: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - compressionMode_ = s; - break; - } - case 845269242: - { - com.google.cloud.compute.v1.BackendServiceFailoverPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000800) != 0)) { - subBuilder = failoverPolicy_.toBuilder(); - } - failoverPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.BackendServiceFailoverPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(failoverPolicy_); - failoverPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000800; - break; - } - case 1051451898: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - localityLbPolicy_ = s; - break; - } - case 1068648130: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField1_ & 0x00000008) != 0)) { - serviceBindings_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField1_ |= 0x00000008; - } - serviceBindings_.add(s); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x04000000; - region_ = s; - break; - } - case 1127860458: - { - if (!((mutable_bitField0_ & 0x00200000) != 0)) { - localityLbPolicies_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .BackendServiceLocalityLoadBalancingPolicyConfig>(); - mutable_bitField0_ |= 0x00200000; - } - localityLbPolicies_.add( - input.readMessage( - com.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfig - .parser(), - extensionRegistry)); - break; - } - case 1151959754: - { - com.google.cloud.compute.v1.BackendServiceConnectionTrackingPolicy.Builder - subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = connectionTrackingPolicy_.toBuilder(); - } - connectionTrackingPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.BackendServiceConnectionTrackingPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(connectionTrackingPolicy_); - connectionTrackingPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x08000000; - securityPolicy_ = s; - break; - } - case 1711811618: - { - com.google.cloud.compute.v1.BackendServiceCdnPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = cdnPolicy_.toBuilder(); - } - cdnPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.BackendServiceCdnPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cdnPolicy_); - cdnPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00200000; - network_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - fingerprint_ = s; - break; - } - case 2005867992: - { - bitField0_ |= 0x00000400; - enableCDN_ = input.readBool(); - break; - } - case -1484569366: - { - com.google.cloud.compute.v1.BackendServiceLogConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00040000) != 0)) { - subBuilder = logConfig_.toBuilder(); - } - logConfig_ = - input.readMessage( - com.google.cloud.compute.v1.BackendServiceLogConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(logConfig_); - logConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00040000; - break; - } - case -1457966606: - { - com.google.cloud.compute.v1.OutlierDetection.Builder subBuilder = null; - if (((bitField0_ & 0x00400000) != 0)) { - subBuilder = outlierDetection_.toBuilder(); - } - outlierDetection_ = - input.readMessage( - com.google.cloud.compute.v1.OutlierDetection.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outlierDetection_); - outlierDetection_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00400000; - break; - } - case -1383845342: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - loadBalancingScheme_ = s; - break; - } - case -1334991664: - { - bitField0_ |= 0x00000001; - affinityCookieTtlSec_ = input.readInt32(); - break; - } - case -1194654542: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - customResponseHeaders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000400; - } - customResponseHeaders_.add(s); - break; - } - case -924246806: - { - com.google.cloud.compute.v1.CircuitBreakers.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = circuitBreakers_.toBuilder(); - } - circuitBreakers_ = - input.readMessage( - com.google.cloud.compute.v1.CircuitBreakers.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(circuitBreakers_); - circuitBreakers_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - description_ = s; - break; - } - case -708002446: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00010000) != 0)) { - healthChecks_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00010000; - } - healthChecks_.add(s); - break; - } - case -692699006: - { - com.google.cloud.compute.v1.Subsetting.Builder subBuilder = null; - if (((bitField0_ & 0x80000000) != 0)) { - subBuilder = subsetting_.toBuilder(); - } - subsetting_ = - input.readMessage( - com.google.cloud.compute.v1.Subsetting.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(subsetting_); - subsetting_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x80000000; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x20000000; - selfLink_ = s; - break; - } - case -606193318: - { - com.google.cloud.compute.v1.ConnectionDraining.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = connectionDraining_.toBuilder(); - } - connectionDraining_ = - input.readMessage( - com.google.cloud.compute.v1.ConnectionDraining.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(connectionDraining_); - connectionDraining_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case -583858806: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x40000000; - sessionAffinity_ = s; - break; - } - case -465767918: - { - com.google.cloud.compute.v1.SecuritySettings.Builder subBuilder = null; - if (((bitField0_ & 0x10000000) != 0)) { - subBuilder = securitySettings_.toBuilder(); - } - securitySettings_ = - input.readMessage( - com.google.cloud.compute.v1.SecuritySettings.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securitySettings_); - securitySettings_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x10000000; - break; - } - case -208248070: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - backends_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - backends_.add( - input.readMessage( - com.google.cloud.compute.v1.Backend.parser(), extensionRegistry)); - 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_ & 0x00000200) != 0)) { - customRequestHeaders_ = customRequestHeaders_.getUnmodifiableView(); - } - if (((mutable_bitField1_ & 0x00000008) != 0)) { - serviceBindings_ = serviceBindings_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00200000) != 0)) { - localityLbPolicies_ = java.util.Collections.unmodifiableList(localityLbPolicies_); - } - if (((mutable_bitField0_ & 0x00000400) != 0)) { - customResponseHeaders_ = customResponseHeaders_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00010000) != 0)) { - healthChecks_ = healthChecks_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - backends_ = java.util.Collections.unmodifiableList(backends_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendService_descriptor; @@ -4053,7 +3586,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < backends_.size(); i++) { output.writeMessage(510839903, backends_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4218,7 +3751,7 @@ public int getSerializedSize() { for (int i = 0; i < backends_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(510839903, backends_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4372,7 +3905,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTimeoutSec()) { if (getTimeoutSec() != other.getTimeoutSec()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4539,7 +4072,7 @@ public int hashCode() { hash = (37 * hash) + TIMEOUT_SEC_FIELD_NUMBER; hash = (53 * hash) + getTimeoutSec(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4703,10 +4236,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (backendsBuilder_ == null) { backends_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + backends_ = null; backendsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (cdnPolicyBuilder_ == null) { cdnPolicy_ = null; } else { @@ -4775,10 +4309,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00100000); if (localityLbPoliciesBuilder_ == null) { localityLbPolicies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00200000); } else { + localityLbPolicies_ = null; localityLbPoliciesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00200000); localityLbPolicy_ = ""; bitField0_ = (bitField0_ & ~0x00400000); if (logConfigBuilder_ == null) { @@ -5358,7 +4893,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendService other) { if (other.hasTimeoutSec()) { setTimeoutSec(other.getTimeoutSec()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5373,17 +4908,290 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendService 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00040000; + break; + } // case 26840 + case 832194: + { + input.readMessage(getIapFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case 832194 + case 7247066: + { + input.readMessage(getConsistentHashFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 7247066 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case 26989658 + case 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x10000000; + break; + } // case 27575304 + case 223823938: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCustomRequestHeadersIsMutable(); + customRequestHeaders_.add(s); + break; + } // case 223823938 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 244202930 + case 328295546: + { + edgeSecurityPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 328295546 + case 332274762: + { + portName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x20000000; + break; + } // case 332274762 + case 491427010: + { + input.readMessage( + getMaxStreamDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case 491427010 + case 639959960: + { + timeoutSec_ = input.readInt32(); + bitField1_ |= 0x00000040; + break; + } // case 639959960 + case 676623554: + { + protocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case 676623554 + case 764167906: + { + compressionMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 764167906 + case 845269242: + { + input.readMessage(getFailoverPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 845269242 + case 1051451898: + { + localityLbPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 1051451898 + case 1068648130: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureServiceBindingsIsMutable(); + serviceBindings_.add(s); + break; + } // case 1068648130 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x80000000; + break; + } // case 1111570338 + case 1127860458: + { + com.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfig m = + input.readMessage( + com.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfig + .parser(), + extensionRegistry); + if (localityLbPoliciesBuilder_ == null) { + ensureLocalityLbPoliciesIsMutable(); + localityLbPolicies_.add(m); + } else { + localityLbPoliciesBuilder_.addMessage(m); + } + break; + } // case 1127860458 + case 1151959754: + { + input.readMessage( + getConnectionTrackingPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 1151959754 + case 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000001; + break; + } // case 1368660106 + case 1711811618: + { + input.readMessage(getCdnPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 1711811618 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x04000000; + break; + } // case 1862979954 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 1877428002 + case 2005867992: + { + enableCDN_ = input.readBool(); + bitField0_ |= 0x00002000; + break; + } // case 2005867992 + case -1484569366: + { + input.readMessage(getLogConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00800000; + break; + } // case -1484569366 + case -1457966606: + { + input.readMessage( + getOutlierDetectionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x08000000; + break; + } // case -1457966606 + case -1383845342: + { + loadBalancingScheme_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00100000; + break; + } // case -1383845342 + case -1334991664: + { + affinityCookieTtlSec_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -1334991664 + case -1194654542: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCustomResponseHeadersIsMutable(); + customResponseHeaders_.add(s); + break; + } // case -1194654542 + case -924246806: + { + input.readMessage(getCircuitBreakersFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -924246806 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -911466526 + case -708002446: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHealthChecksIsMutable(); + healthChecks_.add(s); + break; + } // case -708002446 + case -692699006: + { + input.readMessage(getSubsettingFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000020; + break; + } // case -692699006 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000004; + break; + } // case -645248918 + case -606193318: + { + input.readMessage( + getConnectionDrainingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case -606193318 + case -583858806: + { + sessionAffinity_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000010; + break; + } // case -583858806 + case -465767918: + { + input.readMessage( + getSecuritySettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000002; + break; + } // case -465767918 + case -208248070: + { + com.google.cloud.compute.v1.Backend m = + input.readMessage( + com.google.cloud.compute.v1.Backend.parser(), extensionRegistry); + if (backendsBuilder_ == null) { + ensureBackendsIsMutable(); + backends_.add(m); + } else { + backendsBuilder_.addMessage(m); + } + break; + } // case -208248070 + 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.compute.v1.BackendService) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11347,7 +11155,18 @@ public BackendService parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendService(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceAggregatedList.java index 1440fc6018bf..1427f65e826b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceAggregatedList.java @@ -56,119 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.BackendServicesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceAggregatedList_descriptor; @@ -710,7 +597,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -755,7 +642,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -793,7 +680,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -832,7 +719,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1162,7 +1049,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendServiceAggregatedLis if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1177,18 +1064,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.BackendServicesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.BackendServiceAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2246,7 +2194,18 @@ public BackendServiceAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicy.java index 9e9156556a0d..8950bd6eb540 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicy.java @@ -55,162 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceCdnPolicy( - 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 231023106: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - cacheMode_ = s; - break; - } - case 232274880: - { - bitField0_ |= 0x00000004; - clientTtl_ = input.readInt32(); - break; - } - case 802027376: - { - bitField0_ |= 0x00000008; - defaultTtl_ = input.readInt32(); - break; - } - case 1242879970: - { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - negativeCachingPolicy_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.BackendServiceCdnPolicyNegativeCachingPolicy>(); - mutable_bitField0_ |= 0x00000080; - } - negativeCachingPolicy_.add( - input.readMessage( - com.google.cloud.compute.v1.BackendServiceCdnPolicyNegativeCachingPolicy - .parser(), - extensionRegistry)); - break; - } - case 1274109818: - { - com.google.cloud.compute.v1.CacheKeyPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = cacheKeyPolicy_.toBuilder(); - } - cacheKeyPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.CacheKeyPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cacheKeyPolicy_); - cacheKeyPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1893457624: - { - bitField0_ |= 0x00000080; - serveWhileStale_ = input.readInt32(); - break; - } - case -2139971024: - { - bitField0_ |= 0x00000100; - signedUrlCacheMaxAgeSec_ = input.readInt64(); - break; - } - case -1834343288: - { - bitField0_ |= 0x00000010; - maxTtl_ = input.readInt32(); - break; - } - case -1606087256: - { - bitField0_ |= 0x00000020; - negativeCaching_ = input.readBool(); - break; - } - case -1320176214: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - signedUrlKeyNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000800; - } - signedUrlKeyNames_.add(s); - break; - } - case -405342638: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bypassCacheOnRequestHeaders_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .BackendServiceCdnPolicyBypassCacheOnRequestHeader>(); - mutable_bitField0_ |= 0x00000001; - } - bypassCacheOnRequestHeaders_.add( - input.readMessage( - com.google.cloud.compute.v1.BackendServiceCdnPolicyBypassCacheOnRequestHeader - .parser(), - extensionRegistry)); - break; - } - case -32501088: - { - bitField0_ |= 0x00000040; - requestCoalescing_ = 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 { - if (((mutable_bitField0_ & 0x00000080) != 0)) { - negativeCachingPolicy_ = java.util.Collections.unmodifiableList(negativeCachingPolicy_); - } - if (((mutable_bitField0_ & 0x00000800) != 0)) { - signedUrlKeyNames_ = signedUrlKeyNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - bypassCacheOnRequestHeaders_ = - java.util.Collections.unmodifiableList(bypassCacheOnRequestHeaders_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceCdnPolicy_descriptor; @@ -1047,7 +891,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { output.writeBool(532808276, requestCoalescing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1104,7 +948,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(532808276, requestCoalescing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1160,7 +1004,7 @@ public boolean equals(final java.lang.Object obj) { if (getSignedUrlCacheMaxAgeSec() != other.getSignedUrlCacheMaxAgeSec()) return false; } if (!getSignedUrlKeyNamesList().equals(other.getSignedUrlKeyNamesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1219,7 +1063,7 @@ public int hashCode() { hash = (37 * hash) + SIGNED_URL_KEY_NAMES_FIELD_NUMBER; hash = (53 * hash) + getSignedUrlKeyNamesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1370,10 +1214,11 @@ public Builder clear() { super.clear(); if (bypassCacheOnRequestHeadersBuilder_ == null) { bypassCacheOnRequestHeaders_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bypassCacheOnRequestHeaders_ = null; bypassCacheOnRequestHeadersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (cacheKeyPolicyBuilder_ == null) { cacheKeyPolicy_ = null; } else { @@ -1392,10 +1237,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000040); if (negativeCachingPolicyBuilder_ == null) { negativeCachingPolicy_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); } else { + negativeCachingPolicy_ = null; negativeCachingPolicyBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000080); requestCoalescing_ = false; bitField0_ = (bitField0_ & ~0x00000100); serveWhileStale_ = 0; @@ -1641,7 +1487,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendServiceCdnPolicy oth } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1656,18 +1502,122 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceCdnPolicy 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 231023106: + { + cacheMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 231023106 + case 232274880: + { + clientTtl_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 232274880 + case 802027376: + { + defaultTtl_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 802027376 + case 1242879970: + { + com.google.cloud.compute.v1.BackendServiceCdnPolicyNegativeCachingPolicy m = + input.readMessage( + com.google.cloud.compute.v1.BackendServiceCdnPolicyNegativeCachingPolicy + .parser(), + extensionRegistry); + if (negativeCachingPolicyBuilder_ == null) { + ensureNegativeCachingPolicyIsMutable(); + negativeCachingPolicy_.add(m); + } else { + negativeCachingPolicyBuilder_.addMessage(m); + } + break; + } // case 1242879970 + case 1274109818: + { + input.readMessage(getCacheKeyPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 1274109818 + case 1893457624: + { + serveWhileStale_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case 1893457624 + case -2139971024: + { + signedUrlCacheMaxAgeSec_ = input.readInt64(); + bitField0_ |= 0x00000400; + break; + } // case -2139971024 + case -1834343288: + { + maxTtl_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case -1834343288 + case -1606087256: + { + negativeCaching_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case -1606087256 + case -1320176214: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSignedUrlKeyNamesIsMutable(); + signedUrlKeyNames_.add(s); + break; + } // case -1320176214 + case -405342638: + { + com.google.cloud.compute.v1.BackendServiceCdnPolicyBypassCacheOnRequestHeader m = + input.readMessage( + com.google.cloud.compute.v1 + .BackendServiceCdnPolicyBypassCacheOnRequestHeader.parser(), + extensionRegistry); + if (bypassCacheOnRequestHeadersBuilder_ == null) { + ensureBypassCacheOnRequestHeadersIsMutable(); + bypassCacheOnRequestHeaders_.add(m); + } else { + bypassCacheOnRequestHeadersBuilder_.addMessage(m); + } + break; + } // case -405342638 + case -32501088: + { + requestCoalescing_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case -32501088 + 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.compute.v1.BackendServiceCdnPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3496,7 +3446,18 @@ public BackendServiceCdnPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceCdnPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicyBypassCacheOnRequestHeader.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicyBypassCacheOnRequestHeader.java index cbe38b74bae2..e22ea569f592 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicyBypassCacheOnRequestHeader.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicyBypassCacheOnRequestHeader.java @@ -54,53 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceCdnPolicyBypassCacheOnRequestHeader( - 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 881788906: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - headerName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceCdnPolicyBypassCacheOnRequestHeader_descriptor; @@ -199,7 +152,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 110223613, headerName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -211,7 +164,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(110223613, headerName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -232,7 +185,7 @@ public boolean equals(final java.lang.Object obj) { if (hasHeaderName()) { if (!getHeaderName().equals(other.getHeaderName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -247,7 +200,7 @@ public int hashCode() { hash = (37 * hash) + HEADER_NAME_FIELD_NUMBER; hash = (53 * hash) + getHeaderName().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -385,17 +338,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.BackendServiceCdnPolicyBypassCacheOnRequestHeader.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 @@ -501,7 +447,7 @@ public Builder mergeFrom( headerName_ = other.headerName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -516,20 +462,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceCdnPolicyBypassCacheOnRequestHeader 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 881788906: + { + headerName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 881788906 + 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.compute.v1.BackendServiceCdnPolicyBypassCacheOnRequestHeader) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -692,8 +655,19 @@ public BackendServiceCdnPolicyBypassCacheOnRequestHeader parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceCdnPolicyBypassCacheOnRequestHeader( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicyNegativeCachingPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicyNegativeCachingPolicy.java index 59750370a795..a8459e6500fe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicyNegativeCachingPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceCdnPolicyNegativeCachingPolicy.java @@ -52,58 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceCdnPolicyNegativeCachingPolicy( - 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 921440: - { - bitField0_ |= 0x00000002; - ttl_ = input.readInt32(); - break; - } - case 24473448: - { - bitField0_ |= 0x00000001; - code_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceCdnPolicyNegativeCachingPolicy_descriptor; @@ -206,7 +154,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(3059181, code_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -221,7 +169,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3059181, code_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -246,7 +194,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTtl()) { if (getTtl() != other.getTtl()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -265,7 +213,7 @@ public int hashCode() { hash = (37 * hash) + TTL_FIELD_NUMBER; hash = (53 * hash) + getTtl(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -398,17 +346,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.BackendServiceCdnPolicyNegativeCachingPolicy.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 @@ -519,7 +460,7 @@ public Builder mergeFrom( if (other.hasTtl()) { setTtl(other.getTtl()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -534,19 +475,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceCdnPolicyNegativeCachingPolicy 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 921440: + { + ttl_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 921440 + case 24473448: + { + code_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 24473448 + 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.compute.v1.BackendServiceCdnPolicyNegativeCachingPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -722,7 +687,19 @@ public BackendServiceCdnPolicyNegativeCachingPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceCdnPolicyNegativeCachingPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceConnectionTrackingPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceConnectionTrackingPolicy.java index 59facc85c0b6..4f7b49877e33 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceConnectionTrackingPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceConnectionTrackingPolicy.java @@ -55,72 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceConnectionTrackingPolicy( - 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 196319392: - { - bitField0_ |= 0x00000002; - enableStrongAffinity_ = input.readBool(); - break; - } - case 199820352: - { - bitField0_ |= 0x00000004; - idleTimeoutSec_ = input.readInt32(); - break; - } - case 1022062938: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - trackingMode_ = s; - break; - } - case 1219512266: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - connectionPersistenceOnUnhealthyBackends_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceConnectionTrackingPolicy_descriptor; @@ -638,7 +572,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 152439033, connectionPersistenceOnUnhealthyBackends_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -662,7 +596,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 152439033, connectionPersistenceOnUnhealthyBackends_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -696,7 +630,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTrackingMode()) { if (!getTrackingMode().equals(other.getTrackingMode())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -723,7 +657,7 @@ public int hashCode() { hash = (37 * hash) + TRACKING_MODE_FIELD_NUMBER; hash = (53 * hash) + getTrackingMode().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -855,17 +789,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.BackendServiceConnectionTrackingPolicy.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 @@ -996,7 +923,7 @@ public Builder mergeFrom( trackingMode_ = other.trackingMode_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1011,19 +938,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceConnectionTrackingPolicy 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 196319392: + { + enableStrongAffinity_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 196319392 + case 199820352: + { + idleTimeoutSec_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 199820352 + case 1022062938: + { + trackingMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1022062938 + case 1219512266: + { + connectionPersistenceOnUnhealthyBackends_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1219512266 + 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.compute.v1.BackendServiceConnectionTrackingPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1451,7 +1414,18 @@ public BackendServiceConnectionTrackingPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceConnectionTrackingPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceFailoverPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceFailoverPolicy.java index 4a64b075976a..03d41e1a98af 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceFailoverPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceFailoverPolicy.java @@ -50,64 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceFailoverPolicy( - 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 898315424: - { - bitField0_ |= 0x00000002; - dropTrafficIfUnhealthy_ = input.readBool(); - break; - } - case 1457206024: - { - bitField0_ |= 0x00000001; - disableConnectionDrainOnFailover_ = input.readBool(); - break; - } - case 1701336053: - { - bitField0_ |= 0x00000004; - failoverRatio_ = input.readFloat(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceFailoverPolicy_descriptor; @@ -246,7 +188,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeFloat(212667006, failoverRatio_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -267,7 +209,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(212667006, failoverRatio_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -298,7 +240,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getFailoverRatio()) != java.lang.Float.floatToIntBits(other.getFailoverRatio())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -323,7 +265,7 @@ public int hashCode() { hash = (37 * hash) + FAILOVER_RATIO_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getFailoverRatio()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -453,17 +395,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.BackendServiceFailoverPolicy.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 @@ -576,7 +511,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendServiceFailoverPolic if (other.hasFailoverRatio()) { setFailoverRatio(other.getFailoverRatio()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -591,18 +526,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceFailoverPolicy 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 898315424: + { + dropTrafficIfUnhealthy_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 898315424 + case 1457206024: + { + disableConnectionDrainOnFailover_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 1457206024 + case 1701336053: + { + failoverRatio_ = input.readFloat(); + bitField0_ |= 0x00000004; + break; + } // case 1701336053 + 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.compute.v1.BackendServiceFailoverPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -841,7 +807,18 @@ public BackendServiceFailoverPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceFailoverPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceGroupHealth.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceGroupHealth.java index 7a5ced61ad18..f9ae912e41fe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceGroupHealth.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceGroupHealth.java @@ -52,82 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceGroupHealth( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - kind_ = s; - break; - } - case 896260386: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case -1250600534: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - healthStatus_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - healthStatus_.add( - input.readMessage( - com.google.cloud.compute.v1.HealthStatus.parser(), extensionRegistry)); - 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_ & 0x00000002) != 0)) { - healthStatus_ = java.util.Collections.unmodifiableList(healthStatus_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceGroupHealth_descriptor; @@ -410,7 +334,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < healthStatus_.size(); i++) { output.writeMessage(380545845, healthStatus_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -436,7 +360,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(380545845, healthStatus_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -458,7 +382,7 @@ public boolean equals(final java.lang.Object obj) { if (hasKind()) { if (!getKind().equals(other.getKind())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -481,7 +405,7 @@ public int hashCode() { hash = (37 * hash) + KIND_FIELD_NUMBER; hash = (53 * hash) + getKind().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -630,19 +554,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.BackendServiceGroupHealth.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) { - getHealthStatusFieldBuilder(); - } } @java.lang.Override @@ -651,10 +566,11 @@ public Builder clear() { internalGetMutableAnnotations().clear(); if (healthStatusBuilder_ == null) { healthStatus_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + healthStatus_ = null; healthStatusBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); return this; @@ -785,7 +701,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendServiceGroupHealth o kind_ = other.kind_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -800,18 +716,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceGroupHealth 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 896260386: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 896260386 + case -1250600534: + { + com.google.cloud.compute.v1.HealthStatus m = + input.readMessage( + com.google.cloud.compute.v1.HealthStatus.parser(), extensionRegistry); + if (healthStatusBuilder_ == null) { + ensureHealthStatusIsMutable(); + healthStatus_.add(m); + } else { + healthStatusBuilder_.addMessage(m); + } + break; + } // case -1250600534 + 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.compute.v1.BackendServiceGroupHealth) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1481,7 +1440,18 @@ public BackendServiceGroupHealth parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceGroupHealth(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceIAP.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceIAP.java index 2dd88ef492f4..5c14ece6c4ed 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceIAP.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceIAP.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceIAP( - 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 8149512: - { - bitField0_ |= 0x00000001; - enabled_ = input.readBool(); - break; - } - case 407996162: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - oauth2ClientSecret_ = s; - break; - } - case 903230258: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - oauth2ClientSecretSha256_ = s; - break; - } - case -1782826406: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - oauth2ClientId_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceIAP_descriptor; @@ -389,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 314017611, oauth2ClientId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -413,7 +346,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(314017611, oauth2ClientId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -445,7 +378,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOauth2ClientSecretSha256()) { if (!getOauth2ClientSecretSha256().equals(other.getOauth2ClientSecretSha256())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -472,7 +405,7 @@ public int hashCode() { hash = (37 * hash) + OAUTH2_CLIENT_SECRET_SHA256_FIELD_NUMBER; hash = (53 * hash) + getOauth2ClientSecretSha256().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -601,17 +534,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.BackendServiceIAP.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 @@ -738,7 +664,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendServiceIAP other) { oauth2ClientSecretSha256_ = other.oauth2ClientSecretSha256_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -753,17 +679,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceIAP 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 8149512: + { + enabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 8149512 + case 407996162: + { + oauth2ClientSecret_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 407996162 + case 903230258: + { + oauth2ClientSecretSha256_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 903230258 + case -1782826406: + { + oauth2ClientId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1782826406 + 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.compute.v1.BackendServiceIAP) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1192,18 @@ public BackendServiceIAP parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceIAP(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceList.java index 9aa358c0892c..9df7329717c6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.BackendService.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendServiceList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.BackendService m = + input.readMessage( + com.google.cloud.compute.v1.BackendService.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.BackendServiceList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2080,7 +2040,18 @@ public BackendServiceList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfig.java index 74d84c51124f..7c802ead923f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfig.java @@ -52,86 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceLocalityLoadBalancingPolicyConfig( - 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 38546946: - { - com.google.cloud.compute.v1 - .BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy.Builder - subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = customPolicy_.toBuilder(); - } - customPolicy_ = - input.readMessage( - com.google.cloud.compute.v1 - .BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(customPolicy_); - customPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 728574354: - { - com.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigPolicy - .Builder - subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage( - com.google.cloud.compute.v1 - .BackendServiceLocalityLoadBalancingPolicyConfigPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceLocalityLoadBalancingPolicyConfig_descriptor; @@ -255,7 +175,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(91071794, getPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -270,7 +190,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(91071794, getPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -295,7 +215,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -314,7 +234,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -593,7 +513,7 @@ public Builder mergeFrom( if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,20 +528,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfig 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 38546946: + { + input.readMessage(getCustomPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 38546946 + case 728574354: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 728574354 + 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.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfig) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1011,7 +954,19 @@ public BackendServiceLocalityLoadBalancingPolicyConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceLocalityLoadBalancingPolicyConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy.java index a172fddd1a85..36c3dec303f7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy.java @@ -56,60 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy( - 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 24608082: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - data_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy_descriptor; @@ -276,7 +222,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +237,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -318,7 +264,7 @@ public boolean equals(final java.lang.Object obj) { if (hasName()) { if (!getName().equals(other.getName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -337,7 +283,7 @@ public int 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; } @@ -491,17 +437,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy.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 @@ -624,7 +563,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -639,21 +578,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy - 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 24608082: + { + data_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24608082 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26989658 + 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.compute.v1 - .BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -940,8 +901,19 @@ public BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy parsePartialF com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceLocalityLoadBalancingPolicyConfigCustomPolicy( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfigPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfigPolicy.java index 0087ffb69650..137b22524af2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfigPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLocalityLoadBalancingPolicyConfigPolicy.java @@ -55,53 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceLocalityLoadBalancingPolicyConfigPolicy( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceLocalityLoadBalancingPolicyConfigPolicy_descriptor; @@ -458,7 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -470,7 +423,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -492,7 +445,7 @@ public boolean equals(final java.lang.Object obj) { if (hasName()) { if (!getName().equals(other.getName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -507,7 +460,7 @@ public int 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; } @@ -647,17 +600,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigPolicy.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 @@ -766,7 +712,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -781,20 +727,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigPolicy - 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + 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.compute.v1.BackendServiceLocalityLoadBalancingPolicyConfigPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -965,8 +928,19 @@ public BackendServiceLocalityLoadBalancingPolicyConfigPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceLocalityLoadBalancingPolicyConfigPolicy( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLogConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLogConfig.java index e16ab6bcb923..576421e47bf1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLogConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceLogConfig.java @@ -50,58 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceLogConfig( - 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 1225544365: - { - bitField0_ |= 0x00000002; - sampleRate_ = input.readFloat(); - break; - } - case -1800852456: - { - bitField0_ |= 0x00000001; - enable_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceLogConfig_descriptor; @@ -204,7 +152,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(311764355, enable_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +167,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(311764355, enable_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -244,7 +192,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getSampleRate()) != java.lang.Float.floatToIntBits(other.getSampleRate())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -263,7 +211,7 @@ public int hashCode() { hash = (37 * hash) + SAMPLE_RATE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getSampleRate()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -392,17 +340,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.BackendServiceLogConfig.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 @@ -506,7 +447,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendServiceLogConfig oth if (other.hasSampleRate()) { setSampleRate(other.getSampleRate()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -521,18 +462,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceLogConfig 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 1225544365: + { + sampleRate_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 1225544365 + case -1800852456: + { + enable_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1800852456 + 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.compute.v1.BackendServiceLogConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -704,7 +670,18 @@ public BackendServiceLogConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceLogConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceReference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceReference.java index e22a2df3da97..df722703d523 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceReference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServiceReference.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServiceReference( - 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 -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - backendService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServiceReference_descriptor; @@ -177,7 +130,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -189,7 +142,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -209,7 +162,7 @@ public boolean equals(final java.lang.Object obj) { if (hasBackendService()) { if (!getBackendService().equals(other.getBackendService())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -224,7 +177,7 @@ public int hashCode() { hash = (37 * hash) + BACKEND_SERVICE_FIELD_NUMBER; hash = (53 * hash) + getBackendService().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -352,17 +305,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.BackendServiceReference.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 @@ -459,7 +405,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendServiceReference oth backendService_ = other.backendService_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,18 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServiceReference 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 -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1839398830 + 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.compute.v1.BackendServiceReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -607,7 +572,18 @@ public BackendServiceReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServiceReference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServicesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServicesScopedList.java index 38dba6d32076..b314356fc4e2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServicesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BackendServicesScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BackendServicesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1186788022: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - backendServices_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - backendServices_.add( - input.readMessage( - com.google.cloud.compute.v1.BackendService.parser(), extensionRegistry)); - 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)) { - backendServices_ = java.util.Collections.unmodifiableList(backendServices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BackendServicesScopedList_descriptor; @@ -274,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < backendServices_.size(); i++) { output.writeMessage(388522409, backendServices_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +220,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 388522409, backendServices_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,10 +410,11 @@ public Builder clear() { super.clear(); if (backendServicesBuilder_ == null) { backendServices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + backendServices_ = null; backendServicesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -618,7 +548,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BackendServicesScopedList o if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,18 +563,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BackendServicesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1186788022: + { + com.google.cloud.compute.v1.BackendService m = + input.readMessage( + com.google.cloud.compute.v1.BackendService.parser(), extensionRegistry); + if (backendServicesBuilder_ == null) { + ensureBackendServicesIsMutable(); + backendServices_.add(m); + } else { + backendServicesBuilder_.addMessage(m); + } + break; + } // case -1186788022 + 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.compute.v1.BackendServicesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1223,7 +1185,18 @@ public BackendServicesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackendServicesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdPacket.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdPacket.java index 4123a05de48e..15e8c1a2723d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdPacket.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdPacket.java @@ -52,144 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BfdPacket( - 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 27573752: - { - bitField0_ |= 0x00001000; - poll_ = input.readBool(); - break; - } - case 498908584: - { - bitField0_ |= 0x00000002; - controlPlaneIndependent_ = input.readBool(); - break; - } - case 501669178: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - diagnostic_ = s; - break; - } - case 613304904: - { - bitField0_ |= 0x00000800; - myDiscriminator_ = input.readUInt32(); - break; - } - case 778294944: - { - bitField0_ |= 0x00000040; - minEchoRxIntervalMs_ = input.readUInt32(); - break; - } - case 779488176: - { - bitField0_ |= 0x00000010; - final_ = input.readBool(); - break; - } - case 847794080: - { - bitField0_ |= 0x00000001; - authenticationPresent_ = input.readBool(); - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - state_ = s; - break; - } - case 1530654216: - { - bitField0_ |= 0x00000200; - multiplier_ = input.readUInt32(); - break; - } - case 1531371448: - { - bitField0_ |= 0x00000400; - multipoint_ = input.readBool(); - break; - } - case -2093526440: - { - bitField0_ |= 0x00000004; - demand_ = input.readBool(); - break; - } - case -1482103104: - { - bitField0_ |= 0x00004000; - version_ = input.readUInt32(); - break; - } - case -587775072: - { - bitField0_ |= 0x00000080; - minRxIntervalMs_ = input.readUInt32(); - break; - } - case -260974800: - { - bitField0_ |= 0x00000020; - length_ = input.readUInt32(); - break; - } - case -169894784: - { - bitField0_ |= 0x00008000; - yourDiscriminator_ = input.readUInt32(); - break; - } - case -86778480: - { - bitField0_ |= 0x00000100; - minTxIntervalMs_ = input.readUInt32(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BfdPacket_descriptor; @@ -1180,7 +1042,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { output.writeUInt32(526023602, minTxIntervalMs_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1241,7 +1103,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(526023602, minTxIntervalMs_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1320,7 +1182,7 @@ public boolean equals(final java.lang.Object obj) { if (hasYourDiscriminator()) { if (getYourDiscriminator() != other.getYourDiscriminator()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1395,7 +1257,7 @@ public int hashCode() { hash = (37 * hash) + YOUR_DISCRIMINATOR_FIELD_NUMBER; hash = (53 * hash) + getYourDiscriminator(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1522,17 +1384,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.BfdPacket.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 @@ -1765,7 +1620,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BfdPacket other) { if (other.hasYourDiscriminator()) { setYourDiscriminator(other.getYourDiscriminator()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1780,17 +1635,127 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BfdPacket 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 27573752: + { + poll_ = input.readBool(); + bitField0_ |= 0x00001000; + break; + } // case 27573752 + case 498908584: + { + controlPlaneIndependent_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 498908584 + case 501669178: + { + diagnostic_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 501669178 + case 613304904: + { + myDiscriminator_ = input.readUInt32(); + bitField0_ |= 0x00000800; + break; + } // case 613304904 + case 778294944: + { + minEchoRxIntervalMs_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 778294944 + case 779488176: + { + final_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 779488176 + case 847794080: + { + authenticationPresent_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 847794080 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 878060682 + case 1530654216: + { + multiplier_ = input.readUInt32(); + bitField0_ |= 0x00000200; + break; + } // case 1530654216 + case 1531371448: + { + multipoint_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 1531371448 + case -2093526440: + { + demand_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case -2093526440 + case -1482103104: + { + version_ = input.readUInt32(); + bitField0_ |= 0x00004000; + break; + } // case -1482103104 + case -587775072: + { + minRxIntervalMs_ = input.readUInt32(); + bitField0_ |= 0x00000080; + break; + } // case -587775072 + case -260974800: + { + length_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case -260974800 + case -169894784: + { + yourDiscriminator_ = input.readUInt32(); + bitField0_ |= 0x00008000; + break; + } // case -169894784 + case -86778480: + { + minTxIntervalMs_ = input.readUInt32(); + bitField0_ |= 0x00000100; + break; + } // case -86778480 + 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.compute.v1.BfdPacket) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3018,7 +2983,18 @@ public BfdPacket parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BfdPacket(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdStatus.java index df465a6e928a..4442f3d508f9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdStatus.java @@ -55,149 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BfdStatus( - 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 174146720: - { - bitField0_ |= 0x00000020; - negotiatedLocalControlTxIntervalMs_ = input.readUInt32(); - break; - } - case 891090202: - { - com.google.cloud.compute.v1.BfdPacket.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = txPacket_.toBuilder(); - } - txPacket_ = - input.readMessage( - com.google.cloud.compute.v1.BfdPacket.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(txPacket_); - txPacket_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case 1003186920: - { - bitField0_ |= 0x00000100; - uptimeMs_ = input.readInt64(); - break; - } - case 1060588490: - { - com.google.cloud.compute.v1.BfdStatusPacketCounts.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = controlPacketCounts_.toBuilder(); - } - controlPacketCounts_ = - input.readMessage( - com.google.cloud.compute.v1.BfdStatusPacketCounts.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(controlPacketCounts_); - controlPacketCounts_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 1193563626: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - localState_ = s; - break; - } - case 1745255634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - bfdSessionInitializationMode_ = s; - break; - } - case -637402744: - { - bitField0_ |= 0x00000002; - configUpdateTimestampMicros_ = input.readInt64(); - break; - } - case -585070630: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - localDiagnostic_ = s; - break; - } - case -288514102: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - controlPacketIntervals_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - controlPacketIntervals_.add( - input.readMessage( - com.google.cloud.compute.v1.PacketIntervals.parser(), extensionRegistry)); - break; - } - case -254409462: - { - com.google.cloud.compute.v1.BfdPacket.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = rxPacket_.toBuilder(); - } - rxPacket_ = - input.readMessage( - com.google.cloud.compute.v1.BfdPacket.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rxPacket_); - rxPacket_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - 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_ & 0x00000008) != 0)) { - controlPacketIntervals_ = java.util.Collections.unmodifiableList(controlPacketIntervals_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_BfdStatus_descriptor; @@ -1244,7 +1101,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(505069729, getRxPacket()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1293,7 +1150,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(505069729, getRxPacket()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1349,7 +1206,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUptimeMs()) { if (getUptimeMs() != other.getUptimeMs()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1400,7 +1257,7 @@ public int hashCode() { hash = (37 * hash) + UPTIME_MS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUptimeMs()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1561,10 +1418,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (controlPacketIntervalsBuilder_ == null) { controlPacketIntervals_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + controlPacketIntervals_ = null; controlPacketIntervalsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); localDiagnostic_ = ""; bitField0_ = (bitField0_ & ~0x00000010); localState_ = ""; @@ -1781,7 +1639,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BfdStatus other) { if (other.hasUptimeMs()) { setUptimeMs(other.getUptimeMs()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1796,17 +1654,99 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BfdStatus 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 174146720: + { + negotiatedLocalControlTxIntervalMs_ = input.readUInt32(); + bitField0_ |= 0x00000040; + break; + } // case 174146720 + case 891090202: + { + input.readMessage(getTxPacketFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 891090202 + case 1003186920: + { + uptimeMs_ = input.readInt64(); + bitField0_ |= 0x00000200; + break; + } // case 1003186920 + case 1060588490: + { + input.readMessage( + getControlPacketCountsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 1060588490 + case 1193563626: + { + localState_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1193563626 + case 1745255634: + { + bfdSessionInitializationMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1745255634 + case -637402744: + { + configUpdateTimestampMicros_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case -637402744 + case -585070630: + { + localDiagnostic_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -585070630 + case -288514102: + { + com.google.cloud.compute.v1.PacketIntervals m = + input.readMessage( + com.google.cloud.compute.v1.PacketIntervals.parser(), extensionRegistry); + if (controlPacketIntervalsBuilder_ == null) { + ensureControlPacketIntervalsIsMutable(); + controlPacketIntervals_.add(m); + } else { + controlPacketIntervalsBuilder_.addMessage(m); + } + break; + } // case -288514102 + case -254409462: + { + input.readMessage(getRxPacketFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case -254409462 + 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.compute.v1.BfdStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3383,7 +3323,18 @@ public BfdStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BfdStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdStatusPacketCounts.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdStatusPacketCounts.java index d891c9c7d576..9c33463f46f3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdStatusPacketCounts.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BfdStatusPacketCounts.java @@ -49,70 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BfdStatusPacketCounts( - 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 315002104: - { - bitField0_ |= 0x00000001; - numRx_ = input.readUInt32(); - break; - } - case 315002600: - { - bitField0_ |= 0x00000008; - numTx_ = input.readUInt32(); - break; - } - case -2046904080: - { - bitField0_ |= 0x00000002; - numRxRejected_ = input.readUInt32(); - break; - } - case -652072496: - { - bitField0_ |= 0x00000004; - numRxSuccessful_ = input.readUInt32(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BfdStatusPacketCounts_descriptor; @@ -287,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeUInt32(455361850, numRxSuccessful_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -308,7 +244,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(455361850, numRxSuccessful_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -340,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNumTx()) { if (getNumTx() != other.getNumTx()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -367,7 +303,7 @@ public int hashCode() { hash = (37 * hash) + NUM_TX_FIELD_NUMBER; hash = (53 * hash) + getNumTx(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -495,17 +431,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.BfdStatusPacketCounts.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 @@ -627,7 +556,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BfdStatusPacketCounts other if (other.hasNumTx()) { setNumTx(other.getNumTx()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -642,18 +571,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BfdStatusPacketCounts 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 315002104: + { + numRx_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 315002104 + case 315002600: + { + numTx_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 315002600 + case -2046904080: + { + numRxRejected_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case -2046904080 + case -652072496: + { + numRxSuccessful_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case -652072496 + 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.compute.v1.BfdStatusPacketCounts) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -959,7 +925,18 @@ public BfdStatusPacketCounts parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BfdStatusPacketCounts(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Binding.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Binding.java index 7eaaa5ad408a..150cff1ecbcf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Binding.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Binding.java @@ -54,88 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Binding( - 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 28050354: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - role_ = s; - break; - } - case 1699440858: - { - com.google.cloud.compute.v1.Expr.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = condition_.toBuilder(); - } - condition_ = - input.readMessage(com.google.cloud.compute.v1.Expr.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -998881078: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - members_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - members_.add(s); - break; - } - case -766261078: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - bindingId_ = 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_ & 0x00000004) != 0)) { - members_ = members_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Binding_descriptor; @@ -413,7 +331,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 441088277, bindingId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -439,7 +357,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(441088277, bindingId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -467,7 +385,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRole()) { if (!getRole().equals(other.getRole())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -494,7 +412,7 @@ public int hashCode() { hash = (37 * hash) + ROLE_FIELD_NUMBER; hash = (53 * hash) + getRole().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -774,7 +692,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Binding other) { role_ = other.role_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -789,17 +707,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Binding 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 28050354: + { + role_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 28050354 + case 1699440858: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 1699440858 + case -998881078: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMembersIsMutable(); + members_.add(s); + break; + } // case -998881078 + case -766261078: + { + bindingId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -766261078 + 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.compute.v1.Binding) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1431,7 +1388,18 @@ public Binding parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Binding(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceRequest.java index 4377a15a23ca..d036ee5991cc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceRequest.java @@ -54,84 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BulkInsertInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 331418226: - { - com.google.cloud.compute.v1.BulkInsertInstanceResource.Builder subBuilder = null; - if (bulkInsertInstanceResourceResource_ != null) { - subBuilder = bulkInsertInstanceResourceResource_.toBuilder(); - } - bulkInsertInstanceResourceResource_ = - input.readMessage( - com.google.cloud.compute.v1.BulkInsertInstanceResource.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(bulkInsertInstanceResourceResource_); - bulkInsertInstanceResourceResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BulkInsertInstanceRequest_descriptor; @@ -401,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +346,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +374,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -475,7 +397,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -605,17 +527,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.BulkInsertInstanceRequest.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 @@ -741,7 +656,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BulkInsertInstanceRequest o zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -756,18 +671,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BulkInsertInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 331418226: + { + input.readMessage( + getBulkInsertInstanceResourceResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 331418226 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.BulkInsertInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1369,7 +1323,18 @@ public BulkInsertInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BulkInsertInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceResource.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceResource.java index 45319d48bca8..2f0db9742006 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceResource.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceResource.java @@ -53,124 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BulkInsertInstanceResource( - 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 758810744: - { - bitField0_ |= 0x00000001; - count_ = input.readInt64(); - break; - } - case 868018138: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - perInstanceProperties_ = - com.google.protobuf.MapField.newMapField( - PerInstancePropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000020; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.compute.v1.BulkInsertInstanceResourcePerInstanceProperties> - perInstanceProperties__ = - input.readMessage( - PerInstancePropertiesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - perInstanceProperties_ - .getMutableMap() - .put(perInstanceProperties__.getKey(), perInstanceProperties__.getValue()); - break; - } - case 1722841322: - { - com.google.cloud.compute.v1.InstanceProperties.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = instanceProperties_.toBuilder(); - } - instanceProperties_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceProperties.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceProperties_); - instanceProperties_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -1635578366: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - sourceInstanceTemplate_ = s; - break; - } - case -984445214: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - namePattern_ = s; - break; - } - case -569448478: - { - com.google.cloud.compute.v1.LocationPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = locationPolicy_.toBuilder(); - } - locationPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.LocationPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(locationPolicy_); - locationPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -109140208: - { - bitField0_ |= 0x00000008; - minCount_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BulkInsertInstanceResource_descriptor; @@ -670,7 +552,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeInt64(523228386, minCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -719,7 +601,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(523228386, minCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -761,7 +643,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceInstanceTemplate()) { if (!getSourceInstanceTemplate().equals(other.getSourceInstanceTemplate())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -800,7 +682,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_INSTANCE_TEMPLATE_FIELD_NUMBER; hash = (53 * hash) + getSourceInstanceTemplate().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1127,7 +1009,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BulkInsertInstanceResource sourceInstanceTemplate_ = other.sourceInstanceTemplate_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1142,18 +1024,82 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BulkInsertInstanceResource 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 758810744: + { + count_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 758810744 + case 868018138: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.compute.v1.BulkInsertInstanceResourcePerInstanceProperties> + perInstanceProperties__ = + input.readMessage( + PerInstancePropertiesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutablePerInstanceProperties() + .getMutableMap() + .put(perInstanceProperties__.getKey(), perInstanceProperties__.getValue()); + break; + } // case 868018138 + case 1722841322: + { + input.readMessage( + getInstancePropertiesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 1722841322 + case -1635578366: + { + sourceInstanceTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -1635578366 + case -984445214: + { + namePattern_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -984445214 + case -569448478: + { + input.readMessage(getLocationPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -569448478 + case -109140208: + { + minCount_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case -109140208 + 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.compute.v1.BulkInsertInstanceResource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2158,7 +2104,18 @@ public BulkInsertInstanceResource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BulkInsertInstanceResource(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceResourcePerInstanceProperties.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceResourcePerInstanceProperties.java index ff00bad2f5ea..6d214ffa4353 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceResourcePerInstanceProperties.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertInstanceResourcePerInstanceProperties.java @@ -54,53 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BulkInsertInstanceResourcePerInstanceProperties( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BulkInsertInstanceResourcePerInstanceProperties_descriptor; @@ -199,7 +152,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -211,7 +164,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -232,7 +185,7 @@ public boolean equals(final java.lang.Object obj) { if (hasName()) { if (!getName().equals(other.getName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -247,7 +200,7 @@ public int 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; } @@ -385,17 +338,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.BulkInsertInstanceResourcePerInstanceProperties.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 @@ -500,7 +446,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -515,20 +461,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BulkInsertInstanceResourcePerInstanceProperties 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + 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.compute.v1.BulkInsertInstanceResourcePerInstanceProperties) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -691,7 +654,19 @@ public BulkInsertInstanceResourcePerInstanceProperties parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BulkInsertInstanceResourcePerInstanceProperties(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertRegionInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertRegionInstanceRequest.java index 715362021c51..8f51173fcbd2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertRegionInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/BulkInsertRegionInstanceRequest.java @@ -55,84 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BulkInsertRegionInstanceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 331418226: - { - com.google.cloud.compute.v1.BulkInsertInstanceResource.Builder subBuilder = null; - if (bulkInsertInstanceResourceResource_ != null) { - subBuilder = bulkInsertInstanceResourceResource_.toBuilder(); - } - bulkInsertInstanceResourceResource_ = - input.readMessage( - com.google.cloud.compute.v1.BulkInsertInstanceResource.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(bulkInsertInstanceResourceResource_); - bulkInsertInstanceResourceResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_BulkInsertRegionInstanceRequest_descriptor; @@ -402,7 +324,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -425,7 +347,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -453,7 +375,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -476,7 +398,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -606,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.BulkInsertRegionInstanceRequest.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 @@ -742,7 +657,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.BulkInsertRegionInstanceReq requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -757,18 +672,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.BulkInsertRegionInstanceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 331418226: + { + input.readMessage( + getBulkInsertInstanceResourceResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 331418226 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.BulkInsertRegionInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1370,7 +1324,18 @@ public BulkInsertRegionInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BulkInsertRegionInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CacheInvalidationRule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CacheInvalidationRule.java index 9b46f45eb2d2..c4cb43532644 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CacheInvalidationRule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CacheInvalidationRule.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CacheInvalidationRule( - 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 25668930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - host_ = s; - break; - } - case 27468074: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - path_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CacheInvalidationRule_descriptor; @@ -252,7 +198,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3433509, path_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -267,7 +213,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3433509, path_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -291,7 +237,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPath()) { if (!getPath().equals(other.getPath())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -310,7 +256,7 @@ public int hashCode() { hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -438,17 +384,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.CacheInvalidationRule.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 @@ -556,7 +495,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CacheInvalidationRule other path_ = other.path_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -571,18 +510,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CacheInvalidationRule 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 25668930: + { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 25668930 + case 27468074: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 27468074 + 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.compute.v1.CacheInvalidationRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -824,7 +788,18 @@ public CacheInvalidationRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CacheInvalidationRule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CacheKeyPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CacheKeyPolicy.java index 64aaca73d3e6..e52d35a2ac4e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CacheKeyPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CacheKeyPolicy.java @@ -55,116 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CacheKeyPolicy( - 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 19916850: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - includeHttpHeaders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - includeHttpHeaders_.add(s); - break; - } - case 419651970: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - queryStringWhitelist_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - queryStringWhitelist_.add(s); - break; - } - case 698532242: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - includeNamedCookies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - includeNamedCookies_.add(s); - break; - } - case -1866907016: - { - bitField0_ |= 0x00000002; - includeProtocol_ = input.readBool(); - break; - } - case -1455249358: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - queryStringBlacklist_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - queryStringBlacklist_.add(s); - break; - } - case -502674184: - { - bitField0_ |= 0x00000004; - includeQueryString_ = input.readBool(); - break; - } - case -400025864: - { - bitField0_ |= 0x00000001; - includeHost_ = 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 { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - includeHttpHeaders_ = includeHttpHeaders_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - queryStringWhitelist_ = queryStringWhitelist_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - includeNamedCookies_ = includeNamedCookies_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - queryStringBlacklist_ = queryStringBlacklist_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_CacheKeyPolicy_descriptor; @@ -563,7 +453,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(486867679, includeHost_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -613,7 +503,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(486867679, includeHost_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -645,7 +535,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getQueryStringBlacklistList().equals(other.getQueryStringBlacklistList())) return false; if (!getQueryStringWhitelistList().equals(other.getQueryStringWhitelistList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -684,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + QUERY_STRING_WHITELIST_FIELD_NUMBER; hash = (53 * hash) + getQueryStringWhitelistList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -813,17 +703,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.CacheKeyPolicy.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 @@ -1003,7 +886,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CacheKeyPolicy other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,17 +901,77 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CacheKeyPolicy 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 19916850: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludeHttpHeadersIsMutable(); + includeHttpHeaders_.add(s); + break; + } // case 19916850 + case 419651970: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryStringWhitelistIsMutable(); + queryStringWhitelist_.add(s); + break; + } // case 419651970 + case 698532242: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIncludeNamedCookiesIsMutable(); + includeNamedCookies_.add(s); + break; + } // case 698532242 + case -1866907016: + { + includeProtocol_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case -1866907016 + case -1455249358: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryStringBlacklistIsMutable(); + queryStringBlacklist_.add(s); + break; + } // case -1455249358 + case -502674184: + { + includeQueryString_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -502674184 + case -400025864: + { + includeHost_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -400025864 + 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.compute.v1.CacheKeyPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1939,7 +1882,18 @@ public CacheKeyPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CacheKeyPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CircuitBreakers.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CircuitBreakers.java index 98d918793e73..71c4a1dd91c4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CircuitBreakers.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CircuitBreakers.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CircuitBreakers( - 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 224780792: - { - bitField0_ |= 0x00000004; - maxRequests_ = input.readInt32(); - break; - } - case 444369752: - { - bitField0_ |= 0x00000010; - maxRetries_ = input.readInt32(); - break; - } - case 885217232: - { - bitField0_ |= 0x00000001; - maxConnections_ = input.readInt32(); - break; - } - case -1401923072: - { - bitField0_ |= 0x00000008; - maxRequestsPerConnection_ = input.readInt32(); - break; - } - case -1290496200: - { - bitField0_ |= 0x00000002; - maxPendingRequests_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CircuitBreakers_descriptor; @@ -330,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(375558887, maxPendingRequests_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -357,7 +287,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt32Size(375558887, maxPendingRequests_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -393,7 +323,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMaxRetries()) { if (getMaxRetries() != other.getMaxRetries()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -424,7 +354,7 @@ public int hashCode() { hash = (37 * hash) + MAX_RETRIES_FIELD_NUMBER; hash = (53 * hash) + getMaxRetries(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -553,17 +483,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.CircuitBreakers.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 @@ -693,7 +616,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CircuitBreakers other) { if (other.hasMaxRetries()) { setMaxRetries(other.getMaxRetries()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -708,17 +631,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CircuitBreakers 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 224780792: + { + maxRequests_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 224780792 + case 444369752: + { + maxRetries_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 444369752 + case 885217232: + { + maxConnections_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 885217232 + case -1401923072: + { + maxRequestsPerConnection_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case -1401923072 + case -1290496200: + { + maxPendingRequests_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case -1290496200 + 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.compute.v1.CircuitBreakers) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1091,7 +1058,18 @@ public CircuitBreakers parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CircuitBreakers(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesFirewallPolicyRequest.java index aaa94e69d53c..3f86df3654e4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesFirewallPolicyRequest.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CloneRulesFirewallPolicyRequest( - 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 200108394: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - sourceFirewallPolicy_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CloneRulesFirewallPolicyRequest_descriptor; @@ -332,7 +271,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -351,7 +290,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -376,7 +315,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceFirewallPolicy()) { if (!getSourceFirewallPolicy().equals(other.getSourceFirewallPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_FIREWALL_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSourceFirewallPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -527,17 +466,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.CloneRulesFirewallPolicyRequest.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 +584,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CloneRulesFirewallPolicyReq sourceFirewallPolicy_ = other.sourceFirewallPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -667,18 +599,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CloneRulesFirewallPolicyRequest 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 200108394: + { + sourceFirewallPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 200108394 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.CloneRulesFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1062,7 +1025,18 @@ public CloneRulesFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CloneRulesFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesNetworkFirewallPolicyRequest.java index 7954162319c0..6911520b9ccf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesNetworkFirewallPolicyRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CloneRulesNetworkFirewallPolicyRequest( - 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 200108394: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - sourceFirewallPolicy_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CloneRulesNetworkFirewallPolicyRequest_descriptor; @@ -397,7 +329,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -419,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -445,7 +377,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceFirewallPolicy()) { if (!getSourceFirewallPolicy().equals(other.getSourceFirewallPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -468,7 +400,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_FIREWALL_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSourceFirewallPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -600,17 +532,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.CloneRulesNetworkFirewallPolicyRequest.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 @@ -737,7 +662,7 @@ public Builder mergeFrom( sourceFirewallPolicy_ = other.sourceFirewallPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,19 +677,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CloneRulesNetworkFirewallPolicyRequest 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 200108394: + { + sourceFirewallPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 200108394 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.CloneRulesNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1266,7 +1227,18 @@ public CloneRulesNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CloneRulesNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesRegionNetworkFirewallPolicyRequest.java index 275e7602ab93..2e900e6c9a0f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CloneRulesRegionNetworkFirewallPolicyRequest.java @@ -58,81 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CloneRulesRegionNetworkFirewallPolicyRequest( - 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 200108394: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - sourceFirewallPolicy_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CloneRulesRegionNetworkFirewallPolicyRequest_descriptor; @@ -461,7 +386,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +411,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -514,7 +439,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceFirewallPolicy()) { if (!getSourceFirewallPolicy().equals(other.getSourceFirewallPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -539,7 +464,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_FIREWALL_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSourceFirewallPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -672,17 +597,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.CloneRulesRegionNetworkFirewallPolicyRequest.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 @@ -818,7 +736,7 @@ public Builder mergeFrom( sourceFirewallPolicy_ = other.sourceFirewallPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -833,19 +751,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CloneRulesRegionNetworkFirewallPolicyRequest 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 200108394: + { + sourceFirewallPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 200108394 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.CloneRulesRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1465,7 +1425,19 @@ public CloneRulesRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CloneRulesRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Commitment.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Commitment.java index 9b7fb1ed31b6..3692f03db33c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Commitment.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Commitment.java @@ -68,215 +68,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Commitment( - 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 26840: - { - bitField0_ |= 0x00000020; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - name_ = s; - break; - } - case 27547978: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - plan_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - type_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - creationTimestamp_ = s; - break; - } - case 404088818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - category_ = s; - break; - } - case 669166538: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - startTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - region_ = s; - break; - } - case 1315303722: - { - if (!((mutable_bitField0_ & 0x00002000) != 0)) { - resources_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00002000; - } - resources_.add( - input.readMessage( - com.google.cloud.compute.v1.ResourceCommitment.parser(), extensionRegistry)); - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - status_ = s; - break; - } - case 1504750090: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - mergeSourceCommitments_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - mergeSourceCommitments_.add(s); - break; - } - case -1915542062: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - statusMessage_ = s; - break; - } - case -1097223878: - { - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - reservations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00001000; - } - reservations_.add( - input.readMessage( - com.google.cloud.compute.v1.Reservation.parser(), extensionRegistry)); - break; - } - case -1074078046: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - splitSourceCommitment_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - description_ = s; - break; - } - case -791326110: - { - com.google.cloud.compute.v1.LicenseResourceCommitment.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = licenseResource_.toBuilder(); - } - licenseResource_ = - input.readMessage( - com.google.cloud.compute.v1.LicenseResourceCommitment.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(licenseResource_); - licenseResource_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - selfLink_ = s; - break; - } - case -550193774: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - endTimestamp_ = s; - break; - } - case -330801176: - { - bitField0_ |= 0x00000001; - autoRenew_ = 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 { - if (((mutable_bitField0_ & 0x00002000) != 0)) { - resources_ = java.util.Collections.unmodifiableList(resources_); - } - if (((mutable_bitField0_ & 0x00000100) != 0)) { - mergeSourceCommitments_ = mergeSourceCommitments_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00001000) != 0)) { - reservations_ = java.util.Collections.unmodifiableList(reservations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Commitment_descriptor; @@ -2179,7 +1970,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(495520765, autoRenew_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2259,7 +2050,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(495520765, autoRenew_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2346,7 +2137,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2437,7 +2228,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2616,16 +2407,18 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000800); if (reservationsBuilder_ == null) { reservations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); } else { + reservations_ = null; reservationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00001000); if (resourcesBuilder_ == null) { resources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); } else { + resources_ = null; resourcesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00002000); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00004000); splitSourceCommitment_ = ""; @@ -2955,7 +2748,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Commitment other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2970,17 +2763,166 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Commitment 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26989658 + case 27547978: + { + plan_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 27547978 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case 28604882 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 244202930 + case 404088818: + { + category_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 404088818 + case 669166538: + { + startTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 669166538 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1111570338 + case 1315303722: + { + com.google.cloud.compute.v1.ResourceCommitment m = + input.readMessage( + com.google.cloud.compute.v1.ResourceCommitment.parser(), extensionRegistry); + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(m); + } else { + resourcesBuilder_.addMessage(m); + } + break; + } // case 1315303722 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 1450082194 + case 1504750090: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMergeSourceCommitmentsIsMutable(); + mergeSourceCommitments_.add(s); + break; + } // case 1504750090 + case -1915542062: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case -1915542062 + case -1097223878: + { + com.google.cloud.compute.v1.Reservation m = + input.readMessage( + com.google.cloud.compute.v1.Reservation.parser(), extensionRegistry); + if (reservationsBuilder_ == null) { + ensureReservationsIsMutable(); + reservations_.add(m); + } else { + reservationsBuilder_.addMessage(m); + } + break; + } // case -1097223878 + case -1074078046: + { + splitSourceCommitment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case -1074078046 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -791326110: + { + input.readMessage(getLicenseResourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case -791326110 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -645248918 + case -550193774: + { + endTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -550193774 + case -330801176: + { + autoRenew_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -330801176 + 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.compute.v1.Commitment) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5937,7 +5879,18 @@ public Commitment parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Commitment(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentAggregatedList.java index 3c52e58dbc55..59f8ab95dbd1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CommitmentAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.CommitmentsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_CommitmentAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1157,7 +1044,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CommitmentAggregatedList ot if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1172,18 +1059,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CommitmentAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.CommitmentsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.CommitmentAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2232,7 +2180,18 @@ public CommitmentAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CommitmentAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentList.java index ff155bbe5e6f..cb06ca93dd1a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CommitmentList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Commitment.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_CommitmentList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CommitmentList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CommitmentList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Commitment m = + input.readMessage( + com.google.cloud.compute.v1.Commitment.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.CommitmentList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public CommitmentList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CommitmentList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentsScopedList.java index 9181eb898310..4f0009bb2d3f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CommitmentsScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CommitmentsScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -689651726: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - commitments_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - commitments_.add( - input.readMessage( - com.google.cloud.compute.v1.Commitment.parser(), extensionRegistry)); - 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)) { - commitments_ = java.util.Collections.unmodifiableList(commitments_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_CommitmentsScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < commitments_.size(); i++) { output.writeMessage(450664446, commitments_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(450664446, commitments_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (commitmentsBuilder_ == null) { commitments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + commitments_ = null; commitmentsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CommitmentsScopedList other if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,18 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CommitmentsScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -689651726: + { + com.google.cloud.compute.v1.Commitment m = + input.readMessage( + com.google.cloud.compute.v1.Commitment.parser(), extensionRegistry); + if (commitmentsBuilder_ == null) { + ensureCommitmentsIsMutable(); + commitments_.add(m); + } else { + commitmentsBuilder_.addMessage(m); + } + break; + } // case -689651726 + 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.compute.v1.CommitmentsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1214,7 +1177,18 @@ public CommitmentsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CommitmentsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Condition.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Condition.java index 89294339a644..3d46c80f3653 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Condition.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Condition.java @@ -56,87 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Condition( - 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 28426: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - op_ = s; - break; - } - case 832170: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - iam_ = s; - break; - } - case 914178: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - svc_ = s; - break; - } - case 915050: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - sys_ = s; - break; - } - case 1999431954: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - values_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - 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_ & 0x00000010) != 0)) { - values_ = values_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Condition_descriptor; @@ -1225,7 +1144,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, 249928994, values_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1254,7 +1173,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getValuesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1286,7 +1205,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSys().equals(other.getSys())) return false; } if (!getValuesList().equals(other.getValuesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1317,7 +1236,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; } @@ -1445,17 +1364,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Condition.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 @@ -1601,7 +1513,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Condition other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1616,17 +1528,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Condition 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 28426: + { + op_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 28426 + case 832170: + { + iam_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 832170 + case 914178: + { + svc_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 914178 + case 915050: + { + sys_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 915050 + case 1999431954: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 1999431954 + 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.compute.v1.Condition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2330,7 +2287,18 @@ public Condition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Condition(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConfidentialInstanceConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConfidentialInstanceConfig.java index 02bb9e8439fe..700f7c500575 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConfidentialInstanceConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConfidentialInstanceConfig.java @@ -50,52 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ConfidentialInstanceConfig( - 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 817081824: - { - bitField0_ |= 0x00000001; - enableConfidentialCompute_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ConfidentialInstanceConfig_descriptor; @@ -162,7 +116,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(102135228, enableConfidentialCompute_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -176,7 +130,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 102135228, enableConfidentialCompute_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -196,7 +150,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEnableConfidentialCompute()) { if (getEnableConfidentialCompute() != other.getEnableConfidentialCompute()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -211,7 +165,7 @@ public int hashCode() { hash = (37 * hash) + ENABLE_CONFIDENTIAL_COMPUTE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableConfidentialCompute()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -341,17 +295,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ConfidentialInstanceConfig.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 @@ -446,7 +393,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ConfidentialInstanceConfig if (other.hasEnableConfidentialCompute()) { setEnableConfidentialCompute(other.getEnableConfidentialCompute()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -461,18 +408,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ConfidentialInstanceConfig 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 817081824: + { + enableConfidentialCompute_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 817081824 + 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.compute.v1.ConfidentialInstanceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -577,7 +543,18 @@ public ConfidentialInstanceConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfidentialInstanceConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConnectionDraining.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConnectionDraining.java index 9dda4b5b9215..27e2681dbdbc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConnectionDraining.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConnectionDraining.java @@ -50,52 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ConnectionDraining( - 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 1801016560: - { - bitField0_ |= 0x00000001; - drainingTimeoutSec_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ConnectionDraining_descriptor; @@ -162,7 +116,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(225127070, drainingTimeoutSec_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -175,7 +129,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt32Size(225127070, drainingTimeoutSec_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -195,7 +149,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDrainingTimeoutSec()) { if (getDrainingTimeoutSec() != other.getDrainingTimeoutSec()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -210,7 +164,7 @@ public int hashCode() { hash = (37 * hash) + DRAINING_TIMEOUT_SEC_FIELD_NUMBER; hash = (53 * hash) + getDrainingTimeoutSec(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -339,17 +293,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ConnectionDraining.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 @@ -443,7 +390,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ConnectionDraining other) { if (other.hasDrainingTimeoutSec()) { setDrainingTimeoutSec(other.getDrainingTimeoutSec()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -458,17 +405,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ConnectionDraining 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 1801016560: + { + drainingTimeoutSec_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 1801016560 + 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.compute.v1.ConnectionDraining) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -573,7 +540,18 @@ public ConnectionDraining parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionDraining(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConsistentHashLoadBalancerSettings.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConsistentHashLoadBalancerSettings.java index efa77fe43aa8..83de3b96b336 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConsistentHashLoadBalancerSettings.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConsistentHashLoadBalancerSettings.java @@ -53,78 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ConsistentHashLoadBalancerSettings( - 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 53391322: - { - com.google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie.Builder - subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = httpCookie_.toBuilder(); - } - httpCookie_ = - input.readMessage( - com.google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(httpCookie_); - httpCookie_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1875045880: - { - bitField0_ |= 0x00000004; - minimumRingSize_ = input.readInt64(); - break; - } - case 1878384178: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - httpHeaderName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ConsistentHashLoadBalancerSettings_descriptor; @@ -320,7 +248,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 234798022, httpHeaderName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +266,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(234798022, httpHeaderName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -366,7 +294,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMinimumRingSize()) { if (getMinimumRingSize() != other.getMinimumRingSize()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -389,7 +317,7 @@ public int hashCode() { hash = (37 * hash) + MINIMUM_RING_SIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMinimumRingSize()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -656,7 +584,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ConsistentHashLoadBalancerS if (other.hasMinimumRingSize()) { setMinimumRingSize(other.getMinimumRingSize()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -671,19 +599,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ConsistentHashLoadBalancerSettings 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 53391322: + { + input.readMessage(getHttpCookieFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 53391322 + case 1875045880: + { + minimumRingSize_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 1875045880 + case 1878384178: + { + httpHeaderName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1878384178 + 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.compute.v1.ConsistentHashLoadBalancerSettings) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1126,7 +1084,18 @@ public ConsistentHashLoadBalancerSettings parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConsistentHashLoadBalancerSettings(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConsistentHashLoadBalancerSettingsHttpCookie.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConsistentHashLoadBalancerSettingsHttpCookie.java index 9c1b739d805a..d42061bf916a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConsistentHashLoadBalancerSettingsHttpCookie.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ConsistentHashLoadBalancerSettingsHttpCookie.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ConsistentHashLoadBalancerSettingsHttpCookie( - 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 921442: - { - com.google.cloud.compute.v1.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = ttl_.toBuilder(); - } - ttl_ = - input.readMessage( - com.google.cloud.compute.v1.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(ttl_); - ttl_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 27468074: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - path_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ConsistentHashLoadBalancerSettingsHttpCookie_descriptor; @@ -338,7 +268,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3433509, path_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -356,7 +286,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3433509, path_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -385,7 +315,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTtl()) { if (!getTtl().equals(other.getTtl())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -408,7 +338,7 @@ public int hashCode() { hash = (37 * hash) + TTL_FIELD_NUMBER; hash = (53 * hash) + getTtl().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -685,7 +615,7 @@ public Builder mergeFrom( if (other.hasTtl()) { mergeTtl(other.getTtl()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -700,19 +630,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie 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 921442: + { + input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 921442 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 27468074: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 27468074 + 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.compute.v1.ConsistentHashLoadBalancerSettingsHttpCookie) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1174,7 +1134,19 @@ public ConsistentHashLoadBalancerSettingsHttpCookie parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConsistentHashLoadBalancerSettingsHttpCookie(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CorsPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CorsPolicy.java index 79d1f9cdd55f..21488a08ebe4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CorsPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CorsPolicy.java @@ -56,129 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CorsPolicy( - 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 361432194: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - allowHeaders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - allowHeaders_.add(s); - break; - } - case 1559312570: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - allowOrigins_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - allowOrigins_.add(s); - break; - } - case 1643242978: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - allowMethods_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - allowMethods_.add(s); - break; - } - case 1723086482: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - allowOriginRegexes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - allowOriginRegexes_.add(s); - break; - } - case 1980837978: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - exposeHeaders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - exposeHeaders_.add(s); - break; - } - case -2127440928: - { - bitField0_ |= 0x00000002; - disabled_ = input.readBool(); - break; - } - case -1834492640: - { - bitField0_ |= 0x00000004; - maxAge_ = input.readInt32(); - break; - } - case -444860368: - { - bitField0_ |= 0x00000001; - allowCredentials_ = 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 { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - allowHeaders_ = allowHeaders_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - allowOrigins_ = allowOrigins_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - allowMethods_ = allowMethods_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - allowOriginRegexes_ = allowOriginRegexes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - exposeHeaders_ = exposeHeaders_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_CorsPolicy_descriptor; @@ -641,7 +518,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(481263366, allowCredentials_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -699,7 +576,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(481263366, allowCredentials_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -731,7 +608,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMaxAge()) { if (getMaxAge() != other.getMaxAge()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -774,7 +651,7 @@ public int hashCode() { hash = (37 * hash) + MAX_AGE_FIELD_NUMBER; hash = (53 * hash) + getMaxAge(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -903,17 +780,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.CorsPolicy.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 @@ -1110,7 +980,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CorsPolicy other) { if (other.hasMaxAge()) { setMaxAge(other.getMaxAge()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1125,17 +995,84 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CorsPolicy 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 361432194: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowHeadersIsMutable(); + allowHeaders_.add(s); + break; + } // case 361432194 + case 1559312570: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowOriginsIsMutable(); + allowOrigins_.add(s); + break; + } // case 1559312570 + case 1643242978: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowMethodsIsMutable(); + allowMethods_.add(s); + break; + } // case 1643242978 + case 1723086482: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAllowOriginRegexesIsMutable(); + allowOriginRegexes_.add(s); + break; + } // case 1723086482 + case 1980837978: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExposeHeadersIsMutable(); + exposeHeaders_.add(s); + break; + } // case 1980837978 + case -2127440928: + { + disabled_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -2127440928 + case -1834492640: + { + maxAge_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case -1834492640 + case -444860368: + { + allowCredentials_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -444860368 + 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.compute.v1.CorsPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2214,7 +2151,18 @@ public CorsPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CorsPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateInstancesInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateInstancesInstanceGroupManagerRequest.java index 5de6c6b2aaa2..cdaa6f45efd7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateInstancesInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateInstancesInstanceGroupManagerRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateInstancesInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 196470938: - { - com.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequest.Builder - subBuilder = null; - if (instanceGroupManagersCreateInstancesRequestResource_ != null) { - subBuilder = instanceGroupManagersCreateInstancesRequestResource_.toBuilder(); - } - instanceGroupManagersCreateInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagersCreateInstancesRequestResource_); - instanceGroupManagersCreateInstancesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CreateInstancesInstanceGroupManagerRequest_descriptor; @@ -469,7 +382,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -497,7 +410,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -526,7 +439,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -551,7 +464,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -683,17 +596,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest.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 @@ -834,7 +740,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -849,19 +755,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CreateInstancesInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 196470938: + { + input.readMessage( + getInstanceGroupManagersCreateInstancesRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 196470938 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.CreateInstancesInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1583,7 +1534,19 @@ public CreateInstancesInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateInstancesInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateInstancesRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateInstancesRegionInstanceGroupManagerRequest.java index 384860745ad9..f07d7817eca1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateInstancesRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateInstancesRegionInstanceGroupManagerRequest.java @@ -57,94 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateInstancesRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -1422853054: - { - com.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest.Builder - subBuilder = null; - if (regionInstanceGroupManagersCreateInstancesRequestResource_ != null) { - subBuilder = regionInstanceGroupManagersCreateInstancesRequestResource_.toBuilder(); - } - regionInstanceGroupManagersCreateInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupManagersCreateInstancesRequestResource_); - regionInstanceGroupManagersCreateInstancesRequestResource_ = - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CreateInstancesRegionInstanceGroupManagerRequest_descriptor; @@ -472,7 +384,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 359014280, getRegionInstanceGroupManagersCreateInstancesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -500,7 +412,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 359014280, getRegionInstanceGroupManagersCreateInstancesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -531,7 +443,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -559,7 +471,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -697,17 +609,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest.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 @@ -850,7 +755,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -865,20 +770,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -1422853054: + { + input.readMessage( + getRegionInstanceGroupManagersCreateInstancesRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -1422853054 + 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.compute.v1.CreateInstancesRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1606,7 +1555,19 @@ public CreateInstancesRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateInstancesRegionInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateSnapshotDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateSnapshotDiskRequest.java index 734763950455..7ec9cf5183f8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateSnapshotDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateSnapshotDiskRequest.java @@ -55,96 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateSnapshotDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1210560792: - { - bitField0_ |= 0x00000001; - guestFlush_ = input.readBool(); - break; - } - case -444407478: - { - com.google.cloud.compute.v1.Snapshot.Builder subBuilder = null; - if (snapshotResource_ != null) { - subBuilder = snapshotResource_.toBuilder(); - } - snapshotResource_ = - input.readMessage( - com.google.cloud.compute.v1.Snapshot.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(snapshotResource_); - snapshotResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CreateSnapshotDiskRequest_descriptor; @@ -499,7 +409,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (snapshotResource_ != null) { output.writeMessage(481319977, getSnapshotResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -528,7 +438,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 481319977, getSnapshotResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -559,7 +469,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSnapshotResource().equals(other.getSnapshotResource())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +498,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +628,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.CreateSnapshotDiskRequest.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 @@ -869,7 +772,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CreateSnapshotDiskRequest o zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -884,18 +787,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CreateSnapshotDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1210560792: + { + guestFlush_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1210560792 + case -444407478: + { + input.readMessage( + getSnapshotResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -444407478 + 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.compute.v1.CreateSnapshotDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1662,7 +1615,18 @@ public CreateSnapshotDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateSnapshotDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateSnapshotRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateSnapshotRegionDiskRequest.java index 000e98c8299e..586d394acdfa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateSnapshotRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CreateSnapshotRegionDiskRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateSnapshotRegionDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -444407478: - { - com.google.cloud.compute.v1.Snapshot.Builder subBuilder = null; - if (snapshotResource_ != null) { - subBuilder = snapshotResource_.toBuilder(); - } - snapshotResource_ = - input.readMessage( - com.google.cloud.compute.v1.Snapshot.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(snapshotResource_); - snapshotResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CreateSnapshotRegionDiskRequest_descriptor; @@ -458,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (snapshotResource_ != null) { output.writeMessage(481319977, getSnapshotResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +400,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 481319977, getSnapshotResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -511,7 +427,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSnapshotResource()) { if (!getSnapshotResource().equals(other.getSnapshotResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -536,7 +452,7 @@ public int hashCode() { hash = (37 * hash) + SNAPSHOT_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSnapshotResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -666,17 +582,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest.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 @@ -808,7 +717,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CreateSnapshotRegionDiskReq if (other.hasSnapshotResource()) { mergeSnapshotResource(other.getSnapshotResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -823,18 +732,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CreateSnapshotRegionDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -444407478: + { + input.readMessage( + getSnapshotResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -444407478 + 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.compute.v1.CreateSnapshotRegionDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1534,7 +1487,18 @@ public CreateSnapshotRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateSnapshotRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKey.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKey.java index dbd2d07f6735..8e478e1591b0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKey.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKey.java @@ -55,81 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CustomerEncryptionKey( - 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 1360900410: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - sha256_ = s; - break; - } - case 1679890090: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kmsKeyServiceAccount_ = s; - break; - } - case -1611068118: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - rsaEncryptedKey_ = s; - break; - } - case -701395390: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - rawKey_ = s; - break; - } - case -419975990: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - kmsKeyName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CustomerEncryptionKey_descriptor; @@ -495,7 +420,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 484373913, kmsKeyName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -521,7 +446,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(484373913, kmsKeyName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -557,7 +482,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSha256()) { if (!getSha256().equals(other.getSha256())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +513,7 @@ public int hashCode() { hash = (37 * hash) + SHA256_FIELD_NUMBER; hash = (53 * hash) + getSha256().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -716,17 +641,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.CustomerEncryptionKey.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 @@ -867,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CustomerEncryptionKey other sha256_ = other.sha256_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -882,18 +800,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CustomerEncryptionKey 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 1360900410: + { + sha256_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1360900410 + case 1679890090: + { + kmsKeyServiceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1679890090 + case -1611068118: + { + rsaEncryptedKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -1611068118 + case -701395390: + { + rawKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -701395390 + case -419975990: + { + kmsKeyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -419975990 + 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.compute.v1.CustomerEncryptionKey) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1531,7 +1492,18 @@ public CustomerEncryptionKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CustomerEncryptionKey(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKeyProtectedDisk.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKeyProtectedDisk.java index b5ddfb6be7ed..739ec869bc9f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKeyProtectedDisk.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/CustomerEncryptionKeyProtectedDisk.java @@ -52,70 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CustomerEncryptionKeyProtectedDisk( - 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 1417887962: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - source_ = s; - break; - } - case -2121681878: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = diskEncryptionKey_.toBuilder(); - } - diskEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diskEncryptionKey_); - diskEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_CustomerEncryptionKeyProtectedDisk_descriptor; @@ -270,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(271660677, getDiskEncryptionKey()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +223,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 271660677, getDiskEncryptionKey()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +247,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSource()) { if (!getSource().equals(other.getSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +266,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -587,7 +523,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.CustomerEncryptionKeyProtec source_ = other.source_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -602,19 +538,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.CustomerEncryptionKeyProtectedDisk 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 1417887962: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1417887962 + case -2121681878: + { + input.readMessage( + getDiskEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -2121681878 + 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.compute.v1.CustomerEncryptionKeyProtectedDisk) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -981,7 +942,18 @@ public CustomerEncryptionKeyProtectedDisk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CustomerEncryptionKeyProtectedDisk(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Data.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Data.java index 023dd6dc4b35..f00026c3abed 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Data.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Data.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Data( - 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 848634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - key_ = s; - break; - } - case 895781770: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Data_descriptor; @@ -269,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 111972721, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +230,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(111972721, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -307,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValue()) { if (!getValue().equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -326,7 +272,7 @@ public int 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; } @@ -453,17 +399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Data.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 @@ -569,7 +508,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Data other) { value_ = other.value_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -584,17 +523,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Data 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 848634: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 848634 + case 895781770: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 895781770 + 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.compute.v1.Data) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -872,7 +837,18 @@ public Data parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Data(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAccessConfigInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAccessConfigInstanceRequest.java index 11d75e031dfc..ffa164632bcb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAccessConfigInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAccessConfigInstanceRequest.java @@ -58,88 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteAccessConfigInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 582849514: - { - java.lang.String s = input.readStringRequireUtf8(); - - accessConfig_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1371864254: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkInterface_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteAccessConfigInstanceRequest_descriptor; @@ -505,7 +423,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkInterface_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 365387880, networkInterface_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -533,7 +451,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(365387880, networkInterface_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -558,7 +476,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -583,7 +501,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -713,17 +631,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest.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 @@ -857,7 +768,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteAccessConfigInstanceR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -872,19 +783,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteAccessConfigInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 582849514: + { + accessConfig_ = input.readStringRequireUtf8(); + + break; + } // case 582849514 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1371864254: + { + networkInterface_ = input.readStringRequireUtf8(); + + break; + } // case -1371864254 + 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.compute.v1.DeleteAccessConfigInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1593,7 +1552,18 @@ public DeleteAccessConfigInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteAccessConfigInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAddressRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAddressRequest.java index 57273717f954..4ac9b917bbb6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAddressRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAddressRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteAddressRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -591601758: - { - java.lang.String s = input.readStringRequireUtf8(); - - address_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteAddressRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 462920692, address_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(462920692, address_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteAddressRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteAddressRequest other) requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,17 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteAddressRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -591601758: + { + address_ = input.readStringRequireUtf8(); + + break; + } // case -591601758 + 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.compute.v1.DeleteAddressRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1190,18 @@ public DeleteAddressRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteAddressRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAutoscalerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAutoscalerRequest.java index 617a75099c9a..373fb8148040 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAutoscalerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteAutoscalerRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteAutoscalerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -156895558: - { - java.lang.String s = input.readStringRequireUtf8(); - - autoscaler_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteAutoscalerRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(autoscaler_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517258967, autoscaler_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(autoscaler_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517258967, autoscaler_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteAutoscalerRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteAutoscalerRequest oth zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteAutoscalerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -156895558: + { + autoscaler_ = input.readStringRequireUtf8(); + + break; + } // case -156895558 + 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.compute.v1.DeleteAutoscalerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public DeleteAutoscalerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteAutoscalerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteBackendBucketRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteBackendBucketRequest.java index f3ca2eb0a5c5..fca2a14b8b88 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteBackendBucketRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteBackendBucketRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteBackendBucketRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 733712298: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendBucket_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteBackendBucketRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteBackendBucketRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteBackendBucketRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteBackendBucketRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 733712298: + { + backendBucket_ = input.readStringRequireUtf8(); + + break; + } // case 733712298 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteBackendBucketRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteBackendBucketRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteBackendBucketRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteBackendServiceRequest.java index c62cb97094c7..3c8fd4e6b008 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteBackendServiceRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteBackendServiceRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteBackendServiceRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteBackendServiceRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + 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.compute.v1.DeleteBackendServiceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteDiskRequest.java index a570b6686a21..57d129e96245 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteDiskRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteDiskRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteDiskRequest.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 @@ -705,7 +630,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteDiskRequest other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -720,17 +645,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1226,7 +1189,18 @@ public DeleteDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteExternalVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteExternalVpnGatewayRequest.java index ba4a02ba6a52..77e39b8c602b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteExternalVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteExternalVpnGatewayRequest.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteExternalVpnGatewayRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 879189034: - { - java.lang.String s = input.readStringRequireUtf8(); - - externalVpnGateway_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteExternalVpnGatewayRequest_descriptor; @@ -321,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -340,7 +279,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +301,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -381,7 +320,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -511,17 +450,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteExternalVpnGatewayRequest.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 @@ -632,7 +564,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteExternalVpnGatewayReq requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -647,18 +579,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteExternalVpnGatewayRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 879189034: + { + externalVpnGateway_ = input.readStringRequireUtf8(); + + break; + } // case 879189034 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteExternalVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1043,7 +1006,18 @@ public DeleteExternalVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteExternalVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteFirewallPolicyRequest.java index edf099b4b881..690d9b35cd2c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteFirewallPolicyRequest.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteFirewallPolicyRequest_descriptor; @@ -256,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -271,7 +217,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -292,7 +238,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -309,7 +255,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -439,17 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteFirewallPolicyRequest.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 @@ -553,7 +492,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteFirewallPolicyRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -568,18 +507,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.DeleteFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -843,7 +807,18 @@ public DeleteFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteFirewallRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteFirewallRequest.java index eeaf739811eb..5c1773ffad4f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteFirewallRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteFirewallRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteFirewallRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -206837758: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewall_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteFirewallRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewall_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 511016192, firewall_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewall_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(511016192, firewall_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteFirewallRequest.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 @@ -629,7 +561,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteFirewallRequest other requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,18 +576,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteFirewallRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -206837758: + { + firewall_ = input.readStringRequireUtf8(); + + break; + } // case -206837758 + 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.compute.v1.DeleteFirewallRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1035,7 +998,18 @@ public DeleteFirewallRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteFirewallRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteForwardingRuleRequest.java index 6e63f8c9a6b5..78be509efd5a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteForwardingRuleRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteForwardingRuleRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2135255054: - { - java.lang.String s = input.readStringRequireUtf8(); - - forwardingRule_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteForwardingRuleRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 269964030, forwardingRule_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(269964030, forwardingRule_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteForwardingRuleRequest.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 @@ -707,7 +632,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteForwardingRuleRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -722,18 +647,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteForwardingRuleRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2135255054: + { + forwardingRule_ = input.readStringRequireUtf8(); + + break; + } // case -2135255054 + 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.compute.v1.DeleteForwardingRuleRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1229,7 +1191,18 @@ public DeleteForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalAddressRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalAddressRequest.java index e76c12a366ed..5c5b948f7f44 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalAddressRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalAddressRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGlobalAddressRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -591601758: - { - java.lang.String s = input.readStringRequireUtf8(); - - address_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteGlobalAddressRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 462920692, address_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(462920692, address_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteGlobalAddressRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteGlobalAddressRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteGlobalAddressRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -591601758: + { + address_ = input.readStringRequireUtf8(); + + break; + } // case -591601758 + 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.compute.v1.DeleteGlobalAddressRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteGlobalAddressRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGlobalAddressRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalForwardingRuleRequest.java index a181d1dc110d..a9f6a33bb38b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalForwardingRuleRequest.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGlobalForwardingRuleRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2135255054: - { - java.lang.String s = input.readStringRequireUtf8(); - - forwardingRule_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteGlobalForwardingRuleRequest_descriptor; @@ -321,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 269964030, forwardingRule_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +278,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(269964030, forwardingRule_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -361,7 +300,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -380,7 +319,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +449,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest.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 @@ -633,7 +565,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteGlobalForwardingRuleR requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,19 +580,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteGlobalForwardingRuleRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2135255054: + { + forwardingRule_ = input.readStringRequireUtf8(); + + break; + } // case -2135255054 + 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.compute.v1.DeleteGlobalForwardingRuleRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1041,7 +1003,18 @@ public DeleteGlobalForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGlobalForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalNetworkEndpointGroupRequest.java index 5cb72d9b844e..4597a4276a83 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalNetworkEndpointGroupRequest.java @@ -56,67 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGlobalNetworkEndpointGroupRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteGlobalNetworkEndpointGroupRequest_descriptor; @@ -324,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkEndpointGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 433907078, networkEndpointGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -344,7 +283,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 433907078, networkEndpointGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -366,7 +305,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -385,7 +324,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -517,17 +456,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest.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 @@ -643,7 +575,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -658,19 +590,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteGlobalNetworkEndpointGroupRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + 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.compute.v1.DeleteGlobalNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1057,7 +1019,18 @@ public DeleteGlobalNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGlobalNetworkEndpointGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOperationRequest.java index 0d7010fdb0ce..0432e4261ebe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOperationRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGlobalOperationRequest( - 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 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteGlobalOperationRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOperation().equals(other.getOperation())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getOperation().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -417,17 +364,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteGlobalOperationRequest.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 @@ -524,7 +464,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteGlobalOperationReques project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -539,18 +479,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteGlobalOperationRequest 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 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteGlobalOperationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -798,7 +763,18 @@ public DeleteGlobalOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGlobalOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOperationResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOperationResponse.java index ab73f7858345..47a0cd2bbaad 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOperationResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOperationResponse.java @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGlobalOperationResponse( - 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; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteGlobalOperationResponse_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.compute.v1.DeleteGlobalOperationResponse other = (com.google.cloud.compute.v1.DeleteGlobalOperationResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -284,17 +245,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteGlobalOperationResponse.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 @@ -377,7 +331,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.compute.v1.DeleteGlobalOperationResponse other) { if (other == com.google.cloud.compute.v1.DeleteGlobalOperationResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -392,18 +346,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteGlobalOperationResponse 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; + 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.compute.v1.DeleteGlobalOperationResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -439,7 +406,18 @@ public DeleteGlobalOperationResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGlobalOperationResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOrganizationOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOrganizationOperationRequest.java index b6ad94776040..1a223afab342 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOrganizationOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOrganizationOperationRequest.java @@ -55,60 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGlobalOrganizationOperationRequest( - 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 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case -617249150: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - parentId_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteGlobalOrganizationOperationRequest_descriptor; @@ -258,7 +204,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 459714768, parentId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -273,7 +219,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(459714768, parentId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -294,7 +240,7 @@ public boolean equals(final java.lang.Object obj) { if (hasParentId()) { if (!getParentId().equals(other.getParentId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -311,7 +257,7 @@ public int hashCode() { hash = (37 * hash) + PARENT_ID_FIELD_NUMBER; hash = (53 * hash) + getParentId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -443,17 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationRequest.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 @@ -562,7 +501,7 @@ public Builder mergeFrom( parentId_ = other.parentId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -577,19 +516,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationRequest 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 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case -617249150: + { + parentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -617249150 + 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.compute.v1.DeleteGlobalOrganizationOperationRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -855,7 +818,18 @@ public DeleteGlobalOrganizationOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGlobalOrganizationOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOrganizationOperationResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOrganizationOperationResponse.java index a58e4dc71281..de5e8a28857c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOrganizationOperationResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalOrganizationOperationResponse.java @@ -52,45 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGlobalOrganizationOperationResponse( - 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; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteGlobalOrganizationOperationResponse_descriptor; @@ -120,7 +81,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -129,7 +90,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -145,7 +106,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationResponse other = (com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -156,7 +117,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -288,17 +249,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationResponse.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 @@ -386,7 +340,7 @@ public Builder mergeFrom( if (other == com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationResponse .getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -401,19 +355,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteGlobalOrganizationOperationResponse 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; + 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.compute.v1.DeleteGlobalOrganizationOperationResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -452,7 +418,19 @@ public DeleteGlobalOrganizationOperationResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGlobalOrganizationOperationResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalPublicDelegatedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalPublicDelegatedPrefixeRequest.java index 41f2e7f0259e..a645c11419dc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalPublicDelegatedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteGlobalPublicDelegatedPrefixeRequest.java @@ -56,67 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteGlobalPublicDelegatedPrefixeRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1633907522: - { - java.lang.String s = input.readStringRequireUtf8(); - - publicDelegatedPrefix_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteGlobalPublicDelegatedPrefixeRequest_descriptor; @@ -324,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -344,7 +283,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -366,7 +305,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -385,7 +324,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -517,17 +456,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest.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 @@ -643,7 +575,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -658,19 +590,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1633907522: + { + publicDelegatedPrefix_ = input.readStringRequireUtf8(); + + break; + } // case 1633907522 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteGlobalPublicDelegatedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1058,7 +1020,19 @@ public DeleteGlobalPublicDelegatedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteGlobalPublicDelegatedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteHealthCheckRequest.java index 60604cd09b47..ffa5b7ab6e28 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteHealthCheckRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteHealthCheckRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheck_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteHealthCheckRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 308876645, healthCheck_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(308876645, healthCheck_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteHealthCheckRequest.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 @@ -629,7 +561,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteHealthCheckRequest ot requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,18 +576,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteHealthCheckRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + + break; + } // case -1823954134 + 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.compute.v1.DeleteHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1035,7 +998,18 @@ public DeleteHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteImageRequest.java index c26cf32b5b64..54f9df78378b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteImageRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteImageRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 802507482: - { - java.lang.String s = input.readStringRequireUtf8(); - - image_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteImageRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteImageRequest.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 @@ -628,7 +560,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteImageRequest other) { requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -643,17 +575,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteImageRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 802507482: + { + image_ = input.readStringRequireUtf8(); + + break; + } // case 802507482 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1033,7 +997,18 @@ public DeleteImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceGroupManagerRequest.java index 3c640eccbd63..a0a8af32eadd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceGroupManagerRequest.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteInstanceGroupManagerRequest_descriptor; @@ -387,7 +319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -410,7 +342,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -433,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -454,7 +386,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -584,17 +516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest.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 @@ -714,7 +639,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteInstanceGroupManagerR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -729,19 +654,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.DeleteInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1243,7 +1204,18 @@ public DeleteInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceGroupRequest.java index 4067ccaba866..dbb7b0856a32 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceGroupRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteInstanceGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 648762026: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroup_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteInstanceGroupRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteInstanceGroupRequest.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 @@ -707,7 +632,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteInstanceGroupRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -722,18 +647,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteInstanceGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 648762026: + { + instanceGroup_ = input.readStringRequireUtf8(); + + break; + } // case 648762026 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteInstanceGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1229,7 +1191,18 @@ public DeleteInstanceGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInstanceGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceRequest.java index 54b95ffb3408..565a999be5e5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteInstanceRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteInstanceRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteInstanceRequest other zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public DeleteInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceTemplateRequest.java index 4ff805b93b78..412b2c44b26c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstanceTemplateRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteInstanceTemplateRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1820981470: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceTemplate_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteInstanceTemplateRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceTemplate_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 309248228, instanceTemplate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +278,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(309248228, instanceTemplate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -361,7 +300,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -380,7 +319,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +449,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteInstanceTemplateRequest.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 @@ -631,7 +563,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteInstanceTemplateReque requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,18 +578,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteInstanceTemplateRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1820981470: + { + instanceTemplate_ = input.readStringRequireUtf8(); + + break; + } // case -1820981470 + 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.compute.v1.DeleteInstanceTemplateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1037,7 +1000,18 @@ public DeleteInstanceTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInstanceTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstancesInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstancesInstanceGroupManagerRequest.java index 66f6094c009a..a27a9dbbf51a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstancesInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstancesInstanceGroupManagerRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteInstancesInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1331370018: - { - com.google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequest.Builder - subBuilder = null; - if (instanceGroupManagersDeleteInstancesRequestResource_ != null) { - subBuilder = instanceGroupManagersDeleteInstancesRequestResource_.toBuilder(); - } - instanceGroupManagersDeleteInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagersDeleteInstancesRequestResource_); - instanceGroupManagersDeleteInstancesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteInstancesInstanceGroupManagerRequest_descriptor; @@ -469,7 +382,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -497,7 +410,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -526,7 +439,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -551,7 +464,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -683,17 +596,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest.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 @@ -834,7 +740,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -849,19 +755,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteInstancesInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1331370018: + { + input.readMessage( + getInstanceGroupManagersDeleteInstancesRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 1331370018 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.DeleteInstancesInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1583,7 +1534,19 @@ public DeleteInstancesInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInstancesInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstancesRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstancesRegionInstanceGroupManagerRequest.java index 3dcf39284fb3..85728cf55309 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstancesRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInstancesRegionInstanceGroupManagerRequest.java @@ -57,94 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteInstancesRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -287953974: - { - com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest.Builder - subBuilder = null; - if (regionInstanceGroupManagersDeleteInstancesRequestResource_ != null) { - subBuilder = regionInstanceGroupManagersDeleteInstancesRequestResource_.toBuilder(); - } - regionInstanceGroupManagersDeleteInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupManagersDeleteInstancesRequestResource_); - regionInstanceGroupManagersDeleteInstancesRequestResource_ = - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteInstancesRegionInstanceGroupManagerRequest_descriptor; @@ -472,7 +384,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 500876665, getRegionInstanceGroupManagersDeleteInstancesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -500,7 +412,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 500876665, getRegionInstanceGroupManagersDeleteInstancesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -531,7 +443,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -559,7 +471,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -697,17 +609,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest.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 @@ -850,7 +755,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -865,20 +770,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -287953974: + { + input.readMessage( + getRegionInstanceGroupManagersDeleteInstancesRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -287953974 + 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.compute.v1.DeleteInstancesRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1606,7 +1555,19 @@ public DeleteInstancesRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInstancesRegionInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInterconnectAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInterconnectAttachmentRequest.java index 5cce48133bb9..6b8f4991dde4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInterconnectAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInterconnectAttachmentRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteInterconnectAttachmentRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1829885022: - { - java.lang.String s = input.readStringRequireUtf8(); - - interconnectAttachment_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteInterconnectAttachmentRequest_descriptor; @@ -389,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 308135284, interconnectAttachment_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -412,7 +344,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 308135284, interconnectAttachment_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -435,7 +367,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -456,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -586,17 +518,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteInterconnectAttachmentRequest.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 @@ -717,7 +642,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -732,19 +657,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteInterconnectAttachmentRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1829885022: + { + interconnectAttachment_ = input.readStringRequireUtf8(); + + break; + } // case -1829885022 + 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.compute.v1.DeleteInterconnectAttachmentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1247,7 +1208,18 @@ public DeleteInterconnectAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInterconnectAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInterconnectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInterconnectRequest.java index 42067c712e1b..109ca3cf6fe7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInterconnectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteInterconnectRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteInterconnectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1796809842: - { - java.lang.String s = input.readStringRequireUtf8(); - - interconnect_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteInterconnectRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteInterconnectRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteInterconnectRequest o requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteInterconnectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1796809842: + { + interconnect_ = input.readStringRequireUtf8(); + + break; + } // case 1796809842 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteInterconnectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteInterconnectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteInterconnectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteLicenseRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteLicenseRequest.java index 5bcbf55a49d6..b2c9472e45d9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteLicenseRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteLicenseRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteLicenseRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1334059530: - { - java.lang.String s = input.readStringRequireUtf8(); - - license_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteLicenseRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteLicenseRequest.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 @@ -629,7 +561,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteLicenseRequest other) requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,17 +576,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteLicenseRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1334059530: + { + license_ = input.readStringRequireUtf8(); + + break; + } // case 1334059530 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteLicenseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1034,7 +998,18 @@ public DeleteLicenseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteLicenseRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteMachineImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteMachineImageRequest.java index e565ca0f8095..86b56f34a645 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteMachineImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteMachineImageRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteMachineImageRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 553515802: - { - java.lang.String s = input.readStringRequireUtf8(); - - machineImage_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteMachineImageRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteMachineImageRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteMachineImageRequest o requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteMachineImageRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 553515802: + { + machineImage_ = input.readStringRequireUtf8(); + + break; + } // case 553515802 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteMachineImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteMachineImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteMachineImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEdgeSecurityServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEdgeSecurityServiceRequest.java index 65866fc58337..1a65cb1c96ba 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEdgeSecurityServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEdgeSecurityServiceRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteNetworkEdgeSecurityServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1256095034: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEdgeSecurityService_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteNetworkEdgeSecurityServiceRequest_descriptor; @@ -391,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -414,7 +346,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -438,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -459,7 +391,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -591,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteNetworkEdgeSecurityServiceRequest.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 @@ -724,7 +649,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -739,19 +664,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteNetworkEdgeSecurityServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1256095034: + { + networkEdgeSecurityService_ = input.readStringRequireUtf8(); + + break; + } // case 1256095034 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteNetworkEdgeSecurityServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1259,7 +1220,18 @@ public DeleteNetworkEdgeSecurityServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteNetworkEdgeSecurityServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEndpointGroupRequest.java index 9d08b6e8d0da..2958fd4706f5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkEndpointGroupRequest.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteNetworkEndpointGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteNetworkEndpointGroupRequest_descriptor; @@ -387,7 +319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkEndpointGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 433907078, networkEndpointGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -410,7 +342,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 433907078, networkEndpointGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -433,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -454,7 +386,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -584,17 +516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteNetworkEndpointGroupRequest.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 @@ -714,7 +639,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteNetworkEndpointGroupR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -729,19 +654,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteNetworkEndpointGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + 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.compute.v1.DeleteNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1243,7 +1204,18 @@ public DeleteNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteNetworkEndpointGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkFirewallPolicyRequest.java index 668e497a8a09..cae1bcd668f3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkFirewallPolicyRequest.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteNetworkFirewallPolicyRequest_descriptor; @@ -321,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +278,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -361,7 +300,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -380,7 +319,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +449,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteNetworkFirewallPolicyRequest.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 @@ -633,7 +565,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteNetworkFirewallPolicy requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,19 +580,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.DeleteNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1042,7 +1004,18 @@ public DeleteNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkRequest.java index 7dd434af12ae..c34b16b6361c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNetworkRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteNetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteNetworkRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteNetworkRequest.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 @@ -629,7 +561,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteNetworkRequest other) requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,17 +576,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteNetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 1862979954 + 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.compute.v1.DeleteNetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1034,7 +998,18 @@ public DeleteNetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteNetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodeGroupRequest.java index 100f6d8e7b24..efa2e7bab12e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodeGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodeGroupRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteNodeGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -535302126: - { - java.lang.String s = input.readStringRequireUtf8(); - - nodeGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteNodeGroupRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 469958146, nodeGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(469958146, nodeGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteNodeGroupRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteNodeGroupRequest othe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteNodeGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -535302126: + { + nodeGroup_ = input.readStringRequireUtf8(); + + break; + } // case -535302126 + 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.compute.v1.DeleteNodeGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public DeleteNodeGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteNodeGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodeTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodeTemplateRequest.java index 85092235148a..371f3b0116ed 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodeTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodeTemplateRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteNodeTemplateRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1709731654: - { - java.lang.String s = input.readStringRequireUtf8(); - - nodeTemplate_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteNodeTemplateRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeTemplate_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 323154455, nodeTemplate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeTemplate_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(323154455, nodeTemplate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteNodeTemplateRequest.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 @@ -707,7 +632,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteNodeTemplateRequest o requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -722,18 +647,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteNodeTemplateRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1709731654: + { + nodeTemplate_ = input.readStringRequireUtf8(); + + break; + } // case -1709731654 + 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.compute.v1.DeleteNodeTemplateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1229,7 +1191,18 @@ public DeleteNodeTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteNodeTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodesNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodesNodeGroupRequest.java index 1e21e2405349..e8b434da83cc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodesNodeGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteNodesNodeGroupRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteNodesNodeGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1466391698: - { - com.google.cloud.compute.v1.NodeGroupsDeleteNodesRequest.Builder subBuilder = null; - if (nodeGroupsDeleteNodesRequestResource_ != null) { - subBuilder = nodeGroupsDeleteNodesRequestResource_.toBuilder(); - } - nodeGroupsDeleteNodesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.NodeGroupsDeleteNodesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(nodeGroupsDeleteNodesRequestResource_); - nodeGroupsDeleteNodesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -535302126: - { - java.lang.String s = input.readStringRequireUtf8(); - - nodeGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteNodesNodeGroupRequest_descriptor; @@ -461,7 +376,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 469958146, nodeGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +402,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(469958146, nodeGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -516,7 +431,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -541,7 +456,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -671,17 +586,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteNodesNodeGroupRequest.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 @@ -814,7 +722,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteNodesNodeGroupRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -829,18 +737,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteNodesNodeGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1466391698: + { + input.readMessage( + getNodeGroupsDeleteNodesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1466391698 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -535302126: + { + nodeGroup_ = input.readStringRequireUtf8(); + + break; + } // case -535302126 + 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.compute.v1.DeleteNodesNodeGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1548,7 +1501,18 @@ public DeleteNodesNodeGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteNodesNodeGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePacketMirroringRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePacketMirroringRequest.java index 54542f8892c4..9f3074532e20 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePacketMirroringRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePacketMirroringRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeletePacketMirroringRequest( - 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 178447970: - { - java.lang.String s = input.readStringRequireUtf8(); - - packetMirroring_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeletePacketMirroringRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeletePacketMirroringRequest.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 @@ -707,7 +632,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeletePacketMirroringReques requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -722,18 +647,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeletePacketMirroringRequest 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 178447970: + { + packetMirroring_ = input.readStringRequireUtf8(); + + break; + } // case 178447970 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeletePacketMirroringRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1229,7 +1191,18 @@ public DeletePacketMirroringRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeletePacketMirroringRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePerInstanceConfigsInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePerInstanceConfigsInstanceGroupManagerRequest.java index 2365d7218173..202980158de5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePerInstanceConfigsInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePerInstanceConfigsInstanceGroupManagerRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeletePerInstanceConfigsInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -1395545854: - { - com.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq.Builder - subBuilder = null; - if (instanceGroupManagersDeletePerInstanceConfigsReqResource_ != null) { - subBuilder = instanceGroupManagersDeletePerInstanceConfigsReqResource_.toBuilder(); - } - instanceGroupManagersDeletePerInstanceConfigsReqResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagersDeletePerInstanceConfigsReqResource_); - instanceGroupManagersDeletePerInstanceConfigsReqResource_ = - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeletePerInstanceConfigsInstanceGroupManagerRequest_descriptor; @@ -394,7 +314,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupManagersDeletePerInstanceConfigsReqResource_ != null) { output.writeMessage(362427680, getInstanceGroupManagersDeletePerInstanceConfigsReqResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -419,7 +339,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 362427680, getInstanceGroupManagersDeletePerInstanceConfigsReqResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +367,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -470,7 +390,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -609,17 +529,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest.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 @@ -750,7 +663,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -765,20 +678,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest - 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -1395545854: + { + input.readMessage( + getInstanceGroupManagersDeletePerInstanceConfigsReqResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -1395545854 + 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.compute.v1.DeletePerInstanceConfigsInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1385,8 +1336,19 @@ public DeletePerInstanceConfigsInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeletePerInstanceConfigsInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.java index a9f25238f0b4..a4a590a3801d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.java @@ -57,86 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeletePerInstanceConfigsRegionInstanceGroupManagerRequest( - 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 5925930: - { - com.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq.Builder - subBuilder = null; - if (regionInstanceGroupManagerDeleteInstanceConfigReqResource_ != null) { - subBuilder = regionInstanceGroupManagerDeleteInstanceConfigReqResource_.toBuilder(); - } - regionInstanceGroupManagerDeleteInstanceConfigReqResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupManagerDeleteInstanceConfigReqResource_); - regionInstanceGroupManagerDeleteInstanceConfigReqResource_ = - subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeletePerInstanceConfigsRegionInstanceGroupManagerRequest_descriptor; @@ -396,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +341,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -449,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getRegionInstanceGroupManagerDeleteInstanceConfigReqResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -473,7 +393,7 @@ public int hashCode() { hash = (53 * hash) + getRegionInstanceGroupManagerDeleteInstanceConfigReqResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -627,17 +547,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.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 @@ -771,7 +684,7 @@ public Builder mergeFrom( mergeRegionInstanceGroupManagerDeleteInstanceConfigReqResource( other.getRegionInstanceGroupManagerDeleteInstanceConfigReqResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -786,20 +699,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest - 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 5925930: + { + input.readMessage( + getRegionInstanceGroupManagerDeleteInstanceConfigReqResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 5925930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1408,8 +1359,19 @@ public DeletePerInstanceConfigsRegionInstanceGroupManagerRequest parsePartialFro com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeletePerInstanceConfigsRegionInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePublicAdvertisedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePublicAdvertisedPrefixeRequest.java index b5c18efc13af..ac658b13cd54 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePublicAdvertisedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePublicAdvertisedPrefixeRequest.java @@ -56,67 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeletePublicAdvertisedPrefixeRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 814996722: - { - java.lang.String s = input.readStringRequireUtf8(); - - publicAdvertisedPrefix_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeletePublicAdvertisedPrefixeRequest_descriptor; @@ -325,7 +264,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -345,7 +284,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -367,7 +306,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -386,7 +325,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -516,17 +455,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest.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 @@ -640,7 +572,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -655,19 +587,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeletePublicAdvertisedPrefixeRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 814996722: + { + publicAdvertisedPrefix_ = input.readStringRequireUtf8(); + + break; + } // case 814996722 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeletePublicAdvertisedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1054,7 +1016,18 @@ public DeletePublicAdvertisedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeletePublicAdvertisedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePublicDelegatedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePublicDelegatedPrefixeRequest.java index c991773c65f7..31f7ac933d40 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePublicDelegatedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeletePublicDelegatedPrefixeRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeletePublicDelegatedPrefixeRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1633907522: - { - java.lang.String s = input.readStringRequireUtf8(); - - publicDelegatedPrefix_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeletePublicDelegatedPrefixeRequest_descriptor; @@ -388,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -411,7 +343,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -434,7 +366,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -455,7 +387,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -585,17 +517,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest.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 @@ -716,7 +641,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -731,19 +656,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeletePublicDelegatedPrefixeRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1633907522: + { + publicDelegatedPrefix_ = input.readStringRequireUtf8(); + + break; + } // case 1633907522 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeletePublicDelegatedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1246,7 +1207,18 @@ public DeletePublicDelegatedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeletePublicDelegatedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionAutoscalerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionAutoscalerRequest.java index a486993bd25d..d7e82fde87fd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionAutoscalerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionAutoscalerRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionAutoscalerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -156895558: - { - java.lang.String s = input.readStringRequireUtf8(); - - autoscaler_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionAutoscalerRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(autoscaler_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517258967, autoscaler_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(autoscaler_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517258967, autoscaler_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionAutoscalerRequest.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 @@ -707,7 +632,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionAutoscalerReque requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -722,18 +647,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionAutoscalerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -156895558: + { + autoscaler_ = input.readStringRequireUtf8(); + + break; + } // case -156895558 + 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.compute.v1.DeleteRegionAutoscalerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1229,7 +1191,18 @@ public DeleteRegionAutoscalerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionAutoscalerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionBackendServiceRequest.java index 1d3ae5cb7ab5..acdeda7c2c63 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionBackendServiceRequest.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionBackendServiceRequest_descriptor; @@ -385,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -406,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -429,7 +361,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -450,7 +382,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -580,17 +512,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionBackendServiceRequest.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 @@ -710,7 +635,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionBackendServiceR requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,19 +650,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + 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.compute.v1.DeleteRegionBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1234,7 +1195,18 @@ public DeleteRegionBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionDiskRequest.java index 4cf0e78537f2..d8f3f8059bc6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionDiskRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionDiskRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionDiskRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionDiskRequest oth requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteRegionDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public DeleteRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionHealthCheckRequest.java index 7db776ffb101..1ced0cf69f5f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionHealthCheckRequest.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionHealthCheckRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheck_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionHealthCheckRequest_descriptor; @@ -385,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 308876645, healthCheck_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -406,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(308876645, healthCheck_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -429,7 +361,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -450,7 +382,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -580,17 +512,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionHealthCheckRequest.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 @@ -708,7 +633,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionHealthCheckRequ requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -723,18 +648,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionHealthCheckRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + + break; + } // case -1823954134 + 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.compute.v1.DeleteRegionHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1230,7 +1192,18 @@ public DeleteRegionHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionHealthCheckServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionHealthCheckServiceRequest.java index a894bc775e64..21690b118e60 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionHealthCheckServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionHealthCheckServiceRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionHealthCheckServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1027969318: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheckService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionHealthCheckServiceRequest_descriptor; @@ -386,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheckService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 408374747, healthCheckService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -408,7 +340,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(408374747, healthCheckService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -431,7 +363,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -452,7 +384,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -584,17 +516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest.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 @@ -715,7 +640,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -730,19 +655,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionHealthCheckServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1027969318: + { + healthCheckService_ = input.readStringRequireUtf8(); + + break; + } // case -1027969318 + 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.compute.v1.DeleteRegionHealthCheckServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1245,7 +1206,18 @@ public DeleteRegionHealthCheckServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionHealthCheckServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionInstanceGroupManagerRequest.java index 59f7b38fe967..3b2ed0e1f306 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionInstanceGroupManagerRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionInstanceGroupManagerRequest_descriptor; @@ -388,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -411,7 +343,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -434,7 +366,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -455,7 +387,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -587,17 +519,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerRequest.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 @@ -720,7 +645,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -735,19 +660,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionInstanceGroupManagerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.DeleteRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1250,7 +1211,18 @@ public DeleteRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNetworkEndpointGroupRequest.java index 4fc295b9a5ed..1f4c836124d3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNetworkEndpointGroupRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionNetworkEndpointGroupRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionNetworkEndpointGroupRequest_descriptor; @@ -388,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkEndpointGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 433907078, networkEndpointGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -411,7 +343,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 433907078, networkEndpointGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -434,7 +366,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -455,7 +387,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -587,17 +519,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest.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 @@ -720,7 +645,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -735,19 +660,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionNetworkEndpointGroupRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + 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.compute.v1.DeleteRegionNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1250,7 +1211,18 @@ public DeleteRegionNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionNetworkEndpointGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNetworkFirewallPolicyRequest.java index 7833b7d8f2b1..1b9191c5a803 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNetworkFirewallPolicyRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionNetworkFirewallPolicyRequest_descriptor; @@ -386,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -407,7 +339,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -430,7 +362,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -451,7 +383,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -583,17 +515,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteRegionNetworkFirewallPolicyRequest.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 @@ -716,7 +641,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -731,19 +656,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.DeleteRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1241,7 +1202,18 @@ public DeleteRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNotificationEndpointRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNotificationEndpointRequest.java index 597928e6a223..0c3783722e29 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNotificationEndpointRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionNotificationEndpointRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionNotificationEndpointRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1280511158: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationEndpoint_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionNotificationEndpointRequest_descriptor; @@ -388,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationEndpoint_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 376807017, notificationEndpoint_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -411,7 +343,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 376807017, notificationEndpoint_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -434,7 +366,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -455,7 +387,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -587,17 +519,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteRegionNotificationEndpointRequest.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 @@ -720,7 +645,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -735,19 +660,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionNotificationEndpointRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1280511158: + { + notificationEndpoint_ = input.readStringRequireUtf8(); + + break; + } // case -1280511158 + 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.compute.v1.DeleteRegionNotificationEndpointRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1250,7 +1211,18 @@ public DeleteRegionNotificationEndpointRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionNotificationEndpointRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionOperationRequest.java index 194fb3b970ab..637dfb30acb0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionOperationRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionOperationRequest( - 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 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionOperationRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOperation().equals(other.getOperation())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionOperationRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionOperationReques region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionOperationRequest 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 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteRegionOperationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public DeleteRegionOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionOperationResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionOperationResponse.java index d0489914cc01..008529c163a3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionOperationResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionOperationResponse.java @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionOperationResponse( - 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; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionOperationResponse_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.compute.v1.DeleteRegionOperationResponse other = (com.google.cloud.compute.v1.DeleteRegionOperationResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -284,17 +245,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionOperationResponse.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 @@ -377,7 +331,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionOperationResponse other) { if (other == com.google.cloud.compute.v1.DeleteRegionOperationResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -392,18 +346,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionOperationResponse 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; + 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.compute.v1.DeleteRegionOperationResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -439,7 +406,18 @@ public DeleteRegionOperationResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionOperationResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSecurityPolicyRequest.java index 6dcb76e1c52e..598c4791f756 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSecurityPolicyRequest.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionSecurityPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - - securityPolicy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionSecurityPolicyRequest_descriptor; @@ -385,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -406,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -429,7 +361,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getSecurityPolicy().equals(other.getSecurityPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -450,7 +382,7 @@ public int hashCode() { } hash = (37 * hash) + SECURITY_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -580,17 +512,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionSecurityPolicyRequest.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 @@ -710,7 +635,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionSecurityPolicyR securityPolicy_ = other.securityPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,19 +650,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionSecurityPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1368660106 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteRegionSecurityPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1234,7 +1195,18 @@ public DeleteRegionSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSslCertificateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSslCertificateRequest.java index 9d4e333134d9..434a709f41ce 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSslCertificateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSslCertificateRequest.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionSslCertificateRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 371547938: - { - java.lang.String s = input.readStringRequireUtf8(); - - sslCertificate_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionSslCertificateRequest_descriptor; @@ -385,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -406,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -429,7 +361,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getSslCertificate().equals(other.getSslCertificate())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -450,7 +382,7 @@ public int hashCode() { } hash = (37 * hash) + SSL_CERTIFICATE_FIELD_NUMBER; hash = (53 * hash) + getSslCertificate().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -580,17 +512,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionSslCertificateRequest.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 @@ -710,7 +635,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionSslCertificateR sslCertificate_ = other.sslCertificate_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,19 +650,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionSslCertificateRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 371547938: + { + sslCertificate_ = input.readStringRequireUtf8(); + + break; + } // case 371547938 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteRegionSslCertificateRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1234,7 +1195,18 @@ public DeleteRegionSslCertificateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionSslCertificateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSslPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSslPolicyRequest.java index ea7e0185df6a..c6f6bb94514a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSslPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionSslPolicyRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionSslPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1933445590: - { - java.lang.String s = input.readStringRequireUtf8(); - - sslPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionSslPolicyRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 295190213, sslPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(295190213, sslPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getSslPolicy().equals(other.getSslPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + SSL_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSslPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionSslPolicyRequest.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 @@ -707,7 +632,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionSslPolicyReques sslPolicy_ = other.sslPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -722,18 +647,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionSslPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1933445590: + { + sslPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -1933445590 + 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.compute.v1.DeleteRegionSslPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1229,7 +1191,18 @@ public DeleteRegionSslPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionSslPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetHttpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetHttpProxyRequest.java index 69e099beb7e1..91e20ff01912 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetHttpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetHttpProxyRequest.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionTargetHttpProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1654979370: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionTargetHttpProxyRequest_descriptor; @@ -385,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -406,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -429,7 +361,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetHttpProxy().equals(other.getTargetHttpProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -450,7 +382,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_HTTP_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -580,17 +512,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest.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 @@ -710,7 +635,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionTargetHttpProxy targetHttpProxy_ = other.targetHttpProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,19 +650,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionTargetHttpProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1654979370: + { + targetHttpProxy_ = input.readStringRequireUtf8(); + + break; + } // case 1654979370 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteRegionTargetHttpProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1235,7 +1196,18 @@ public DeleteRegionTargetHttpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionTargetHttpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetHttpsProxyRequest.java index e12d0c3c3f48..6bf75a4d7fbe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetHttpsProxyRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionTargetHttpsProxyRequest_descriptor; @@ -386,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -407,7 +339,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -430,7 +362,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetHttpsProxy().equals(other.getTargetHttpsProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -451,7 +383,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_HTTPS_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -581,17 +513,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest.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 @@ -712,7 +637,7 @@ public Builder mergeFrom( targetHttpsProxy_ = other.targetHttpsProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -727,19 +652,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteRegionTargetHttpsProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1237,7 +1198,18 @@ public DeleteRegionTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetTcpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetTcpProxyRequest.java index 11e32021d49a..8d7098c5557e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetTcpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionTargetTcpProxyRequest.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionTargetTcpProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -270443758: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetTcpProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionTargetTcpProxyRequest_descriptor; @@ -385,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 503065442, targetTcpProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -406,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(503065442, targetTcpProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -429,7 +361,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetTcpProxy().equals(other.getTargetTcpProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -450,7 +382,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_TCP_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetTcpProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -580,17 +512,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionTargetTcpProxyRequest.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 @@ -710,7 +635,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionTargetTcpProxyR targetTcpProxy_ = other.targetTcpProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,19 +650,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionTargetTcpProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -270443758: + { + targetTcpProxy_ = input.readStringRequireUtf8(); + + break; + } // case -270443758 + 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.compute.v1.DeleteRegionTargetTcpProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1234,7 +1195,18 @@ public DeleteRegionTargetTcpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionTargetTcpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionUrlMapRequest.java index b9b4e3091af1..d44d511ae225 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRegionUrlMapRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRegionUrlMapRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRegionUrlMapRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getUrlMap().equals(other.getUrlMap())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + URL_MAP_FIELD_NUMBER; hash = (53 * hash) + getUrlMap().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRegionUrlMapRequest.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 @@ -707,7 +632,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRegionUrlMapRequest o urlMap_ = other.urlMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -722,18 +647,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRegionUrlMapRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + 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.compute.v1.DeleteRegionUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1229,7 +1191,18 @@ public DeleteRegionUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRegionUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteReservationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteReservationRequest.java index 9d9e19e75bbe..8754fa16bd9f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteReservationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteReservationRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteReservationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 380247650: - { - java.lang.String s = input.readStringRequireUtf8(); - - reservation_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteReservationRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getReservation().equals(other.getReservation())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { hash = (53 * hash) + getReservation().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteReservationRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteReservationRequest ot zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteReservationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 380247650: + { + reservation_ = input.readStringRequireUtf8(); + + break; + } // case 380247650 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteReservationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public DeleteReservationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteReservationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteResourcePolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteResourcePolicyRequest.java index 4178bab03e8d..21cec0be5e4b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteResourcePolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteResourcePolicyRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteResourcePolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1273926682: - { - java.lang.String s = input.readStringRequireUtf8(); - - resourcePolicy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteResourcePolicyRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getResourcePolicy().equals(other.getResourcePolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_POLICY_FIELD_NUMBER; hash = (53 * hash) + getResourcePolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteResourcePolicyRequest.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 @@ -707,7 +632,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteResourcePolicyRequest resourcePolicy_ = other.resourcePolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -722,18 +647,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteResourcePolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1273926682: + { + resourcePolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1273926682 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteResourcePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1229,7 +1191,18 @@ public DeleteResourcePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteResourcePolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRouteRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRouteRequest.java index ed7f6da82a43..fc9d22ebf375 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRouteRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRouteRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRouteRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 869634634: - { - java.lang.String s = input.readStringRequireUtf8(); - - route_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRouteRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getRoute().equals(other.getRoute())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + ROUTE_FIELD_NUMBER; hash = (53 * hash) + getRoute().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRouteRequest.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 @@ -628,7 +560,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRouteRequest other) { route_ = other.route_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -643,17 +575,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRouteRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 869634634: + { + route_ = input.readStringRequireUtf8(); + + break; + } // case 869634634 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteRouteRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1033,7 +997,18 @@ public DeleteRouteRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRouteRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRouterRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRouterRequest.java index a7ee49d40213..312067444dd4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRouterRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteRouterRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteRouterRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1188870730: - { - java.lang.String s = input.readStringRequireUtf8(); - - router_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteRouterRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getRouter().equals(other.getRouter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ROUTER_FIELD_NUMBER; hash = (53 * hash) + getRouter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteRouterRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteRouterRequest other) router_ = other.router_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,17 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteRouterRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1188870730: + { + router_ = input.readStringRequireUtf8(); + + break; + } // case 1188870730 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteRouterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1190,18 @@ public DeleteRouterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteRouterRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSecurityPolicyRequest.java index e67a220cf140..62683c42439c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSecurityPolicyRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteSecurityPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - - securityPolicy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteSecurityPolicyRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getSecurityPolicy().equals(other.getSecurityPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + SECURITY_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteSecurityPolicyRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteSecurityPolicyRequest securityPolicy_ = other.securityPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteSecurityPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1368660106 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteServiceAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteServiceAttachmentRequest.java index ded7a472f0ad..8f37c1c29287 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteServiceAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteServiceAttachmentRequest.java @@ -56,74 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteServiceAttachmentRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1583306902: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAttachment_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteServiceAttachmentRequest_descriptor; @@ -385,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAttachment_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 338957549, serviceAttachment_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -407,7 +339,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(338957549, serviceAttachment_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -430,7 +362,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getServiceAttachment().equals(other.getServiceAttachment())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -451,7 +383,7 @@ public int hashCode() { } hash = (37 * hash) + SERVICE_ATTACHMENT_FIELD_NUMBER; hash = (53 * hash) + getServiceAttachment().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -581,17 +513,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteServiceAttachmentRequest.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 @@ -709,7 +634,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteServiceAttachmentRequ serviceAttachment_ = other.serviceAttachment_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -724,18 +649,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteServiceAttachmentRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1583306902: + { + serviceAttachment_ = input.readStringRequireUtf8(); + + break; + } // case -1583306902 + 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.compute.v1.DeleteServiceAttachmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1231,7 +1193,18 @@ public DeleteServiceAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteServiceAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSignedUrlKeyBackendBucketRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSignedUrlKeyBackendBucketRequest.java index 32f2ff962094..9663d35e1802 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSignedUrlKeyBackendBucketRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSignedUrlKeyBackendBucketRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteSignedUrlKeyBackendBucketRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 733712298: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendBucket_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -287456422: - { - java.lang.String s = input.readStringRequireUtf8(); - - keyName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteSignedUrlKeyBackendBucketRequest_descriptor; @@ -382,7 +314,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 500938859, keyName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -403,7 +335,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(500938859, keyName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -426,7 +358,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -447,7 +379,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteSignedUrlKeyBackendBucketRequest.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 @@ -712,7 +637,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -727,19 +652,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteSignedUrlKeyBackendBucketRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 733712298: + { + backendBucket_ = input.readStringRequireUtf8(); + + break; + } // case 733712298 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -287456422: + { + keyName_ = input.readStringRequireUtf8(); + + break; + } // case -287456422 + 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.compute.v1.DeleteSignedUrlKeyBackendBucketRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1188,18 @@ public DeleteSignedUrlKeyBackendBucketRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSignedUrlKeyBackendBucketRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSignedUrlKeyBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSignedUrlKeyBackendServiceRequest.java index 5066a8ae8b63..4b015513a898 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSignedUrlKeyBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSignedUrlKeyBackendServiceRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteSignedUrlKeyBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = s; - break; - } - case -287456422: - { - java.lang.String s = input.readStringRequireUtf8(); - - keyName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteSignedUrlKeyBackendServiceRequest_descriptor; @@ -382,7 +314,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 500938859, keyName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -403,7 +335,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(keyName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(500938859, keyName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -426,7 +358,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -447,7 +379,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DeleteSignedUrlKeyBackendServiceRequest.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 @@ -712,7 +637,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -727,19 +652,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteSignedUrlKeyBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + case -287456422: + { + keyName_ = input.readStringRequireUtf8(); + + break; + } // case -287456422 + 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.compute.v1.DeleteSignedUrlKeyBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1188,18 @@ public DeleteSignedUrlKeyBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSignedUrlKeyBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSnapshotRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSnapshotRequest.java index 7bcb87ccdb44..fe740f35d522 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSnapshotRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSnapshotRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteSnapshotRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2015973854: - { - java.lang.String s = input.readStringRequireUtf8(); - - snapshot_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteSnapshotRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 284874180, snapshot_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(284874180, snapshot_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getSnapshot().equals(other.getSnapshot())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + SNAPSHOT_FIELD_NUMBER; hash = (53 * hash) + getSnapshot().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteSnapshotRequest.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 @@ -629,7 +561,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteSnapshotRequest other snapshot_ = other.snapshot_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,18 +576,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteSnapshotRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2015973854: + { + snapshot_ = input.readStringRequireUtf8(); + + break; + } // case -2015973854 + 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.compute.v1.DeleteSnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1035,7 +998,18 @@ public DeleteSnapshotRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSnapshotRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSslCertificateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSslCertificateRequest.java index 7adbc7db431e..191fbb3b114c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSslCertificateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSslCertificateRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteSslCertificateRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 371547938: - { - java.lang.String s = input.readStringRequireUtf8(); - - sslCertificate_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteSslCertificateRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getSslCertificate().equals(other.getSslCertificate())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + SSL_CERTIFICATE_FIELD_NUMBER; hash = (53 * hash) + getSslCertificate().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteSslCertificateRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteSslCertificateRequest sslCertificate_ = other.sslCertificate_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteSslCertificateRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 371547938: + { + sslCertificate_ = input.readStringRequireUtf8(); + + break; + } // case 371547938 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteSslCertificateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteSslCertificateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSslCertificateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSslPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSslPolicyRequest.java index c3e98ef3a9e8..eeda3e01c8b1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSslPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSslPolicyRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteSslPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1933445590: - { - java.lang.String s = input.readStringRequireUtf8(); - - sslPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteSslPolicyRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 295190213, sslPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(295190213, sslPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getSslPolicy().equals(other.getSslPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + SSL_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSslPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteSslPolicyRequest.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 @@ -629,7 +561,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteSslPolicyRequest othe sslPolicy_ = other.sslPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,18 +576,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteSslPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1933445590: + { + sslPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -1933445590 + 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.compute.v1.DeleteSslPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1035,7 +998,18 @@ public DeleteSslPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSslPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSubnetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSubnetworkRequest.java index 6a30d3e86a4c..f7a5ccf13526 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSubnetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteSubnetworkRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteSubnetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - - subnetwork_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteSubnetworkRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 307827694, subnetwork_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(307827694, subnetwork_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getSubnetwork().equals(other.getSubnetwork())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; hash = (53 * hash) + getSubnetwork().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteSubnetworkRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteSubnetworkRequest oth subnetwork_ = other.subnetwork_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteSubnetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + + break; + } // case -1832345742 + 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.compute.v1.DeleteSubnetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public DeleteSubnetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteSubnetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetGrpcProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetGrpcProxyRequest.java index 99229c3cf818..92899a7cf0d1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetGrpcProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetGrpcProxyRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTargetGrpcProxyRequest( - 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 40162266: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetGrpcProxy_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteTargetGrpcProxyRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetGrpcProxy().equals(other.getTargetGrpcProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_GRPC_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetGrpcProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteTargetGrpcProxyRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteTargetGrpcProxyReques targetGrpcProxy_ = other.targetGrpcProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteTargetGrpcProxyRequest 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 40162266: + { + targetGrpcProxy_ = input.readStringRequireUtf8(); + + break; + } // case 40162266 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteTargetGrpcProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteTargetGrpcProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTargetGrpcProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetHttpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetHttpProxyRequest.java index 032e3b5cb3db..739d674897eb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetHttpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetHttpProxyRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTargetHttpProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1654979370: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteTargetHttpProxyRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetHttpProxy().equals(other.getTargetHttpProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_HTTP_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteTargetHttpProxyRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteTargetHttpProxyReques targetHttpProxy_ = other.targetHttpProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteTargetHttpProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1654979370: + { + targetHttpProxy_ = input.readStringRequireUtf8(); + + break; + } // case 1654979370 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteTargetHttpProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteTargetHttpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTargetHttpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetHttpsProxyRequest.java index 2499aeaa7871..057f115fcab3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetHttpsProxyRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteTargetHttpsProxyRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetHttpsProxy().equals(other.getTargetHttpsProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_HTTPS_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteTargetHttpsProxyRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteTargetHttpsProxyReque targetHttpsProxy_ = other.targetHttpsProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteTargetHttpsProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetInstanceRequest.java index 2fb0ab21ad5d..90c60dc7bd71 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetInstanceRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTargetInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1976812518: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetInstance_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteTargetInstanceRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetInstance_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 289769347, targetInstance_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetInstance_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(289769347, targetInstance_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getTargetInstance().equals(other.getTargetInstance())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { hash = (53 * hash) + getTargetInstance().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteTargetInstanceRequest.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 @@ -707,7 +632,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteTargetInstanceRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -722,18 +647,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteTargetInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1976812518: + { + targetInstance_ = input.readStringRequireUtf8(); + + break; + } // case -1976812518 + 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.compute.v1.DeleteTargetInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1229,7 +1191,18 @@ public DeleteTargetInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTargetInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetPoolRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetPoolRequest.java index 7914b471a4b8..0c533b74d765 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetPoolRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetPoolRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTargetPoolRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 502370386: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetPool_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteTargetPoolRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetPool().equals(other.getTargetPool())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_POOL_FIELD_NUMBER; hash = (53 * hash) + getTargetPool().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteTargetPoolRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteTargetPoolRequest oth targetPool_ = other.targetPool_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteTargetPoolRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 502370386: + { + targetPool_ = input.readStringRequireUtf8(); + + break; + } // case 502370386 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteTargetPoolRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public DeleteTargetPoolRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTargetPoolRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetSslProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetSslProxyRequest.java index 8023041f1dc0..c9529766e3e7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetSslProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetSslProxyRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTargetSslProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1584600470: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetSslProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteTargetSslProxyRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 338795853, targetSslProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(338795853, targetSslProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetSslProxy().equals(other.getTargetSslProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_SSL_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetSslProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteTargetSslProxyRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteTargetSslProxyRequest targetSslProxy_ = other.targetSslProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteTargetSslProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1584600470: + { + targetSslProxy_ = input.readStringRequireUtf8(); + + break; + } // case -1584600470 + 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.compute.v1.DeleteTargetSslProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteTargetSslProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTargetSslProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetTcpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetTcpProxyRequest.java index 8b93ec809351..4c9f887a9ab4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetTcpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetTcpProxyRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTargetTcpProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -270443758: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetTcpProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteTargetTcpProxyRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 503065442, targetTcpProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(503065442, targetTcpProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetTcpProxy().equals(other.getTargetTcpProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_TCP_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetTcpProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteTargetTcpProxyRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteTargetTcpProxyRequest targetTcpProxy_ = other.targetTcpProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteTargetTcpProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -270443758: + { + targetTcpProxy_ = input.readStringRequireUtf8(); + + break; + } // case -270443758 + 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.compute.v1.DeleteTargetTcpProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public DeleteTargetTcpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTargetTcpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetVpnGatewayRequest.java index 792a0740c826..771066fdc2e1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteTargetVpnGatewayRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteTargetVpnGatewayRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -34864550: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetVpnGateway_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteTargetVpnGatewayRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetVpnGateway_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 532512843, targetVpnGateway_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -406,7 +338,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(532512843, targetVpnGateway_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -429,7 +361,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetVpnGateway().equals(other.getTargetVpnGateway())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -450,7 +382,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_VPN_GATEWAY_FIELD_NUMBER; hash = (53 * hash) + getTargetVpnGateway().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -580,17 +512,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest.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 @@ -708,7 +633,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteTargetVpnGatewayReque targetVpnGateway_ = other.targetVpnGateway_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -723,18 +648,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteTargetVpnGatewayRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -34864550: + { + targetVpnGateway_ = input.readStringRequireUtf8(); + + break; + } // case -34864550 + 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.compute.v1.DeleteTargetVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1230,7 +1192,18 @@ public DeleteTargetVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteTargetVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteUrlMapRequest.java index ae3af790b35b..86da755795a8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteUrlMapRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteUrlMapRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteUrlMapRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getUrlMap().equals(other.getUrlMap())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { } hash = (37 * hash) + URL_MAP_FIELD_NUMBER; hash = (53 * hash) + getUrlMap().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteUrlMapRequest.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 @@ -629,7 +561,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteUrlMapRequest other) urlMap_ = other.urlMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,17 +576,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteUrlMapRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + 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.compute.v1.DeleteUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1034,7 +998,18 @@ public DeleteUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteVpnGatewayRequest.java index 1b1750e0f0ca..72670c2b8349 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteVpnGatewayRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteVpnGatewayRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1041494070: - { - java.lang.String s = input.readStringRequireUtf8(); - - vpnGateway_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteVpnGatewayRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpnGateway_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 406684153, vpnGateway_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpnGateway_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(406684153, vpnGateway_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getVpnGateway().equals(other.getVpnGateway())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + VPN_GATEWAY_FIELD_NUMBER; hash = (53 * hash) + getVpnGateway().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteVpnGatewayRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteVpnGatewayRequest oth vpnGateway_ = other.vpnGateway_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteVpnGatewayRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1041494070: + { + vpnGateway_ = input.readStringRequireUtf8(); + + break; + } // case -1041494070 + 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.compute.v1.DeleteVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public DeleteVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteVpnTunnelRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteVpnTunnelRequest.java index 34510de9dcae..b535e0787202 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteVpnTunnelRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteVpnTunnelRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteVpnTunnelRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1150570650: - { - java.lang.String s = input.readStringRequireUtf8(); - - vpnTunnel_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteVpnTunnelRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getVpnTunnel().equals(other.getVpnTunnel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + VPN_TUNNEL_FIELD_NUMBER; hash = (53 * hash) + getVpnTunnel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteVpnTunnelRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteVpnTunnelRequest othe vpnTunnel_ = other.vpnTunnel_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteVpnTunnelRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1150570650: + { + vpnTunnel_ = input.readStringRequireUtf8(); + + break; + } // case 1150570650 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteVpnTunnelRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public DeleteVpnTunnelRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteVpnTunnelRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteZoneOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteZoneOperationRequest.java index e54712ad92d3..d334ed6c8468 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteZoneOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteZoneOperationRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteZoneOperationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteZoneOperationRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOperation().equals(other.getOperation())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteZoneOperationRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeleteZoneOperationRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteZoneOperationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DeleteZoneOperationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public DeleteZoneOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteZoneOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteZoneOperationResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteZoneOperationResponse.java index 3b348a548aa2..94b586455deb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteZoneOperationResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeleteZoneOperationResponse.java @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteZoneOperationResponse( - 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; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeleteZoneOperationResponse_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.compute.v1.DeleteZoneOperationResponse other = (com.google.cloud.compute.v1.DeleteZoneOperationResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -284,17 +245,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeleteZoneOperationResponse.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 @@ -377,7 +331,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.compute.v1.DeleteZoneOperationResponse other) { if (other == com.google.cloud.compute.v1.DeleteZoneOperationResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -392,18 +346,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeleteZoneOperationResponse 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; + 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.compute.v1.DeleteZoneOperationResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -439,7 +406,18 @@ public DeleteZoneOperationResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteZoneOperationResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Denied.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Denied.java index 979c9d48bdb6..e063d43e9135 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Denied.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Denied.java @@ -52,66 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Denied( - 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 854835346: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ports_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ports_.add(s); - break; - } - case -390211094: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - iPProtocol_ = 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_ & 0x00000002) != 0)) { - ports_ = ports_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Denied_descriptor; @@ -273,7 +213,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 488094525, iPProtocol_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -293,7 +233,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(488094525, iPProtocol_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIPProtocol().equals(other.getIPProtocol())) return false; } if (!getPortsList().equals(other.getPortsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -332,7 +272,7 @@ public int hashCode() { hash = (37 * hash) + PORTS_FIELD_NUMBER; hash = (53 * hash) + getPortsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,17 +399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Denied.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 @@ -581,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Denied other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -596,17 +529,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Denied 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 854835346: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePortsIsMutable(); + ports_.add(s); + break; + } // case 854835346 + case -390211094: + { + iPProtocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -390211094 + 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.compute.v1.Denied) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -932,7 +892,18 @@ public Denied parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Denied(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeprecateImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeprecateImageRequest.java index aa092b930884..2d0b89037b4e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeprecateImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeprecateImageRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeprecateImageRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 802507482: - { - java.lang.String s = input.readStringRequireUtf8(); - - image_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1630918782: - { - com.google.cloud.compute.v1.DeprecationStatus.Builder subBuilder = null; - if (deprecationStatusResource_ != null) { - subBuilder = deprecationStatusResource_.toBuilder(); - } - deprecationStatusResource_ = - input.readMessage( - com.google.cloud.compute.v1.DeprecationStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deprecationStatusResource_); - deprecationStatusResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeprecateImageRequest_descriptor; @@ -394,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (deprecationStatusResource_ != null) { output.writeMessage(333006064, getDeprecationStatusResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +340,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 333006064, getDeprecationStatusResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +367,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -467,7 +390,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +519,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeprecateImageRequest.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 @@ -731,7 +647,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeprecateImageRequest other requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -746,18 +662,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeprecateImageRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 802507482: + { + image_ = input.readStringRequireUtf8(); + + break; + } // case 802507482 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1630918782: + { + input.readMessage( + getDeprecationStatusResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1630918782 + 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.compute.v1.DeprecateImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1345,7 +1299,18 @@ public DeprecateImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeprecateImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeprecationStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeprecationStatus.java index 024244cbb231..7e3ff9e6b84b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeprecationStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DeprecationStatus.java @@ -56,81 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeprecationStatus( - 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 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - state_ = s; - break; - } - case -1433785142: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - obsolete_ = s; - break; - } - case -847613806: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - replacement_ = s; - break; - } - case -481197878: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - deleted_ = s; - break; - } - case -173855334: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - deprecated_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DeprecationStatus_descriptor; @@ -636,7 +561,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 515138995, deprecated_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -660,7 +585,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(515138995, deprecated_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -696,7 +621,7 @@ public boolean equals(final java.lang.Object obj) { if (hasState()) { if (!getState().equals(other.getState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -727,7 +652,7 @@ public int hashCode() { hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + getState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -856,17 +781,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DeprecationStatus.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 @@ -1006,7 +924,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DeprecationStatus other) { state_ = other.state_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1021,17 +939,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DeprecationStatus 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 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 878060682 + case -1433785142: + { + obsolete_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1433785142 + case -847613806: + { + replacement_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -847613806 + case -481197878: + { + deleted_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -481197878 + case -173855334: + { + deprecated_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -173855334 + 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.compute.v1.DeprecationStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1675,7 +1637,18 @@ public DeprecationStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeprecationStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachDiskInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachDiskInstanceRequest.java index 89619fe34830..7c17689d9ed5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachDiskInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachDiskInstanceRequest.java @@ -56,81 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DetachDiskInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 540333730: - { - java.lang.String s = input.readStringRequireUtf8(); - - deviceName_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DetachDiskInstanceRequest_descriptor; @@ -444,7 +369,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -468,7 +393,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -492,7 +417,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -515,7 +440,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -645,17 +570,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DetachDiskInstanceRequest.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 @@ -780,7 +698,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DetachDiskInstanceRequest o zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -795,18 +713,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DetachDiskInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 540333730: + { + deviceName_ = input.readStringRequireUtf8(); + + break; + } // case 540333730 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DetachDiskInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1408,7 +1369,18 @@ public DetachDiskInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DetachDiskInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest.java index f9018d37fbb4..afe57956a0f6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest.java @@ -57,87 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest( - 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 71186154: - { - com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequest.Builder - subBuilder = null; - if (globalNetworkEndpointGroupsDetachEndpointsRequestResource_ != null) { - subBuilder = globalNetworkEndpointGroupsDetachEndpointsRequestResource_.toBuilder(); - } - globalNetworkEndpointGroupsDetachEndpointsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalNetworkEndpointGroupsDetachEndpointsRequestResource_); - globalNetworkEndpointGroupsDetachEndpointsRequestResource_ = - subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest_descriptor; @@ -409,7 +328,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkEndpointGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 433907078, networkEndpointGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -434,7 +353,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 433907078, networkEndpointGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -465,7 +384,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -491,7 +410,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -632,17 +551,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest.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 @@ -782,7 +694,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -797,20 +709,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest - 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 71186154: + { + input.readMessage( + getGlobalNetworkEndpointGroupsDetachEndpointsRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 71186154 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + 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.compute.v1.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1424,8 +1374,19 @@ public DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsNetworkEndpointGroupRequest.java index db3b0f5f99bb..65fcefe2ca7b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DetachNetworkEndpointsNetworkEndpointGroupRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DetachNetworkEndpointsNetworkEndpointGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = s; - break; - } - case -170097718: - { - com.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequest.Builder - subBuilder = null; - if (networkEndpointGroupsDetachEndpointsRequestResource_ != null) { - subBuilder = networkEndpointGroupsDetachEndpointsRequestResource_.toBuilder(); - } - networkEndpointGroupsDetachEndpointsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkEndpointGroupsDetachEndpointsRequestResource_); - networkEndpointGroupsDetachEndpointsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DetachNetworkEndpointsNetworkEndpointGroupRequest_descriptor; @@ -470,7 +383,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (networkEndpointGroupsDetachEndpointsRequestResource_ != null) { output.writeMessage(515608697, getNetworkEndpointGroupsDetachEndpointsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -498,7 +411,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 515608697, getNetworkEndpointGroupsDetachEndpointsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -528,7 +441,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -553,7 +466,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -691,17 +604,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupRequest.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 @@ -845,7 +751,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -860,20 +766,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + case -170097718: + { + input.readMessage( + getNetworkEndpointGroupsDetachEndpointsRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -170097718 + 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.compute.v1.DetachNetworkEndpointsNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1597,8 +1547,19 @@ public DetachNetworkEndpointsNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DetachNetworkEndpointsNetworkEndpointGroupRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisableXpnHostProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisableXpnHostProjectRequest.java index ec0d980e04a3..ec9fa1ec95c6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisableXpnHostProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisableXpnHostProjectRequest.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DisableXpnHostProjectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DisableXpnHostProjectRequest_descriptor; @@ -260,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -275,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -296,7 +242,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -313,7 +259,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -443,17 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DisableXpnHostProjectRequest.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 @@ -557,7 +496,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DisableXpnHostProjectReques requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -572,18 +511,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DisableXpnHostProjectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DisableXpnHostProjectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -857,7 +821,18 @@ public DisableXpnHostProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DisableXpnHostProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisableXpnResourceProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisableXpnResourceProjectRequest.java index 12cf07a69cd1..c14433e55226 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisableXpnResourceProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisableXpnResourceProjectRequest.java @@ -54,78 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DisableXpnResourceProjectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1673089362: - { - com.google.cloud.compute.v1.ProjectsDisableXpnResourceRequest.Builder subBuilder = - null; - if (projectsDisableXpnResourceRequestResource_ != null) { - subBuilder = projectsDisableXpnResourceRequestResource_.toBuilder(); - } - projectsDisableXpnResourceRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.ProjectsDisableXpnResourceRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(projectsDisableXpnResourceRequestResource_); - projectsDisableXpnResourceRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DisableXpnResourceProjectRequest_descriptor; @@ -339,7 +267,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -359,7 +287,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -386,7 +314,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -407,7 +335,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -537,17 +465,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DisableXpnResourceProjectRequest.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 @@ -670,7 +591,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DisableXpnResourceProjectRe requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -685,18 +606,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DisableXpnResourceProjectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1673089362: + { + input.readMessage( + getProjectsDisableXpnResourceRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1673089362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.DisableXpnResourceProjectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1183,7 +1137,18 @@ public DisableXpnResourceProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DisableXpnResourceProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Disk.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Disk.java index daae7de1ec3d..846d4f973c1a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Disk.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Disk.java @@ -79,404 +79,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Disk( - 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; - int mutable_bitField1_ = 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - name_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x20000000; - type_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x40000000; - zone_ = s; - break; - } - case 177763082: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00200000) != 0)) { - resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00200000; - } - resourcePolicies_.add(s); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 337277226: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - lastAttachTimestamp_ = s; - break; - } - case 363861312: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - licenseCodes_ = newLongList(); - mutable_bitField0_ |= 0x00000800; - } - licenseCodes_.addLong(input.readInt64()); - break; - } - case 363861314: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000800) != 0) && input.getBytesUntilLimit() > 0) { - licenseCodes_ = newLongList(); - mutable_bitField0_ |= 0x00000800; - } - while (input.getBytesUntilLimit() > 0) { - licenseCodes_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 387506178: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00100000) != 0)) { - replicaZones_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00100000; - } - replicaZones_.add(s); - break; - } - case 403546554: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00200000; - sourceImage_ = s; - break; - } - case 442626330: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00800000; - sourceImageId_ = s; - break; - } - case 451768218: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - lastDetachTimestamp_ = s; - break; - } - case 626510898: - { - com.google.cloud.compute.v1.DiskParams.Builder subBuilder = null; - if (((bitField0_ & 0x00001000) != 0)) { - subBuilder = params_.toBuilder(); - } - params_ = - input.readMessage( - com.google.cloud.compute.v1.DiskParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(params_); - params_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00001000; - break; - } - case 634356362: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - guestOsFeatures_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - guestOsFeatures_.add( - input.readMessage( - com.google.cloud.compute.v1.GuestOsFeature.parser(), extensionRegistry)); - break; - } - case 791698066: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x04000000; - sourceSnapshotId_ = s; - break; - } - case 892629058: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField1_ & 0x00000010) != 0)) { - users_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField1_ |= 0x00000010; - } - users_.add(s); - break; - } - case 1008495426: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x01000000; - sourceSnapshot_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - region_ = s; - break; - } - case 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - labelFingerprint_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x10000000; - status_ = s; - break; - } - case 1494152864: - { - bitField0_ |= 0x00004000; - provisionedIops_ = input.readInt64(); - break; - } - case 1864421690: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x08000000; - sourceStorageObject_ = s; - break; - } - case -2121681878: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = diskEncryptionKey_.toBuilder(); - } - diskEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diskEncryptionKey_); - diskEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case -1872541030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - architecture_ = s; - break; - } - case -1865532718: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x02000000) != 0)) { - subBuilder = sourceSnapshotEncryptionKey_.toBuilder(); - } - sourceSnapshotEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceSnapshotEncryptionKey_); - sourceSnapshotEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x02000000; - break; - } - case -1593826670: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - licenses_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00001000; - } - licenses_.add(s); - break; - } - case -1490811254: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - locationHint_ = s; - break; - } - case -1405864718: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - options_ = s; - break; - } - case -1242938022: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00400000) != 0)) { - subBuilder = sourceImageEncryptionKey_.toBuilder(); - } - sourceImageEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceImageEncryptionKey_); - sourceImageEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00400000; - break; - } - case -934903752: - { - bitField0_ |= 0x00002000; - physicalBlockSizeBytes_ = input.readInt64(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -680936950: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; - sourceDisk_ = s; - break; - } - case -661440822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00100000; - sourceDiskId_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - selfLink_ = s; - break; - } - case -447253160: - { - bitField0_ |= 0x00010000; - satisfiesPzs_ = input.readBool(); - break; - } - case -335532344: - { - bitField0_ |= 0x00040000; - sizeGb_ = input.readInt64(); - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000100; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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_ & 0x00200000) != 0)) { - resourcePolicies_ = resourcePolicies_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000800) != 0)) { - licenseCodes_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00100000) != 0)) { - replicaZones_ = replicaZones_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_); - } - if (((mutable_bitField1_ & 0x00000010) != 0)) { - users_ = users_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00001000) != 0)) { - licenses_ = licenses_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Disk_descriptor; @@ -3292,7 +2894,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3467,7 +3069,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3614,7 +3216,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3777,7 +3379,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3961,10 +3563,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000008); if (guestOsFeaturesBuilder_ == null) { guestOsFeatures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + guestOsFeatures_ = null; guestOsFeaturesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); id_ = 0L; bitField0_ = (bitField0_ & ~0x00000020); kind_ = ""; @@ -4512,7 +4115,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Disk other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4527,17 +4130,290 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Disk 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 26989658 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000008; + break; + } // case 28604882 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000020; + break; + } // case 29957474 + case 177763082: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 177763082 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 337277226: + { + lastAttachTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 337277226 + case 363861312: + { + long v = input.readInt64(); + ensureLicenseCodesIsMutable(); + licenseCodes_.addLong(v); + break; + } // case 363861312 + case 363861314: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureLicenseCodesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + licenseCodes_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 363861314 + case 387506178: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReplicaZonesIsMutable(); + replicaZones_.add(s); + break; + } // case 387506178 + case 403546554: + { + sourceImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x08000000; + break; + } // case 403546554 + case 442626330: + { + sourceImageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x20000000; + break; + } // case 442626330 + case 451768218: + { + lastDetachTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 451768218 + case 626510898: + { + input.readMessage(getParamsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 626510898 + case 634356362: + { + com.google.cloud.compute.v1.GuestOsFeature m = + input.readMessage( + com.google.cloud.compute.v1.GuestOsFeature.parser(), extensionRegistry); + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(m); + } else { + guestOsFeaturesBuilder_.addMessage(m); + } + break; + } // case 634356362 + case 791698066: + { + sourceSnapshotId_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000001; + break; + } // case 791698066 + case 892629058: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUsersIsMutable(); + users_.add(s); + break; + } // case 892629058 + case 1008495426: + { + sourceSnapshot_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case 1008495426 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case 1111570338 + case 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1424998602 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000004; + break; + } // case 1450082194 + case 1494152864: + { + provisionedIops_ = input.readInt64(); + bitField0_ |= 0x00040000; + break; + } // case 1494152864 + case 1864421690: + { + sourceStorageObject_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000002; + break; + } // case 1864421690 + case -2121681878: + { + input.readMessage( + getDiskEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -2121681878 + case -1872541030: + { + architecture_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1872541030 + case -1865532718: + { + input.readMessage( + getSourceSnapshotEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x80000000; + break; + } // case -1865532718 + case -1593826670: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicensesIsMutable(); + licenses_.add(s); + break; + } // case -1593826670 + case -1490811254: + { + locationHint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case -1490811254 + case -1405864718: + { + options_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case -1405864718 + case -1242938022: + { + input.readMessage( + getSourceImageEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x10000000; + break; + } // case -1242938022 + case -934903752: + { + physicalBlockSizeBytes_ = input.readInt64(); + bitField0_ |= 0x00020000; + break; + } // case -934903752 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -680936950: + { + sourceDisk_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case -680936950 + case -661440822: + { + sourceDiskId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x04000000; + break; + } // case -661440822 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case -645248918 + case -447253160: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00400000; + break; + } // case -447253160 + case -335532344: + { + sizeGb_ = input.readInt64(); + bitField0_ |= 0x01000000; + break; + } // case -335532344 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.Disk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9689,7 +9565,18 @@ public Disk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Disk(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskAggregatedList.java index 2df903b9facd..dcd167e14637 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiskAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.DisksScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_DiskAggregatedList_descriptor; @@ -702,7 +589,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -745,7 +632,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -783,7 +670,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -822,7 +709,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1149,7 +1036,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DiskAggregatedList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1164,17 +1051,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DiskAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.DisksScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.DiskAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2215,7 +2164,18 @@ public DiskAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiskAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskInstantiationConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskInstantiationConfig.java index fc314461ac64..3d252348b2f9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskInstantiationConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskInstantiationConfig.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiskInstantiationConfig( - 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 540333730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - deviceName_ = s; - break; - } - case 1472985194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - customImage_ = s; - break; - } - case -1147896070: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - instantiateFrom_ = s; - break; - } - case -576876072: - { - bitField0_ |= 0x00000001; - autoDelete_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DiskInstantiationConfig_descriptor; @@ -662,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(464761403, autoDelete_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -683,7 +616,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(464761403, autoDelete_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -715,7 +648,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInstantiateFrom()) { if (!getInstantiateFrom().equals(other.getInstantiateFrom())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -742,7 +675,7 @@ public int hashCode() { hash = (37 * hash) + INSTANTIATE_FROM_FIELD_NUMBER; hash = (53 * hash) + getInstantiateFrom().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -871,17 +804,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DiskInstantiationConfig.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 @@ -1009,7 +935,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DiskInstantiationConfig oth instantiateFrom_ = other.instantiateFrom_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1024,18 +950,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DiskInstantiationConfig 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 540333730: + { + deviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 540333730 + case 1472985194: + { + customImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1472985194 + case -1147896070: + { + instantiateFrom_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -1147896070 + case -576876072: + { + autoDelete_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -576876072 + 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.compute.v1.DiskInstantiationConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1506,7 +1469,18 @@ public DiskInstantiationConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiskInstantiationConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskList.java index 26a7d3ed4b9f..6419e1f5ec6d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskList.java @@ -56,103 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiskList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage(com.google.cloud.compute.v1.Disk.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_DiskList_descriptor; @@ -572,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -635,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -670,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -821,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -998,7 +902,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DiskList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1013,17 +917,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DiskList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Disk m = + input.readMessage(com.google.cloud.compute.v1.Disk.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.DiskList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2073,7 +2033,18 @@ public DiskList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiskList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskMoveRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskMoveRequest.java index 86325c662707..e8bd83488553 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskMoveRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskMoveRequest.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiskMoveRequest( - 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 499465306: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - targetDisk_ = s; - break; - } - case 1054837226: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - destinationZone_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DiskMoveRequest_descriptor; @@ -270,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 131854653, destinationZone_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -285,7 +231,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(131854653, destinationZone_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetDisk()) { if (!getTargetDisk().equals(other.getTargetDisk())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_DISK_FIELD_NUMBER; hash = (53 * hash) + getTargetDisk().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -456,17 +402,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DiskMoveRequest.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 +512,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DiskMoveRequest other) { targetDisk_ = other.targetDisk_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -588,17 +527,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DiskMoveRequest 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 499465306: + { + targetDisk_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 499465306 + case 1054837226: + { + destinationZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1054837226 + 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.compute.v1.DiskMoveRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -876,7 +841,18 @@ public DiskMoveRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiskMoveRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskParams.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskParams.java index 4681415e7b1d..5d11396de5e0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskParams.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskParams.java @@ -50,64 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiskParams( - 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 -1273597982: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourceManagerTags_ = - com.google.protobuf.MapField.newMapField( - ResourceManagerTagsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - resourceManagerTags__ = - input.readMessage( - ResourceManagerTagsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - resourceManagerTags_ - .getMutableMap() - .put(resourceManagerTags__.getKey(), resourceManagerTags__.getValue()); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DiskParams_descriptor; @@ -256,7 +198,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io internalGetResourceManagerTags(), ResourceManagerTagsDefaultEntryHolder.defaultEntry, 377671164); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -277,7 +219,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 377671164, resourceManagerTags__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -294,7 +236,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetResourceManagerTags().equals(other.internalGetResourceManagerTags())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -309,7 +251,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_MANAGER_TAGS_FIELD_NUMBER; hash = (53 * hash) + internalGetResourceManagerTags().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +400,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.DiskParams.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 @@ -555,7 +490,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.compute.v1.DiskParams other) { if (other == com.google.cloud.compute.v1.DiskParams.getDefaultInstance()) return this; internalGetMutableResourceManagerTags().mergeFrom(other.internalGetResourceManagerTags()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -570,17 +505,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DiskParams 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 -1273597982: + { + com.google.protobuf.MapEntry + resourceManagerTags__ = + input.readMessage( + ResourceManagerTagsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableResourceManagerTags() + .getMutableMap() + .put(resourceManagerTags__.getKey(), resourceManagerTags__.getValue()); + break; + } // case -1273597982 + 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.compute.v1.DiskParams) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -783,7 +744,18 @@ public DiskParams parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiskParams(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskType.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskType.java index 70b0ba7694d7..ba62821a47f3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskType.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskType.java @@ -59,130 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiskType( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - region_ = s; - break; - } - case -2130013272: - { - bitField0_ |= 0x00000002; - defaultDiskSizeGb_ = input.readInt64(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = s; - break; - } - case -343267582: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - validDiskSize_ = s; - break; - } - case -173855334: - { - com.google.cloud.compute.v1.DeprecationStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = deprecated_.toBuilder(); - } - deprecated_ = - input.readMessage( - com.google.cloud.compute.v1.DeprecationStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deprecated_); - deprecated_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DiskType_descriptor; @@ -874,7 +750,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(515138995, getDeprecated()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -917,7 +793,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(515138995, getDeprecated()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -976,7 +852,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1031,7 +907,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1378,7 +1254,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DiskType other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1393,17 +1269,97 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DiskType 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26989658 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1111570338 + case -2130013272: + { + defaultDiskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case -2130013272 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -645248918 + case -343267582: + { + validDiskSize_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -343267582 + case -173855334: + { + input.readMessage(getDeprecatedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -173855334 + 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.compute.v1.DiskType) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2722,7 +2678,18 @@ public DiskType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiskType(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypeAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypeAggregatedList.java index 54691cbf7b5c..4acbfadd70b1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypeAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypeAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiskTypeAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.DiskTypesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_DiskTypeAggregatedList_descriptor; @@ -704,7 +591,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -748,7 +635,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -786,7 +673,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -825,7 +712,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1153,7 +1040,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DiskTypeAggregatedList othe if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1168,18 +1055,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DiskTypeAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.DiskTypesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.DiskTypeAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2228,7 +2176,18 @@ public DiskTypeAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiskTypeAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypeList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypeList.java index 54f5f4188ee2..b7d10504f279 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypeList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypeList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiskTypeList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.DiskType.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_DiskTypeList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -823,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DiskTypeList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DiskTypeList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.DiskType m = + input.readMessage( + com.google.cloud.compute.v1.DiskType.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.DiskTypeList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2078,7 +2038,18 @@ public DiskTypeList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiskTypeList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypesScopedList.java index f16d838babfc..808827fb8d97 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DiskTypesScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DiskTypesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1591409338: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - diskTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - diskTypes_.add( - input.readMessage( - com.google.cloud.compute.v1.DiskType.parser(), extensionRegistry)); - 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)) { - diskTypes_ = java.util.Collections.unmodifiableList(diskTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_DiskTypesScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < diskTypes_.size(); i++) { output.writeMessage(198926167, diskTypes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(198926167, diskTypes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (diskTypesBuilder_ == null) { diskTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + diskTypes_ = null; diskTypesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DiskTypesScopedList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,17 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DiskTypesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 1591409338: + { + com.google.cloud.compute.v1.DiskType m = + input.readMessage( + com.google.cloud.compute.v1.DiskType.parser(), extensionRegistry); + if (diskTypesBuilder_ == null) { + ensureDiskTypesIsMutable(); + diskTypes_.add(m); + } else { + diskTypesBuilder_.addMessage(m); + } + break; + } // case 1591409338 + 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.compute.v1.DiskTypesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1211,7 +1175,18 @@ public DiskTypesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DiskTypesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksAddResourcePoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksAddResourcePoliciesRequest.java index 4cb4cd5d98ae..4485747b0340 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksAddResourcePoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksAddResourcePoliciesRequest.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DisksAddResourcePoliciesRequest( - 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 177763082: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - resourcePolicies_.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)) { - resourcePolicies_ = resourcePolicies_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_DisksAddResourcePoliciesRequest_descriptor; @@ -199,7 +146,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 22220385, resourcePolicies_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -216,7 +163,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getResourcePoliciesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -233,7 +180,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.DisksAddResourcePoliciesRequest) obj; if (!getResourcePoliciesList().equals(other.getResourcePoliciesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -248,7 +195,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_POLICIES_FIELD_NUMBER; hash = (53 * hash) + getResourcePoliciesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -377,17 +324,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DisksAddResourcePoliciesRequest.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 @@ -488,7 +428,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DisksAddResourcePoliciesReq } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -503,18 +443,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DisksAddResourcePoliciesRequest 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 177763082: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 177763082 + 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.compute.v1.DisksAddResourcePoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -720,7 +680,18 @@ public DisksAddResourcePoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DisksAddResourcePoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksRemoveResourcePoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksRemoveResourcePoliciesRequest.java index a418d4c960e8..6970763b1d73 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksRemoveResourcePoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksRemoveResourcePoliciesRequest.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DisksRemoveResourcePoliciesRequest( - 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 177763082: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - resourcePolicies_.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)) { - resourcePolicies_ = resourcePolicies_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_DisksRemoveResourcePoliciesRequest_descriptor; @@ -199,7 +146,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 22220385, resourcePolicies_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -216,7 +163,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getResourcePoliciesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -233,7 +180,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequest) obj; if (!getResourcePoliciesList().equals(other.getResourcePoliciesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -248,7 +195,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_POLICIES_FIELD_NUMBER; hash = (53 * hash) + getResourcePoliciesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -377,17 +324,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequest.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 @@ -490,7 +430,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DisksRemoveResourcePolicies } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -505,19 +445,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequest 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 177763082: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 177763082 + 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.compute.v1.DisksRemoveResourcePoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -725,7 +684,18 @@ public DisksRemoveResourcePoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DisksRemoveResourcePoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksResizeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksResizeRequest.java index 6727b71b807f..d9ae014910d4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksResizeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksResizeRequest.java @@ -49,52 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DisksResizeRequest( - 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 -335532344: - { - bitField0_ |= 0x00000001; - sizeGb_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DisksResizeRequest_descriptor; @@ -161,7 +115,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(494929369, sizeGb_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -173,7 +127,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(494929369, sizeGb_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -193,7 +147,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSizeGb()) { if (getSizeGb() != other.getSizeGb()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -208,7 +162,7 @@ public int hashCode() { hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeGb()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -336,17 +290,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DisksResizeRequest.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 @@ -440,7 +387,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DisksResizeRequest other) { if (other.hasSizeGb()) { setSizeGb(other.getSizeGb()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -455,17 +402,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DisksResizeRequest 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 -335532344: + { + sizeGb_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case -335532344 + 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.compute.v1.DisksResizeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -570,7 +537,18 @@ public DisksResizeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DisksResizeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksScopedList.java index 1264e9bfce97..93dc41d710cf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisksScopedList.java @@ -51,75 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DisksScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 764752818: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - disks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - disks_.add( - input.readMessage(com.google.cloud.compute.v1.Disk.parser(), extensionRegistry)); - 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)) { - disks_ = java.util.Collections.unmodifiableList(disks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_DisksScopedList_descriptor; @@ -271,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < disks_.size(); i++) { output.writeMessage(95594102, disks_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +217,7 @@ public int getSerializedSize() { for (int i = 0; i < disks_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(95594102, disks_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -307,7 +238,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -326,7 +257,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -475,10 +406,11 @@ public Builder clear() { super.clear(); if (disksBuilder_ == null) { disks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + disks_ = null; disksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -611,7 +543,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DisksScopedList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -626,17 +558,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DisksScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 764752818: + { + com.google.cloud.compute.v1.Disk m = + input.readMessage(com.google.cloud.compute.v1.Disk.parser(), extensionRegistry); + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(m); + } else { + disksBuilder_.addMessage(m); + } + break; + } // case 764752818 + 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.compute.v1.DisksScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1206,7 +1170,18 @@ public DisksScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DisksScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisplayDevice.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisplayDevice.java index 4b30f74922ef..05972d8fe142 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisplayDevice.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DisplayDevice.java @@ -50,52 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DisplayDevice( - 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 114135088: - { - bitField0_ |= 0x00000001; - enableDisplay_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DisplayDevice_descriptor; @@ -162,7 +116,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(14266886, enableDisplay_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -174,7 +128,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(14266886, enableDisplay_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -194,7 +148,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEnableDisplay()) { if (getEnableDisplay() != other.getEnableDisplay()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -209,7 +163,7 @@ public int hashCode() { hash = (37 * hash) + ENABLE_DISPLAY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDisplay()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -338,17 +292,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DisplayDevice.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 @@ -442,7 +389,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DisplayDevice other) { if (other.hasEnableDisplay()) { setEnableDisplay(other.getEnableDisplay()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -457,17 +404,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DisplayDevice 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 114135088: + { + enableDisplay_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 114135088 + 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.compute.v1.DisplayDevice) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -572,7 +539,18 @@ public DisplayDevice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DisplayDevice(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DistributionPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DistributionPolicy.java index fac724d16918..d11abd859669 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DistributionPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DistributionPolicy.java @@ -52,70 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DistributionPolicy( - 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 928682554: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - zones_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration>(); - mutable_bitField0_ |= 0x00000002; - } - zones_.add( - input.readMessage( - com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.parser(), - extensionRegistry)); - break; - } - case -1585996902: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - targetShape_ = 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_ & 0x00000002) != 0)) { - zones_ = java.util.Collections.unmodifiableList(zones_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_DistributionPolicy_descriptor; @@ -475,7 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 338621299, targetShape_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -490,7 +426,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(338621299, targetShape_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -511,7 +447,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTargetShape().equals(other.getTargetShape())) return false; } if (!getZonesList().equals(other.getZonesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -530,7 +466,7 @@ public int hashCode() { hash = (37 * hash) + ZONES_FIELD_NUMBER; hash = (53 * hash) + getZonesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -658,19 +594,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DistributionPolicy.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) { - getZonesFieldBuilder(); - } } @java.lang.Override @@ -680,10 +607,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (zonesBuilder_ == null) { zones_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + zones_ = null; zonesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -808,7 +736,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.DistributionPolicy other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -823,17 +751,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DistributionPolicy 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 928682554: + { + com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration m = + input.readMessage( + com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.parser(), + extensionRegistry); + if (zonesBuilder_ == null) { + ensureZonesIsMutable(); + zones_.add(m); + } else { + zonesBuilder_.addMessage(m); + } + break; + } // case 928682554 + case -1585996902: + { + targetShape_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1585996902 + 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.compute.v1.DistributionPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1400,7 +1362,18 @@ public DistributionPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DistributionPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DistributionPolicyZoneConfiguration.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DistributionPolicyZoneConfiguration.java index 5303223e210c..2c3e2bc8a619 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DistributionPolicyZoneConfiguration.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/DistributionPolicyZoneConfiguration.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DistributionPolicyZoneConfiguration( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - zone_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_DistributionPolicyZoneConfiguration_descriptor; @@ -197,7 +150,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3744684, zone_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -209,7 +162,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3744684, zone_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -229,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -244,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -373,17 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration.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 @@ -483,7 +429,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -498,19 +444,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.DistributionPolicyZoneConfiguration 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 29957474 + 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.compute.v1.DistributionPolicyZoneConfiguration) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -670,7 +634,18 @@ public DistributionPolicyZoneConfiguration parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DistributionPolicyZoneConfiguration(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Duration.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Duration.java index 4bd5b35dddea..cd0f3d52ddda 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Duration.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Duration.java @@ -50,58 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Duration( - 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 836690424: - { - bitField0_ |= 0x00000001; - nanos_ = input.readInt32(); - break; - } - case -1419095048: - { - bitField0_ |= 0x00000002; - seconds_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Duration_descriptor; @@ -204,7 +152,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeInt64(359484031, seconds_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +167,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(359484031, seconds_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -242,7 +190,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSeconds()) { if (getSeconds() != other.getSeconds()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -261,7 +209,7 @@ public int hashCode() { hash = (37 * hash) + SECONDS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSeconds()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -389,17 +337,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Duration.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 @@ -501,7 +442,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Duration other) { if (other.hasSeconds()) { setSeconds(other.getSeconds()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -516,17 +457,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Duration 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 836690424: + { + nanos_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 836690424 + case -1419095048: + { + seconds_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case -1419095048 + 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.compute.v1.Duration) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -698,7 +665,18 @@ public Duration parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Duration(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/EnableXpnHostProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/EnableXpnHostProjectRequest.java index ad71e93a34af..784fe1ce7f8c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/EnableXpnHostProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/EnableXpnHostProjectRequest.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EnableXpnHostProjectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_EnableXpnHostProjectRequest_descriptor; @@ -260,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -275,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -296,7 +242,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -313,7 +259,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -443,17 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.EnableXpnHostProjectRequest.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 @@ -557,7 +496,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.EnableXpnHostProjectRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -572,18 +511,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.EnableXpnHostProjectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.EnableXpnHostProjectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -857,7 +821,18 @@ public EnableXpnHostProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EnableXpnHostProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/EnableXpnResourceProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/EnableXpnResourceProjectRequest.java index 14259586b43f..e0329565c58c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/EnableXpnResourceProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/EnableXpnResourceProjectRequest.java @@ -54,78 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private EnableXpnResourceProjectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -919125638: - { - com.google.cloud.compute.v1.ProjectsEnableXpnResourceRequest.Builder subBuilder = - null; - if (projectsEnableXpnResourceRequestResource_ != null) { - subBuilder = projectsEnableXpnResourceRequestResource_.toBuilder(); - } - projectsEnableXpnResourceRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.ProjectsEnableXpnResourceRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(projectsEnableXpnResourceRequestResource_); - projectsEnableXpnResourceRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_EnableXpnResourceProjectRequest_descriptor; @@ -339,7 +267,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (projectsEnableXpnResourceRequestResource_ != null) { output.writeMessage(421980207, getProjectsEnableXpnResourceRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -359,7 +287,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 421980207, getProjectsEnableXpnResourceRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -386,7 +314,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -407,7 +335,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -537,17 +465,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.EnableXpnResourceProjectRequest.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 @@ -668,7 +589,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.EnableXpnResourceProjectReq requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -683,18 +604,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.EnableXpnResourceProjectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -919125638: + { + input.readMessage( + getProjectsEnableXpnResourceRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -919125638 + 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.compute.v1.EnableXpnResourceProjectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1180,7 +1134,18 @@ public EnableXpnResourceProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EnableXpnResourceProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Error.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Error.java index c49d07bce33e..bf7b50f2ada9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Error.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Error.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Error( - 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 -1767146662: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errors_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errors_.add( - input.readMessage( - com.google.cloud.compute.v1.Errors.parser(), extensionRegistry)); - 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)) { - errors_ = java.util.Collections.unmodifiableList(errors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Error_descriptor; @@ -207,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < errors_.size(); i++) { output.writeMessage(315977579, errors_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +165,7 @@ public int getSerializedSize() { for (int i = 0; i < errors_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(315977579, errors_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -235,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.compute.v1.Error other = (com.google.cloud.compute.v1.Error) obj; if (!getErrorsList().equals(other.getErrorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -250,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + ERRORS_FIELD_NUMBER; hash = (53 * hash) + getErrorsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -378,19 +324,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Error.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) { - getErrorsFieldBuilder(); - } } @java.lang.Override @@ -398,10 +335,11 @@ public Builder clear() { super.clear(); if (errorsBuilder_ == null) { errors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errors_ = null; errorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -514,7 +452,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Error other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -529,17 +467,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Error 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 -1767146662: + { + com.google.cloud.compute.v1.Errors m = + input.readMessage( + com.google.cloud.compute.v1.Errors.parser(), extensionRegistry); + if (errorsBuilder_ == null) { + ensureErrorsIsMutable(); + errors_.add(m); + } else { + errorsBuilder_.addMessage(m); + } + break; + } // case -1767146662 + 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.compute.v1.Error) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -925,7 +890,18 @@ public Error parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Error(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ErrorDetails.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ErrorDetails.java index 7e240178139a..e5170d7f815b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ErrorDetails.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ErrorDetails.java @@ -49,93 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ErrorDetails( - 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 25590282: - { - com.google.cloud.compute.v1.Help.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = help_.toBuilder(); - } - help_ = - input.readMessage(com.google.cloud.compute.v1.Help.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(help_); - help_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 202015786: - { - com.google.cloud.compute.v1.ErrorInfo.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = errorInfo_.toBuilder(); - } - errorInfo_ = - input.readMessage( - com.google.cloud.compute.v1.ErrorInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorInfo_); - errorInfo_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1058670054: - { - com.google.cloud.compute.v1.LocalizedMessage.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = localizedMessage_.toBuilder(); - } - localizedMessage_ = - input.readMessage( - com.google.cloud.compute.v1.LocalizedMessage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(localizedMessage_); - localizedMessage_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ErrorDetails_descriptor; @@ -263,7 +176,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(404537155, getLocalizedMessage()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -283,7 +196,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 404537155, getLocalizedMessage()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +223,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLocalizedMessage()) { if (!getLocalizedMessage().equals(other.getLocalizedMessage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -333,7 +246,7 @@ public int hashCode() { hash = (37 * hash) + LOCALIZED_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getLocalizedMessage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -611,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ErrorDetails other) { if (other.hasLocalizedMessage()) { mergeLocalizedMessage(other.getLocalizedMessage()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -626,17 +539,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ErrorDetails 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 25590282: + { + input.readMessage(getHelpFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 25590282 + case 202015786: + { + input.readMessage(getErrorInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 202015786 + case -1058670054: + { + input.readMessage( + getLocalizedMessageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -1058670054 + 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.compute.v1.ErrorDetails) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1047,7 +993,18 @@ public ErrorDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ErrorDetails(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ErrorInfo.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ErrorInfo.java index f25cbf5d953b..7ae8573921d4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ErrorInfo.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ErrorInfo.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ErrorInfo( - 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 68114722: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - metadatas_ = - com.google.protobuf.MapField.newMapField( - MetadatasDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry metadatas__ = - input.readMessage( - MetadatasDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - metadatas_.getMutableMap().put(metadatas__.getKey(), metadatas__.getValue()); - break; - } - case 1110217250: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - reason_ = s; - break; - } - case -2019645918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - domain_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ErrorInfo_descriptor; @@ -398,7 +329,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 284415172, domain_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +354,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(284415172, domain_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +378,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReason()) { if (!getReason().equals(other.getReason())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -470,7 +401,7 @@ public int hashCode() { hash = (37 * hash) + REASON_FIELD_NUMBER; hash = (53 * hash) + getReason().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -618,17 +549,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.ErrorInfo.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 @@ -739,7 +663,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ErrorInfo other) { reason_ = other.reason_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -754,17 +678,54 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ErrorInfo 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 68114722: + { + com.google.protobuf.MapEntry metadatas__ = + input.readMessage( + MetadatasDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMetadatas() + .getMutableMap() + .put(metadatas__.getKey(), metadatas__.getValue()); + break; + } // case 68114722 + case 1110217250: + { + reason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1110217250 + case -2019645918: + { + domain_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -2019645918 + 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.compute.v1.ErrorInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1202,7 +1163,18 @@ public ErrorInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ErrorInfo(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Errors.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Errors.java index 3853b0aa6464..0662054a7ad0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Errors.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Errors.java @@ -54,81 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Errors( - 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 24473450: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - code_ = s; - break; - } - case -2097735590: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - errorDetails_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - errorDetails_.add( - input.readMessage( - com.google.cloud.compute.v1.ErrorDetails.parser(), extensionRegistry)); - break; - } - case -1971520086: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - location_ = s; - break; - } - case -950534086: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - message_ = 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_ & 0x00000002) != 0)) { - errorDetails_ = java.util.Collections.unmodifiableList(errorDetails_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Errors_descriptor; @@ -432,7 +357,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 418054151, message_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -454,7 +379,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(418054151, message_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -482,7 +407,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMessage()) { if (!getMessage().equals(other.getMessage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -509,7 +434,7 @@ public int hashCode() { hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -636,19 +561,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Errors.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) { - getErrorDetailsFieldBuilder(); - } } @java.lang.Override @@ -658,10 +574,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (errorDetailsBuilder_ == null) { errorDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + errorDetails_ = null; errorDetailsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); location_ = ""; bitField0_ = (bitField0_ & ~0x00000004); message_ = ""; @@ -807,7 +724,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Errors other) { message_ = other.message_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -822,17 +739,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Errors 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 24473450: + { + code_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24473450 + case -2097735590: + { + com.google.cloud.compute.v1.ErrorDetails m = + input.readMessage( + com.google.cloud.compute.v1.ErrorDetails.parser(), extensionRegistry); + if (errorDetailsBuilder_ == null) { + ensureErrorDetailsIsMutable(); + errorDetails_.add(m); + } else { + errorDetailsBuilder_.addMessage(m); + } + break; + } // case -2097735590 + case -1971520086: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1971520086 + case -950534086: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -950534086 + 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.compute.v1.Errors) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1581,7 +1543,18 @@ public Errors parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Errors(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExchangedPeeringRoute.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExchangedPeeringRoute.java index e3119e989a2c..9e9d828d3508 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExchangedPeeringRoute.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExchangedPeeringRoute.java @@ -53,79 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExchangedPeeringRoute( - 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 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - type_ = s; - break; - } - case 916019232: - { - bitField0_ |= 0x00000002; - imported_ = input.readBool(); - break; - } - case 980616114: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextHopRegion_ = s; - break; - } - case -1244345598: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - destRange_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000008; - priority_ = input.readUInt32(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ExchangedPeeringRoute_descriptor; @@ -613,7 +540,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeUInt32(445151652, priority_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -637,7 +564,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(445151652, priority_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -673,7 +600,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -704,7 +631,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -832,17 +759,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ExchangedPeeringRoute.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 @@ -979,7 +899,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ExchangedPeeringRoute other type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -994,18 +914,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ExchangedPeeringRoute 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 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 28604882 + case 916019232: + { + imported_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 916019232 + case 980616114: + { + nextHopRegion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 980616114 + case -1244345598: + { + destRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1244345598 + case -733754080: + { + priority_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case -733754080 + 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.compute.v1.ExchangedPeeringRoute) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1543,7 +1506,18 @@ public ExchangedPeeringRoute parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExchangedPeeringRoute(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExchangedPeeringRoutesList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExchangedPeeringRoutesList.java index 4eb3dc446174..b43698635274 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExchangedPeeringRoutesList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExchangedPeeringRoutesList.java @@ -55,106 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExchangedPeeringRoutesList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.ExchangedPeeringRoute.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ExchangedPeeringRoutesList_descriptor; @@ -574,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -601,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -638,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -673,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -825,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1004,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ExchangedPeeringRoutesList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1019,18 +920,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ExchangedPeeringRoutesList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.ExchangedPeeringRoute m = + input.readMessage( + com.google.cloud.compute.v1.ExchangedPeeringRoute.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.ExchangedPeeringRoutesList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2085,7 +2043,18 @@ public ExchangedPeeringRoutesList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExchangedPeeringRoutesList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExpandIpCidrRangeSubnetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExpandIpCidrRangeSubnetworkRequest.java index 403e18db008e..33ce2aa773e4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExpandIpCidrRangeSubnetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExpandIpCidrRangeSubnetworkRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExpandIpCidrRangeSubnetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - - subnetwork_ = s; - break; - } - case -478854414: - { - com.google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequest.Builder subBuilder = - null; - if (subnetworksExpandIpCidrRangeRequestResource_ != null) { - subBuilder = subnetworksExpandIpCidrRangeRequestResource_.toBuilder(); - } - subnetworksExpandIpCidrRangeRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(subnetworksExpandIpCidrRangeRequestResource_); - subnetworksExpandIpCidrRangeRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ExpandIpCidrRangeSubnetworkRequest_descriptor; @@ -464,7 +378,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (subnetworksExpandIpCidrRangeRequestResource_ != null) { output.writeMessage(477014110, getSubnetworksExpandIpCidrRangeRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -490,7 +404,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 477014110, getSubnetworksExpandIpCidrRangeRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -519,7 +433,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSubnetworksExpandIpCidrRangeRequestResource() .equals(other.getSubnetworksExpandIpCidrRangeRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -544,7 +458,7 @@ public int hashCode() { hash = (37 * hash) + SUBNETWORKS_EXPAND_IP_CIDR_RANGE_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSubnetworksExpandIpCidrRangeRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -674,17 +588,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ExpandIpCidrRangeSubnetworkRequest.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 @@ -821,7 +728,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ExpandIpCidrRangeSubnetwork mergeSubnetworksExpandIpCidrRangeRequestResource( other.getSubnetworksExpandIpCidrRangeRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -836,19 +743,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ExpandIpCidrRangeSubnetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + + break; + } // case -1832345742 + case -478854414: + { + input.readMessage( + getSubnetworksExpandIpCidrRangeRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -478854414 + 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.compute.v1.ExpandIpCidrRangeSubnetworkRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1560,7 +1511,18 @@ public ExpandIpCidrRangeSubnetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExpandIpCidrRangeSubnetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Expr.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Expr.java index 92b0ab6400a3..c38331f65920 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Expr.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Expr.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Expr( - 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 882971330: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - title_ = s; - break; - } - case -1971520086: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - location_ = s; - break; - } - case -1478716222: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - expression_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - description_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Expr_descriptor; @@ -420,7 +352,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -441,7 +373,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -472,7 +404,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTitle()) { if (!getTitle().equals(other.getTitle())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -499,7 +431,7 @@ public int hashCode() { hash = (37 * hash) + TITLE_FIELD_NUMBER; hash = (53 * hash) + getTitle().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -627,17 +559,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Expr.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 @@ -765,7 +690,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Expr other) { title_ = other.title_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -780,17 +705,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Expr 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 882971330: + { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 882971330 + case -1971520086: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1971520086 + case -1478716222: + { + expression_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1478716222 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -911466526 + 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.compute.v1.Expr) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1308,7 +1271,18 @@ public Expr parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Expr(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGateway.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGateway.java index 703dfa8868ac..9e8c80813576 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGateway.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGateway.java @@ -59,131 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExternalVpnGateway( - 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 26840: - { - bitField0_ |= 0x00000004; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 96588498: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - interfaces_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.ExternalVpnGatewayInterface>(); - mutable_bitField0_ |= 0x00000008; - } - interfaces_.add( - input.readMessage( - com.google.cloud.compute.v1.ExternalVpnGatewayInterface.parser(), - extensionRegistry)); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - labelFingerprint_ = s; - break; - } - case -2123417374: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - redundancyType_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - selfLink_ = s; - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000040; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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_ & 0x00000008) != 0)) { - interfaces_ = java.util.Collections.unmodifiableList(interfaces_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ExternalVpnGateway_descriptor; @@ -1091,7 +966,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1140,7 +1015,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1190,7 +1065,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSelfLink()) { if (!getSelfLink().equals(other.getSelfLink())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1241,7 +1116,7 @@ public int hashCode() { hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; hash = (53 * hash) + getSelfLink().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1390,19 +1265,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.ExternalVpnGateway.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) { - getInterfacesFieldBuilder(); - } } @java.lang.Override @@ -1416,10 +1282,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (interfacesBuilder_ == null) { interfaces_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + interfaces_ = null; interfacesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000010); labelFingerprint_ = ""; @@ -1619,7 +1486,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ExternalVpnGateway other) { selfLink_ = other.selfLink_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1634,17 +1501,104 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ExternalVpnGateway 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 96588498: + { + com.google.cloud.compute.v1.ExternalVpnGatewayInterface m = + input.readMessage( + com.google.cloud.compute.v1.ExternalVpnGatewayInterface.parser(), + extensionRegistry); + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(m); + } else { + interfacesBuilder_.addMessage(m); + } + break; + } // case 96588498 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1424998602 + case -2123417374: + { + redundancyType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -2123417374 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -645248918 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.ExternalVpnGateway) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3134,7 +3088,18 @@ public ExternalVpnGateway parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExternalVpnGateway(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGatewayInterface.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGatewayInterface.java index daee3c8e3952..8bd3af6e363d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGatewayInterface.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGatewayInterface.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExternalVpnGatewayInterface( - 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 26840: - { - bitField0_ |= 0x00000001; - id_ = input.readUInt32(); - break; - } - case -1044789534: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - ipAddress_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ExternalVpnGatewayInterface_descriptor; @@ -238,7 +185,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 406272220, ipAddress_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -253,7 +200,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(406272220, ipAddress_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -277,7 +224,7 @@ public boolean equals(final java.lang.Object obj) { if (hasIpAddress()) { if (!getIpAddress().equals(other.getIpAddress())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -296,7 +243,7 @@ public int hashCode() { hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getIpAddress().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -426,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ExternalVpnGatewayInterface.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 @@ -542,7 +482,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ExternalVpnGatewayInterface ipAddress_ = other.ipAddress_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -557,18 +497,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ExternalVpnGatewayInterface 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 26840: + { + id_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 26840 + case -1044789534: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1044789534 + 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.compute.v1.ExternalVpnGatewayInterface) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -793,7 +758,18 @@ public ExternalVpnGatewayInterface parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExternalVpnGatewayInterface(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGatewayList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGatewayList.java index 03177b73a2a4..31b45007f8cb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGatewayList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ExternalVpnGatewayList.java @@ -57,111 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExternalVpnGatewayList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - id_ = s; - break; - } - case 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.ExternalVpnGateway.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - selfLink_ = 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_ & 0x00000004) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ExternalVpnGatewayList_descriptor; @@ -630,7 +525,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -660,7 +555,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -701,7 +596,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -740,7 +635,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -894,10 +789,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000008); nextPageToken_ = ""; @@ -1082,7 +978,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ExternalVpnGatewayList othe if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1097,18 +993,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ExternalVpnGatewayList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26842 + case 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24987818 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.ExternalVpnGateway m = + input.readMessage( + com.google.cloud.compute.v1.ExternalVpnGateway.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -645248918 + 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.compute.v1.ExternalVpnGatewayList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2246,7 +2204,18 @@ public ExternalVpnGatewayList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExternalVpnGatewayList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FileContentBuffer.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FileContentBuffer.java index df19617bd339..478fc0c8c276 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FileContentBuffer.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FileContentBuffer.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FileContentBuffer( - 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 -1940193046: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - fileType_ = s; - break; - } - case -977689654: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - content_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_FileContentBuffer_descriptor; @@ -404,7 +350,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 414659705, content_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -419,7 +365,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(414659705, content_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -443,7 +389,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFileType()) { if (!getFileType().equals(other.getFileType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -462,7 +408,7 @@ public int hashCode() { hash = (37 * hash) + FILE_TYPE_FIELD_NUMBER; hash = (53 * hash) + getFileType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -590,17 +536,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.FileContentBuffer.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 @@ -707,7 +646,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.FileContentBuffer other) { fileType_ = other.fileType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -722,17 +661,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FileContentBuffer 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 -1940193046: + { + fileType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1940193046 + case -977689654: + { + content_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -977689654 + 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.compute.v1.FileContentBuffer) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1016,7 +981,18 @@ public FileContentBuffer parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FileContentBuffer(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Firewall.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Firewall.java index 7456059913eb..2fa593d2a27b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Firewall.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Firewall.java @@ -66,235 +66,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Firewall( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 503214138: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00040000) != 0)) { - targetTags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00040000; - } - targetTags_.add(s); - break; - } - case 840806050: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00008000) != 0)) { - sourceServiceAccounts_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00008000; - } - sourceServiceAccounts_.add(s); - break; - } - case 889207802: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - direction_ = s; - break; - } - case 1299189058: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - allowed_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - allowed_.add( - input.readMessage( - com.google.cloud.compute.v1.Allowed.parser(), extensionRegistry)); - break; - } - case 1600781266: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00004000) != 0)) { - sourceRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00004000; - } - sourceRanges_.add(s); - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - network_ = s; - break; - } - case -2127440928: - { - bitField0_ |= 0x00000008; - disabled_ = input.readBool(); - break; - } - case -2093228838: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - denied_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - denied_.add( - input.readMessage( - com.google.cloud.compute.v1.Denied.parser(), extensionRegistry)); - break; - } - case -1849368262: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - destinationRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - destinationRanges_.add(s); - break; - } - case -1484569366: - { - com.google.cloud.compute.v1.FirewallLogConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = logConfig_.toBuilder(); - } - logConfig_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallLogConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(logConfig_); - logConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000200; - priority_ = input.readInt32(); - break; - } - case -677188118: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00010000) != 0)) { - sourceTags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00010000; - } - sourceTags_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - selfLink_ = s; - break; - } - case -633849614: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00020000) != 0)) { - targetServiceAccounts_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00020000; - } - targetServiceAccounts_.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_ & 0x00040000) != 0)) { - targetTags_ = targetTags_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00008000) != 0)) { - sourceServiceAccounts_ = sourceServiceAccounts_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - allowed_ = java.util.Collections.unmodifiableList(allowed_); - } - if (((mutable_bitField0_ & 0x00004000) != 0)) { - sourceRanges_ = sourceRanges_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - denied_ = java.util.Collections.unmodifiableList(denied_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - destinationRanges_ = destinationRanges_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00010000) != 0)) { - sourceTags_ = sourceTags_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00020000) != 0)) { - targetServiceAccounts_ = targetServiceAccounts_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Firewall_descriptor; @@ -1647,7 +1418,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 457639710, targetServiceAccounts_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1744,7 +1515,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getTargetServiceAccountsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1811,7 +1582,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceTagsList().equals(other.getSourceTagsList())) return false; if (!getTargetServiceAccountsList().equals(other.getTargetServiceAccountsList())) return false; if (!getTargetTagsList().equals(other.getTargetTagsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1898,7 +1669,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_TAGS_FIELD_NUMBER; hash = (53 * hash) + getTargetTagsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2048,18 +1819,20 @@ public Builder clear() { super.clear(); if (allowedBuilder_ == null) { allowed_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + allowed_ = null; allowedBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); creationTimestamp_ = ""; bitField0_ = (bitField0_ & ~0x00000002); if (deniedBuilder_ == null) { denied_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + denied_ = null; deniedBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); description_ = ""; bitField0_ = (bitField0_ & ~0x00000008); destinationRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -2431,7 +2204,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Firewall other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2446,17 +2219,165 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Firewall 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 503214138: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetTagsIsMutable(); + targetTags_.add(s); + break; + } // case 503214138 + case 840806050: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourceServiceAccountsIsMutable(); + sourceServiceAccounts_.add(s); + break; + } // case 840806050 + case 889207802: + { + direction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 889207802 + case 1299189058: + { + com.google.cloud.compute.v1.Allowed m = + input.readMessage( + com.google.cloud.compute.v1.Allowed.parser(), extensionRegistry); + if (allowedBuilder_ == null) { + ensureAllowedIsMutable(); + allowed_.add(m); + } else { + allowedBuilder_.addMessage(m); + } + break; + } // case 1299189058 + case 1600781266: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourceRangesIsMutable(); + sourceRanges_.add(s); + break; + } // case 1600781266 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1862979954 + case -2127440928: + { + disabled_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case -2127440928 + case -2093228838: + { + com.google.cloud.compute.v1.Denied m = + input.readMessage( + com.google.cloud.compute.v1.Denied.parser(), extensionRegistry); + if (deniedBuilder_ == null) { + ensureDeniedIsMutable(); + denied_.add(m); + } else { + deniedBuilder_.addMessage(m); + } + break; + } // case -2093228838 + case -1849368262: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDestinationRangesIsMutable(); + destinationRanges_.add(s); + break; + } // case -1849368262 + case -1484569366: + { + input.readMessage(getLogConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case -1484569366 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00001000; + break; + } // case -733754080 + case -677188118: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourceTagsIsMutable(); + sourceTags_.add(s); + break; + } // case -677188118 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case -645248918 + case -633849614: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.add(s); + break; + } // case -633849614 + 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.compute.v1.Firewall) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5434,7 +5355,18 @@ public Firewall parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Firewall(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallList.java index 22fe1d7c011e..407f5ba7fe09 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FirewallList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_FirewallList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -823,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.FirewallList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FirewallList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Firewall m = + input.readMessage( + com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.FirewallList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2078,7 +2038,18 @@ public FirewallList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FirewallList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallLogConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallLogConfig.java index 405b78704038..efad2ebee55e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallLogConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallLogConfig.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FirewallLogConfig( - 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 694933882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - metadata_ = s; - break; - } - case -1800852456: - { - bitField0_ |= 0x00000001; - enable_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_FirewallLogConfig_descriptor; @@ -366,7 +313,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(311764355, enable_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -381,7 +328,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(311764355, enable_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -405,7 +352,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMetadata()) { if (!getMetadata().equals(other.getMetadata())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -424,7 +371,7 @@ public int hashCode() { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + getMetadata().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -553,17 +500,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.FirewallLogConfig.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 @@ -668,7 +608,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.FirewallLogConfig other) { metadata_ = other.metadata_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -683,17 +623,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FirewallLogConfig 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 694933882: + { + metadata_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 694933882 + case -1800852456: + { + enable_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1800852456 + 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.compute.v1.FirewallLogConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -924,7 +890,18 @@ public FirewallLogConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FirewallLogConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPoliciesListAssociationsResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPoliciesListAssociationsResponse.java index f5767a8cadcf..285f4be87791 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPoliciesListAssociationsResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPoliciesListAssociationsResponse.java @@ -54,70 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FirewallPoliciesListAssociationsResponse( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - kind_ = s; - break; - } - case -225075054: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - associations_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.FirewallPolicyAssociation>(); - mutable_bitField0_ |= 0x00000001; - } - associations_.add( - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyAssociation.parser(), - extensionRegistry)); - 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)) { - associations_ = java.util.Collections.unmodifiableList(associations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_FirewallPoliciesListAssociationsResponse_descriptor; @@ -294,7 +230,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < associations_.size(); i++) { output.writeMessage(508736530, associations_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -310,7 +246,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(508736530, associations_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -331,7 +267,7 @@ public boolean equals(final java.lang.Object obj) { if (hasKind()) { if (!getKind().equals(other.getKind())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -350,7 +286,7 @@ public int hashCode() { hash = (37 * hash) + KIND_FIELD_NUMBER; hash = (53 * hash) + getKind().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,19 +417,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.FirewallPoliciesListAssociationsResponse.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) { - getAssociationsFieldBuilder(); - } } @java.lang.Override @@ -501,10 +428,11 @@ public Builder clear() { super.clear(); if (associationsBuilder_ == null) { associations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + associations_ = null; associationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -637,7 +565,7 @@ public Builder mergeFrom( kind_ = other.kind_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -652,19 +580,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FirewallPoliciesListAssociationsResponse 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26336418 + case -225075054: + { + com.google.cloud.compute.v1.FirewallPolicyAssociation m = + input.readMessage( + com.google.cloud.compute.v1.FirewallPolicyAssociation.parser(), + extensionRegistry); + if (associationsBuilder_ == null) { + ensureAssociationsIsMutable(); + associations_.add(m); + } else { + associationsBuilder_.addMessage(m); + } + break; + } // case -225075054 + 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.compute.v1.FirewallPoliciesListAssociationsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1202,7 +1162,18 @@ public FirewallPoliciesListAssociationsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FirewallPoliciesListAssociationsResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicy.java index ae5fd5e98151..7bcd1e17a1f5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicy.java @@ -64,166 +64,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FirewallPolicy( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 35790658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - displayName_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 356167698: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - selfLinkWithId_ = s; - break; - } - case 626541906: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - parent_ = s; - break; - } - case 870991802: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - rules_.add( - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry)); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - region_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - fingerprint_ = s; - break; - } - case -1188231000: - { - bitField0_ |= 0x00000200; - ruleTupleCount_ = input.readInt32(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - selfLink_ = s; - break; - } - case -358554766: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - shortName_ = s; - break; - } - case -225075054: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - associations_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.FirewallPolicyAssociation>(); - mutable_bitField0_ |= 0x00000001; - } - associations_.add( - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyAssociation.parser(), - extensionRegistry)); - 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_ & 0x00000800) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - associations_ = java.util.Collections.unmodifiableList(associations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_FirewallPolicy_descriptor; @@ -1214,7 +1054,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < associations_.size(); i++) { output.writeMessage(508736530, associations_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1270,7 +1110,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(508736530, associations_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1340,7 +1180,7 @@ public boolean equals(final java.lang.Object obj) { if (hasShortName()) { if (!getShortName().equals(other.getShortName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1411,7 +1251,7 @@ public int hashCode() { hash = (37 * hash) + SHORT_NAME_FIELD_NUMBER; hash = (53 * hash) + getShortName().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1540,20 +1380,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.FirewallPolicy.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) { - getAssociationsFieldBuilder(); - getRulesFieldBuilder(); - } } @java.lang.Override @@ -1561,10 +1391,11 @@ public Builder clear() { super.clear(); if (associationsBuilder_ == null) { associations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + associations_ = null; associationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); creationTimestamp_ = ""; bitField0_ = (bitField0_ & ~0x00000002); description_ = ""; @@ -1587,10 +1418,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00001000); selfLinkWithId_ = ""; @@ -1861,7 +1693,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.FirewallPolicy other) { shortName_ = other.shortName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1876,17 +1708,136 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FirewallPolicy 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 35790658: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 35790658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 356167698: + { + selfLinkWithId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 356167698 + case 626541906: + { + parent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 626541906 + case 870991802: + { + com.google.cloud.compute.v1.FirewallPolicyRule m = + input.readMessage( + com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 870991802 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1111570338 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1877428002 + case -1188231000: + { + ruleTupleCount_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case -1188231000 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case -645248918 + case -358554766: + { + shortName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -358554766 + case -225075054: + { + com.google.cloud.compute.v1.FirewallPolicyAssociation m = + input.readMessage( + com.google.cloud.compute.v1.FirewallPolicyAssociation.parser(), + extensionRegistry); + if (associationsBuilder_ == null) { + ensureAssociationsIsMutable(); + associations_.add(m); + } else { + associationsBuilder_.addMessage(m); + } + break; + } // case -225075054 + 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.compute.v1.FirewallPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4106,7 +4057,18 @@ public FirewallPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FirewallPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyAssociation.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyAssociation.java index f8e9d2ab8b16..699a9c1ff179 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyAssociation.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyAssociation.java @@ -55,81 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FirewallPolicyAssociation( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - name_ = s; - break; - } - case 35790658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - displayName_ = s; - break; - } - case 1406189930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - attachmentTarget_ = s; - break; - } - case -1437272502: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - firewallPolicyId_ = s; - break; - } - case -358554766: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - shortName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_FirewallPolicyAssociation_descriptor; @@ -495,7 +420,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 492051566, shortName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -521,7 +446,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(492051566, shortName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -557,7 +482,7 @@ public boolean equals(final java.lang.Object obj) { if (hasShortName()) { if (!getShortName().equals(other.getShortName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +513,7 @@ public int hashCode() { hash = (37 * hash) + SHORT_NAME_FIELD_NUMBER; hash = (53 * hash) + getShortName().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +642,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.FirewallPolicyAssociation.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 @@ -868,7 +786,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.FirewallPolicyAssociation o shortName_ = other.shortName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -883,18 +801,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FirewallPolicyAssociation 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26989658 + case 35790658: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 35790658 + case 1406189930: + { + attachmentTarget_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1406189930 + case -1437272502: + { + firewallPolicyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1437272502 + case -358554766: + { + shortName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -358554766 + 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.compute.v1.FirewallPolicyAssociation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1532,7 +1493,18 @@ public FirewallPolicyAssociation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FirewallPolicyAssociation(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyList.java index 22eb7cb94f40..7fa9ce8948e6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyList.java @@ -54,97 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FirewallPolicyList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicy.parser(), extensionRegistry)); - 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_FirewallPolicyList_descriptor; @@ -497,7 +406,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < items_.size(); i++) { output.writeMessage(100526016, items_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -521,7 +430,7 @@ public int getSerializedSize() { for (int i = 0; i < items_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(100526016, items_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -554,7 +463,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -585,7 +494,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -736,10 +645,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -903,7 +813,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.FirewallPolicyList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -918,17 +828,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FirewallPolicyList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.FirewallPolicy m = + input.readMessage( + com.google.cloud.compute.v1.FirewallPolicy.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + 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.compute.v1.FirewallPolicyList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1861,7 +1822,18 @@ public FirewallPolicyList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FirewallPolicyList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRule.java index 6291e2245a55..6c7e5e9542fc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRule.java @@ -59,165 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FirewallPolicyRule( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 442290034: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - ruleName_ = s; - break; - } - case 829345322: - { - com.google.cloud.compute.v1.FirewallPolicyRuleMatcher.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = match_.toBuilder(); - } - match_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRuleMatcher.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(match_); - match_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case 889207802: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - direction_ = s; - break; - } - case 1501295026: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - action_ = s; - break; - } - case -2127440928: - { - bitField0_ |= 0x00000008; - disabled_ = input.readBool(); - break; - } - case -1931795176: - { - bitField0_ |= 0x00000010; - enableLogging_ = input.readBool(); - break; - } - case -1188231000: - { - bitField0_ |= 0x00000200; - ruleTupleCount_ = input.readInt32(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000080; - priority_ = input.readInt32(); - break; - } - case -633849614: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - targetServiceAccounts_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00001000; - } - targetServiceAccounts_.add(s); - break; - } - case -549908070: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - targetSecureTags_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag>(); - mutable_bitField0_ |= 0x00000800; - } - targetSecureTags_.add( - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag.parser(), - extensionRegistry)); - break; - } - case -69122118: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - targetResources_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000400; - } - targetResources_.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_ & 0x00001000) != 0)) { - targetServiceAccounts_ = targetServiceAccounts_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000800) != 0)) { - targetSecureTags_ = java.util.Collections.unmodifiableList(targetSecureTags_); - } - if (((mutable_bitField0_ & 0x00000400) != 0)) { - targetResources_ = targetResources_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_FirewallPolicyRule_descriptor; @@ -1122,7 +963,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 528230647, targetResources_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1182,7 +1023,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getTargetResourcesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1241,7 +1082,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTargetResourcesList().equals(other.getTargetResourcesList())) return false; if (!getTargetSecureTagsList().equals(other.getTargetSecureTagsList())) return false; if (!getTargetServiceAccountsList().equals(other.getTargetServiceAccountsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1304,7 +1145,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_SERVICE_ACCOUNTS_FIELD_NUMBER; hash = (53 * hash) + getTargetServiceAccountsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1480,10 +1321,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (targetSecureTagsBuilder_ == null) { targetSecureTags_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + targetSecureTags_ = null; targetSecureTagsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); targetServiceAccounts_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00001000); return this; @@ -1715,7 +1557,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.FirewallPolicyRule other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1730,17 +1572,119 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FirewallPolicyRule 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26336418 + case 442290034: + { + ruleName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 442290034 + case 829345322: + { + input.readMessage(getMatchFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 829345322 + case 889207802: + { + direction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 889207802 + case 1501295026: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1501295026 + case -2127440928: + { + disabled_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case -2127440928 + case -1931795176: + { + enableLogging_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -1931795176 + case -1188231000: + { + ruleTupleCount_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case -1188231000 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case -733754080 + case -633849614: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetServiceAccountsIsMutable(); + targetServiceAccounts_.add(s); + break; + } // case -633849614 + case -549908070: + { + com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag m = + input.readMessage( + com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag.parser(), + extensionRegistry); + if (targetSecureTagsBuilder_ == null) { + ensureTargetSecureTagsIsMutable(); + targetSecureTags_.add(m); + } else { + targetSecureTagsBuilder_.addMessage(m); + } + break; + } // case -549908070 + case -69122118: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetResourcesIsMutable(); + targetResources_.add(s); + break; + } // case -69122118 + 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.compute.v1.FirewallPolicyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3581,7 +3525,18 @@ public FirewallPolicyRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FirewallPolicyRule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleMatcher.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleMatcher.java index 9d225cdcb651..c40a291cf0a8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleMatcher.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleMatcher.java @@ -55,106 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FirewallPolicyRuleMatcher( - 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 -1596105590: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - destIpRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - destIpRanges_.add(s); - break; - } - case -1306693206: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - layer4Configs_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.FirewallPolicyRuleMatcherLayer4Config>(); - mutable_bitField0_ |= 0x00000002; - } - layer4Configs_.add( - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRuleMatcherLayer4Config.parser(), - extensionRegistry)); - break; - } - case -837942630: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - srcIpRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - srcIpRanges_.add(s); - break; - } - case -224636878: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - srcSecureTags_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag>(); - mutable_bitField0_ |= 0x00000008; - } - srcSecureTags_.add( - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag.parser(), - extensionRegistry)); - 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)) { - destIpRanges_ = destIpRanges_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - layer4Configs_ = java.util.Collections.unmodifiableList(layer4Configs_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - srcIpRanges_ = srcIpRanges_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - srcSecureTags_ = java.util.Collections.unmodifiableList(srcSecureTags_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_FirewallPolicyRuleMatcher_descriptor; @@ -484,7 +384,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < srcSecureTags_.size(); i++) { output.writeMessage(508791302, srcSecureTags_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -519,7 +419,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 508791302, srcSecureTags_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -539,7 +439,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLayer4ConfigsList().equals(other.getLayer4ConfigsList())) return false; if (!getSrcIpRangesList().equals(other.getSrcIpRangesList())) return false; if (!getSrcSecureTagsList().equals(other.getSrcSecureTagsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -566,7 +466,7 @@ public int hashCode() { hash = (37 * hash) + SRC_SECURE_TAGS_FIELD_NUMBER; hash = (53 * hash) + getSrcSecureTagsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -696,20 +596,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.FirewallPolicyRuleMatcher.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) { - getLayer4ConfigsFieldBuilder(); - getSrcSecureTagsFieldBuilder(); - } } @java.lang.Override @@ -719,18 +609,20 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (layer4ConfigsBuilder_ == null) { layer4Configs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + layer4Configs_ = null; layer4ConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); srcIpRanges_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); if (srcSecureTagsBuilder_ == null) { srcSecureTags_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + srcSecureTags_ = null; srcSecureTagsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -911,7 +803,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.FirewallPolicyRuleMatcher o } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -926,18 +818,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FirewallPolicyRuleMatcher 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 -1596105590: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDestIpRangesIsMutable(); + destIpRanges_.add(s); + break; + } // case -1596105590 + case -1306693206: + { + com.google.cloud.compute.v1.FirewallPolicyRuleMatcherLayer4Config m = + input.readMessage( + com.google.cloud.compute.v1.FirewallPolicyRuleMatcherLayer4Config.parser(), + extensionRegistry); + if (layer4ConfigsBuilder_ == null) { + ensureLayer4ConfigsIsMutable(); + layer4Configs_.add(m); + } else { + layer4ConfigsBuilder_.addMessage(m); + } + break; + } // case -1306693206 + case -837942630: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSrcIpRangesIsMutable(); + srcIpRanges_.add(s); + break; + } // case -837942630 + case -224636878: + { + com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag m = + input.readMessage( + com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag.parser(), + extensionRegistry); + if (srcSecureTagsBuilder_ == null) { + ensureSrcSecureTagsIsMutable(); + srcSecureTags_.add(m); + } else { + srcSecureTagsBuilder_.addMessage(m); + } + break; + } // case -224636878 + 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.compute.v1.FirewallPolicyRuleMatcher) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2124,7 +2071,18 @@ public FirewallPolicyRuleMatcher parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FirewallPolicyRuleMatcher(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleMatcherLayer4Config.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleMatcherLayer4Config.java index e16f189473d2..6cb9ca0f7c5f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleMatcherLayer4Config.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleMatcherLayer4Config.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FirewallPolicyRuleMatcherLayer4Config( - 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 854835346: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ports_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ports_.add(s); - break; - } - case -487295614: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - ipProtocol_ = 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_ & 0x00000002) != 0)) { - ports_ = ports_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_FirewallPolicyRuleMatcherLayer4Config_descriptor; @@ -275,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 475958960, ipProtocol_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -295,7 +235,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(475958960, ipProtocol_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -316,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIpProtocol().equals(other.getIpProtocol())) return false; } if (!getPortsList().equals(other.getPortsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -335,7 +275,7 @@ public int hashCode() { hash = (37 * hash) + PORTS_FIELD_NUMBER; hash = (53 * hash) + getPortsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -466,17 +406,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.FirewallPolicyRuleMatcherLayer4Config.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 @@ -593,7 +526,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,19 +541,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FirewallPolicyRuleMatcherLayer4Config 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 854835346: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePortsIsMutable(); + ports_.add(s); + break; + } // case 854835346 + case -487295614: + { + ipProtocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -487295614 + 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.compute.v1.FirewallPolicyRuleMatcherLayer4Config) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -948,7 +906,18 @@ public FirewallPolicyRuleMatcherLayer4Config parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FirewallPolicyRuleMatcherLayer4Config(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleSecureTag.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleSecureTag.java index 62905695c45d..ac95f5c9f04a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleSecureTag.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FirewallPolicyRuleSecureTag.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FirewallPolicyRuleSecureTag( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - state_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_FirewallPolicyRuleSecureTag_descriptor; @@ -400,7 +346,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 109757585, state_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -415,7 +361,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(109757585, state_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -439,7 +385,7 @@ public boolean equals(final java.lang.Object obj) { if (hasState()) { if (!getState().equals(other.getState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -458,7 +404,7 @@ public int hashCode() { hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + getState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -587,17 +533,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag.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 @@ -705,7 +644,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag state_ = other.state_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -720,18 +659,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FirewallPolicyRuleSecureTag 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 878060682 + 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.compute.v1.FirewallPolicyRuleSecureTag) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1015,7 +979,18 @@ public FirewallPolicyRuleSecureTag parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FirewallPolicyRuleSecureTag(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FixedOrPercent.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FixedOrPercent.java index 1eca11ee1bec..7bdef8d7b236 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FixedOrPercent.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/FixedOrPercent.java @@ -50,64 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FixedOrPercent( - 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 779565984: - { - bitField0_ |= 0x00000002; - fixed_ = input.readInt32(); - break; - } - case -1136451032: - { - bitField0_ |= 0x00000004; - percent_ = input.readInt32(); - break; - } - case -518304272: - { - bitField0_ |= 0x00000001; - calculated_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_FixedOrPercent_descriptor; @@ -246,7 +188,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(472082878, calculated_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +206,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(472082878, calculated_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -292,7 +234,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPercent()) { if (getPercent() != other.getPercent()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -315,7 +257,7 @@ public int hashCode() { hash = (37 * hash) + PERCENT_FIELD_NUMBER; hash = (53 * hash) + getPercent(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -444,17 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.FixedOrPercent.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 @@ -566,7 +501,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.FixedOrPercent other) { if (other.hasPercent()) { setPercent(other.getPercent()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -581,17 +516,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.FixedOrPercent 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 779565984: + { + fixed_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 779565984 + case -1136451032: + { + percent_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case -1136451032 + case -518304272: + { + calculated_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -518304272 + 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.compute.v1.FixedOrPercent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -830,7 +797,18 @@ public FixedOrPercent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FixedOrPercent(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRule.java index f1e3ded40d5a..0b47449c6455 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRule.java @@ -75,289 +75,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ForwardingRule( - 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 26840: - { - bitField0_ |= 0x00000100; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - creationTimestamp_ = s; - break; - } - case 343815546: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - iPAddress_ = s; - break; - } - case 516375928: - { - bitField0_ |= 0x00020000; - noAutomateDnsZone_ = input.readBool(); - break; - } - case 854835346: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00200000) != 0)) { - ports_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00200000; - } - ports_.add(s); - break; - } - case 954041312: - { - bitField0_ |= 0x00000400; - isMirroringCollector_ = input.readBool(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00200000; - region_ = s; - break; - } - case 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - labelFingerprint_ = s; - break; - } - case 1473193378: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00100000; - pscConnectionStatus_ = s; - break; - } - case 1542687882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x04000000; - target_ = s; - break; - } - case 1740144634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; - portRange_ = s; - break; - } - case 1788397554: - { - if (!((mutable_bitField0_ & 0x04000000) != 0)) { - serviceDirectoryRegistrations_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.ForwardingRuleServiceDirectoryRegistration>(); - mutable_bitField0_ |= 0x04000000; - } - serviceDirectoryRegistrations_.add( - input.readMessage( - com.google.cloud.compute.v1.ForwardingRuleServiceDirectoryRegistration - .parser(), - extensionRegistry)); - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - network_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - fingerprint_ = s; - break; - } - case -1958308120: - { - bitField0_ |= 0x00080000; - pscConnectionId_ = input.readUInt64(); - break; - } - case -1935290878: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - ipVersion_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - backendService_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x02000000; - subnetwork_ = s; - break; - } - case -1415926102: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x01000000; - serviceName_ = s; - break; - } - case -1383845342: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - loadBalancingScheme_ = s; - break; - } - case -958896302: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00800000; - serviceLabel_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - description_ = s; - break; - } - case -733560928: - { - bitField0_ |= 0x00000004; - allPorts_ = input.readBool(); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00400000; - selfLink_ = s; - break; - } - case -577161382: - { - if (!((mutable_bitField0_ & 0x00008000) != 0)) { - metadataFilters_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00008000; - } - metadataFilters_.add( - input.readMessage( - com.google.cloud.compute.v1.MetadataFilter.parser(), extensionRegistry)); - break; - } - case -390211094: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - iPProtocol_ = s; - break; - } - case -299689904: - { - bitField0_ |= 0x00000008; - allowGlobalAccess_ = input.readBool(); - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00002000) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00002000; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case -155784550: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - networkTier_ = 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_ & 0x00200000) != 0)) { - ports_ = ports_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x04000000) != 0)) { - serviceDirectoryRegistrations_ = - java.util.Collections.unmodifiableList(serviceDirectoryRegistrations_); - } - if (((mutable_bitField0_ & 0x00008000) != 0)) { - metadataFilters_ = java.util.Collections.unmodifiableList(metadataFilters_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ForwardingRule_descriptor; @@ -3213,7 +2930,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00010000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517397843, networkTier_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3336,7 +3053,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00010000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517397843, networkTier_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3465,7 +3182,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTarget()) { if (!getTarget().equals(other.getTarget())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3600,7 +3317,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_FIELD_NUMBER; hash = (53 * hash) + getTarget().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3749,20 +3466,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.ForwardingRule.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) { - getMetadataFiltersFieldBuilder(); - getServiceDirectoryRegistrationsFieldBuilder(); - } } @java.lang.Override @@ -3799,10 +3506,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00004000); if (metadataFiltersBuilder_ == null) { metadataFilters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00008000); } else { + metadataFilters_ = null; metadataFiltersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00008000); name_ = ""; bitField0_ = (bitField0_ & ~0x00010000); network_ = ""; @@ -3825,10 +3533,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x02000000); if (serviceDirectoryRegistrationsBuilder_ == null) { serviceDirectoryRegistrations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x04000000); } else { + serviceDirectoryRegistrations_ = null; serviceDirectoryRegistrationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x04000000); serviceLabel_ = ""; bitField0_ = (bitField0_ & ~0x08000000); serviceName_ = ""; @@ -4239,7 +3948,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ForwardingRule other) { target_ = other.target_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4254,17 +3963,239 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ForwardingRule 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 244202930 + case 343815546: + { + iPAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 343815546 + case 516375928: + { + noAutomateDnsZone_ = input.readBool(); + bitField0_ |= 0x00080000; + break; + } // case 516375928 + case 854835346: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePortsIsMutable(); + ports_.add(s); + break; + } // case 854835346 + case 954041312: + { + isMirroringCollector_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 954041312 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x01000000; + break; + } // case 1111570338 + case 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 1424998602 + case 1473193378: + { + pscConnectionStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case 1473193378 + case 1542687882: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case 1542687882 + case 1740144634: + { + portRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00100000; + break; + } // case 1740144634 + case 1788397554: + { + com.google.cloud.compute.v1.ForwardingRuleServiceDirectoryRegistration m = + input.readMessage( + com.google.cloud.compute.v1.ForwardingRuleServiceDirectoryRegistration + .parser(), + extensionRegistry); + if (serviceDirectoryRegistrationsBuilder_ == null) { + ensureServiceDirectoryRegistrationsIsMutable(); + serviceDirectoryRegistrations_.add(m); + } else { + serviceDirectoryRegistrationsBuilder_.addMessage(m); + } + break; + } // case 1788397554 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 1862979954 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1877428002 + case -1958308120: + { + pscConnectionId_ = input.readUInt64(); + bitField0_ |= 0x00400000; + break; + } // case -1958308120 + case -1935290878: + { + ipVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -1935290878 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -1839398830 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x20000000; + break; + } // case -1832345742 + case -1415926102: + { + serviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x10000000; + break; + } // case -1415926102 + case -1383845342: + { + loadBalancingScheme_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -1383845342 + case -958896302: + { + serviceLabel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x08000000; + break; + } // case -958896302 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -911466526 + case -733560928: + { + allPorts_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case -733560928 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case -645248918 + case -577161382: + { + com.google.cloud.compute.v1.MetadataFilter m = + input.readMessage( + com.google.cloud.compute.v1.MetadataFilter.parser(), extensionRegistry); + if (metadataFiltersBuilder_ == null) { + ensureMetadataFiltersIsMutable(); + metadataFilters_.add(m); + } else { + metadataFiltersBuilder_.addMessage(m); + } + break; + } // case -577161382 + case -390211094: + { + iPProtocol_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -390211094 + case -299689904: + { + allowGlobalAccess_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case -299689904 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + case -155784550: + { + networkTier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case -155784550 + 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.compute.v1.ForwardingRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8316,7 +8247,18 @@ public ForwardingRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ForwardingRule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleAggregatedList.java index f23172ea432e..096c6442d766 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ForwardingRuleAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.ForwardingRulesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ForwardingRuleAggregatedList_descriptor; @@ -709,7 +596,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -754,7 +641,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -792,7 +679,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -831,7 +718,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1160,7 +1047,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ForwardingRuleAggregatedLis if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1175,18 +1062,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ForwardingRuleAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.ForwardingRulesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.ForwardingRuleAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2244,7 +2192,18 @@ public ForwardingRuleAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ForwardingRuleAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleList.java index 7bded0e900f8..1f1900b24345 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ForwardingRuleList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.ForwardingRule.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ForwardingRuleList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ForwardingRuleList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ForwardingRuleList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.ForwardingRule m = + input.readMessage( + com.google.cloud.compute.v1.ForwardingRule.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.ForwardingRuleList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2080,7 +2040,18 @@ public ForwardingRuleList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ForwardingRuleList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleReference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleReference.java index 550194be0dfa..d99086e3c494 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleReference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleReference.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ForwardingRuleReference( - 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 -2135255054: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - forwardingRule_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ForwardingRuleReference_descriptor; @@ -177,7 +130,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 269964030, forwardingRule_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -189,7 +142,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(269964030, forwardingRule_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -209,7 +162,7 @@ public boolean equals(final java.lang.Object obj) { if (hasForwardingRule()) { if (!getForwardingRule().equals(other.getForwardingRule())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -224,7 +177,7 @@ public int hashCode() { hash = (37 * hash) + FORWARDING_RULE_FIELD_NUMBER; hash = (53 * hash) + getForwardingRule().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -352,17 +305,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ForwardingRuleReference.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 @@ -459,7 +405,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ForwardingRuleReference oth forwardingRule_ = other.forwardingRule_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,18 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ForwardingRuleReference 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 -2135255054: + { + forwardingRule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -2135255054 + 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.compute.v1.ForwardingRuleReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -607,7 +572,18 @@ public ForwardingRuleReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ForwardingRuleReference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleServiceDirectoryRegistration.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleServiceDirectoryRegistration.java index e9e8760a0d0f..0c71c680d349 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleServiceDirectoryRegistration.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRuleServiceDirectoryRegistration.java @@ -56,67 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ForwardingRuleServiceDirectoryRegistration( - 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 592243330: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - serviceDirectoryRegion_ = s; - break; - } - case 1427811034: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - namespace_ = s; - break; - } - case -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - service_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ForwardingRuleServiceDirectoryRegistration_descriptor; @@ -348,7 +287,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 373540533, service_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -368,7 +307,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(373540533, service_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -396,7 +335,7 @@ public boolean equals(final java.lang.Object obj) { if (hasServiceDirectoryRegion()) { if (!getServiceDirectoryRegion().equals(other.getServiceDirectoryRegion())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -419,7 +358,7 @@ public int hashCode() { hash = (37 * hash) + SERVICE_DIRECTORY_REGION_FIELD_NUMBER; hash = (53 * hash) + getServiceDirectoryRegion().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -551,17 +490,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ForwardingRuleServiceDirectoryRegistration.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 @@ -686,7 +618,7 @@ public Builder mergeFrom( serviceDirectoryRegion_ = other.serviceDirectoryRegion_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -701,19 +633,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ForwardingRuleServiceDirectoryRegistration 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 592243330: + { + serviceDirectoryRegion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 592243330 + case 1427811034: + { + namespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1427811034 + case -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1306643030 + 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.compute.v1.ForwardingRuleServiceDirectoryRegistration) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1114,7 +1076,19 @@ public ForwardingRuleServiceDirectoryRegistration parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ForwardingRuleServiceDirectoryRegistration(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRulesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRulesScopedList.java index eb766d9ff011..62a89d7219d0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRulesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ForwardingRulesScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ForwardingRulesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1768396374: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - forwardingRules_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - forwardingRules_.add( - input.readMessage( - com.google.cloud.compute.v1.ForwardingRule.parser(), extensionRegistry)); - 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)) { - forwardingRules_ = java.util.Collections.unmodifiableList(forwardingRules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ForwardingRulesScopedList_descriptor; @@ -274,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < forwardingRules_.size(); i++) { output.writeMessage(315821365, forwardingRules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +220,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 315821365, forwardingRules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,10 +410,11 @@ public Builder clear() { super.clear(); if (forwardingRulesBuilder_ == null) { forwardingRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + forwardingRules_ = null; forwardingRulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -618,7 +548,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ForwardingRulesScopedList o if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,18 +563,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ForwardingRulesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1768396374: + { + com.google.cloud.compute.v1.ForwardingRule m = + input.readMessage( + com.google.cloud.compute.v1.ForwardingRule.parser(), extensionRegistry); + if (forwardingRulesBuilder_ == null) { + ensureForwardingRulesIsMutable(); + forwardingRules_.add(m); + } else { + forwardingRulesBuilder_.addMessage(m); + } + break; + } // case -1768396374 + 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.compute.v1.ForwardingRulesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1223,7 +1185,18 @@ public ForwardingRulesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ForwardingRulesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GRPCHealthCheck.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GRPCHealthCheck.java index 146ecaf55c9a..576005aed01c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GRPCHealthCheck.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GRPCHealthCheck.java @@ -53,73 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GRPCHealthCheck( - 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 27575304: - { - bitField0_ |= 0x00000002; - port_ = input.readInt32(); - break; - } - case 332274762: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - portName_ = s; - break; - } - case 412724778: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - portSpecification_ = s; - break; - } - case 1092264626: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - grpcServiceName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GRPCHealthCheck_descriptor; @@ -572,7 +505,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 136533078, grpcServiceName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -594,7 +527,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(136533078, grpcServiceName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -626,7 +559,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPortSpecification()) { if (!getPortSpecification().equals(other.getPortSpecification())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -653,7 +586,7 @@ public int hashCode() { hash = (37 * hash) + PORT_SPECIFICATION_FIELD_NUMBER; hash = (53 * hash) + getPortSpecification().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -781,17 +714,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GRPCHealthCheck.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 @@ -918,7 +844,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GRPCHealthCheck other) { portSpecification_ = other.portSpecification_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -933,17 +859,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GRPCHealthCheck 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 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 27575304 + case 332274762: + { + portName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 332274762 + case 412724778: + { + portSpecification_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 412724778 + case 1092264626: + { + grpcServiceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1092264626 + 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.compute.v1.GRPCHealthCheck) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1414,7 +1378,18 @@ public GRPCHealthCheck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GRPCHealthCheck(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAcceleratorTypeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAcceleratorTypeRequest.java index 864ea0722755..478d9a7e677a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAcceleratorTypeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAcceleratorTypeRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAcceleratorTypeRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1104249970: - { - java.lang.String s = input.readStringRequireUtf8(); - - acceleratorType_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetAcceleratorTypeRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAcceleratorType().equals(other.getAcceleratorType())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetAcceleratorTypeRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetAcceleratorTypeRequest o zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetAcceleratorTypeRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1104249970: + { + acceleratorType_ = input.readStringRequireUtf8(); + + break; + } // case 1104249970 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetAcceleratorTypeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetAcceleratorTypeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAcceleratorTypeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAddressRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAddressRequest.java index 933f7dab518e..11b44bea828c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAddressRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAddressRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAddressRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -591601758: - { - java.lang.String s = input.readStringRequireUtf8(); - - address_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetAddressRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 462920692, address_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(462920692, address_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAddress().equals(other.getAddress())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetAddressRequest.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 @@ -595,7 +528,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetAddressRequest other) { region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,17 +543,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetAddressRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -591601758: + { + address_ = input.readStringRequireUtf8(); + + break; + } // case -591601758 + 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.compute.v1.GetAddressRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -974,7 +939,18 @@ public GetAddressRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAddressRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationFirewallPolicyRequest.java index 4c00125f20ca..8b34341e9655 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationFirewallPolicyRequest.java @@ -55,60 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAssociationFirewallPolicyRequest( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetAssociationFirewallPolicyRequest_descriptor; @@ -258,7 +204,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -273,7 +219,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -294,7 +240,7 @@ public boolean equals(final java.lang.Object obj) { if (hasName()) { if (!getName().equals(other.getName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -311,7 +257,7 @@ public int 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; } @@ -441,17 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetAssociationFirewallPolicyRequest.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 @@ -558,7 +497,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -573,19 +512,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetAssociationFirewallPolicyRequest 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.GetAssociationFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -851,7 +814,18 @@ public GetAssociationFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAssociationFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationNetworkFirewallPolicyRequest.java index e341c9f152ec..98f618f1ab1a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationNetworkFirewallPolicyRequest.java @@ -56,67 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAssociationNetworkFirewallPolicyRequest( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetAssociationNetworkFirewallPolicyRequest_descriptor; @@ -318,7 +257,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +275,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -358,7 +297,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; } if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +316,7 @@ public int hashCode() { } hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetAssociationNetworkFirewallPolicyRequest.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 @@ -636,7 +568,7 @@ public Builder mergeFrom( project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -651,19 +583,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetAssociationNetworkFirewallPolicyRequest 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.GetAssociationNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +998,19 @@ public GetAssociationNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAssociationNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationRegionNetworkFirewallPolicyRequest.java index 0a09051fd91a..320e46a319a2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAssociationRegionNetworkFirewallPolicyRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAssociationRegionNetworkFirewallPolicyRequest( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetAssociationRegionNetworkFirewallPolicyRequest_descriptor; @@ -379,7 +311,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -400,7 +332,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +356,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +377,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -583,17 +515,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest.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 @@ -719,7 +644,7 @@ public Builder mergeFrom( region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -734,20 +659,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.GetAssociationRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1188,19 @@ public GetAssociationRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAssociationRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAutoscalerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAutoscalerRequest.java index de6d073dc650..92dd1edbf5f1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAutoscalerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetAutoscalerRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAutoscalerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -156895558: - { - java.lang.String s = input.readStringRequireUtf8(); - - autoscaler_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetAutoscalerRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(autoscaler_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517258967, autoscaler_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(autoscaler_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517258967, autoscaler_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAutoscaler().equals(other.getAutoscaler())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetAutoscalerRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetAutoscalerRequest other) zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,17 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetAutoscalerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -156895558: + { + autoscaler_ = input.readStringRequireUtf8(); + + break; + } // case -156895558 + 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.compute.v1.GetAutoscalerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -975,7 +940,18 @@ public GetAutoscalerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAutoscalerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetBackendBucketRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetBackendBucketRequest.java index 36b41357ac32..97ac64241442 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetBackendBucketRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetBackendBucketRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetBackendBucketRequest( - 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 733712298: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendBucket_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetBackendBucketRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBackendBucket().equals(other.getBackendBucket())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getBackendBucket().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetBackendBucketRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetBackendBucketRequest oth project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetBackendBucketRequest 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 733712298: + { + backendBucket_ = input.readStringRequireUtf8(); + + break; + } // case 733712298 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetBackendBucketRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetBackendBucketRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetBackendBucketRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetBackendServiceRequest.java index 7556795a9a99..29015d8da1b3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetBackendServiceRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetBackendServiceRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetBackendServiceRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBackendService().equals(other.getBackendService())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getBackendService().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetBackendServiceRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetBackendServiceRequest ot project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetBackendServiceRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + 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.compute.v1.GetBackendServiceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiagnosticsInterconnectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiagnosticsInterconnectRequest.java index 6ceff91c51b0..767ea725982b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiagnosticsInterconnectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiagnosticsInterconnectRequest.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetDiagnosticsInterconnectRequest( - 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 1796809842: - { - java.lang.String s = input.readStringRequireUtf8(); - - interconnect_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetDiagnosticsInterconnectRequest_descriptor; @@ -240,7 +187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -255,7 +202,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -273,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInterconnect().equals(other.getInterconnect())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -288,7 +235,7 @@ public int hashCode() { hash = (53 * hash) + getInterconnect().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -418,17 +365,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetDiagnosticsInterconnectRequest.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 @@ -527,7 +467,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetDiagnosticsInterconnectR project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -542,19 +482,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetDiagnosticsInterconnectRequest 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 1796809842: + { + interconnect_ = input.readStringRequireUtf8(); + + break; + } // case 1796809842 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetDiagnosticsInterconnectRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -803,7 +767,18 @@ public GetDiagnosticsInterconnectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDiagnosticsInterconnectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiskRequest.java index e5229df23333..74b8ef21576f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiskRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetDiskRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDisk().equals(other.getDisk())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetDiskRequest.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 @@ -595,7 +528,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetDiskRequest other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,17 +543,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -974,7 +939,18 @@ public GetDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiskTypeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiskTypeRequest.java index 6b5b7e822272..6b7799a38506 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiskTypeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetDiskTypeRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetDiskTypeRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 744072418: - { - java.lang.String s = input.readStringRequireUtf8(); - - diskType_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetDiskTypeRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDiskType().equals(other.getDiskType())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetDiskTypeRequest.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 @@ -595,7 +528,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetDiskTypeRequest other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,17 +543,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetDiskTypeRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 744072418: + { + diskType_ = input.readStringRequireUtf8(); + + break; + } // case 744072418 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetDiskTypeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -974,7 +939,18 @@ public GetDiskTypeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDiskTypeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsInstanceRequest.java index de460d47d1e1..b0f01e6dd78f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsInstanceRequest.java @@ -57,73 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetEffectiveFirewallsInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1371864254: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkInterface_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetEffectiveFirewallsInstanceRequest_descriptor; @@ -361,7 +294,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkInterface_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 365387880, networkInterface_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -383,7 +316,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(365387880, networkInterface_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -403,7 +336,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNetworkInterface().equals(other.getNetworkInterface())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -422,7 +355,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().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.compute.v1.GetEffectiveFirewallsInstanceRequest.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 @@ -676,7 +602,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -691,19 +617,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetEffectiveFirewallsInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1371864254: + { + networkInterface_ = input.readStringRequireUtf8(); + + break; + } // case -1371864254 + 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.compute.v1.GetEffectiveFirewallsInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1165,7 +1127,18 @@ public GetEffectiveFirewallsInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetEffectiveFirewallsInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsNetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsNetworkRequest.java index d617f7b35363..761b58d178c4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsNetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsNetworkRequest.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetEffectiveFirewallsNetworkRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetEffectiveFirewallsNetworkRequest_descriptor; @@ -241,7 +188,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -256,7 +203,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -274,7 +221,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNetwork().equals(other.getNetwork())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -289,7 +236,7 @@ public int hashCode() { hash = (53 * hash) + getNetwork().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -419,17 +366,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetEffectiveFirewallsNetworkRequest.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 @@ -529,7 +469,7 @@ public Builder mergeFrom( project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -544,19 +484,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetEffectiveFirewallsNetworkRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 1862979954 + 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.compute.v1.GetEffectiveFirewallsNetworkRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -806,7 +770,18 @@ public GetEffectiveFirewallsNetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetEffectiveFirewallsNetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.java index 992eb8551c49..691cac27addd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.java @@ -57,66 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest_descriptor; @@ -304,7 +244,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -322,7 +262,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -343,7 +283,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNetwork().equals(other.getNetwork())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -360,7 +300,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -501,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest.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 @@ -627,7 +560,7 @@ public Builder mergeFrom( region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -642,20 +575,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest - 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 1862979954 + 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.compute.v1.GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1016,8 +978,19 @@ public GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetEffectiveFirewallsRegionNetworkFirewallPolicyRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetExternalVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetExternalVpnGatewayRequest.java index 3ed1f29b1ed1..ce80fb115c81 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetExternalVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetExternalVpnGatewayRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetExternalVpnGatewayRequest( - 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 879189034: - { - java.lang.String s = input.readStringRequireUtf8(); - - externalVpnGateway_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetExternalVpnGatewayRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -255,7 +202,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -273,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (!getExternalVpnGateway().equals(other.getExternalVpnGateway())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -288,7 +235,7 @@ public int hashCode() { hash = (53 * hash) + getExternalVpnGateway().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -418,17 +365,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetExternalVpnGatewayRequest.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 @@ -525,7 +465,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetExternalVpnGatewayReques project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -540,18 +480,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetExternalVpnGatewayRequest 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 879189034: + { + externalVpnGateway_ = input.readStringRequireUtf8(); + + break; + } // case 879189034 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetExternalVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -804,7 +769,18 @@ public GetExternalVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetExternalVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFirewallPolicyRequest.java index a836eb4a97fd..97abcb87a1fa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFirewallPolicyRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetFirewallPolicyRequest( - 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 -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetFirewallPolicyRequest_descriptor; @@ -179,7 +133,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -191,7 +145,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -208,7 +162,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.GetFirewallPolicyRequest) obj; if (!getFirewallPolicy().equals(other.getFirewallPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -221,7 +175,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FIREWALL_POLICY_FIELD_NUMBER; hash = (53 * hash) + getFirewallPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -350,17 +304,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetFirewallPolicyRequest.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 @@ -450,7 +397,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetFirewallPolicyRequest ot firewallPolicy_ = other.firewallPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -465,18 +412,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetFirewallPolicyRequest 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 -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.GetFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -618,7 +584,18 @@ public GetFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFirewallRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFirewallRequest.java index ccd4ff9dac8d..0cb41accd369 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFirewallRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFirewallRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetFirewallRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -206837758: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewall_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetFirewallRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewall_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 511016192, firewall_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewall_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(511016192, firewall_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFirewall().equals(other.getFirewall())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getFirewall().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetFirewallRequest.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 @@ -522,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetFirewallRequest other) { project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -537,17 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetFirewallRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -206837758: + { + firewall_ = input.readStringRequireUtf8(); + + break; + } // case -206837758 + 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.compute.v1.GetFirewallRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -795,7 +761,18 @@ public GetFirewallRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFirewallRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetForwardingRuleRequest.java index 1ba010b0464e..67bf49eec36b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetForwardingRuleRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetForwardingRuleRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2135255054: - { - java.lang.String s = input.readStringRequireUtf8(); - - forwardingRule_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetForwardingRuleRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 269964030, forwardingRule_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(269964030, forwardingRule_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getForwardingRule().equals(other.getForwardingRule())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetForwardingRuleRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetForwardingRuleRequest ot region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetForwardingRuleRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2135255054: + { + forwardingRule_ = input.readStringRequireUtf8(); + + break; + } // case -2135255054 + 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.compute.v1.GetForwardingRuleRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -976,7 +940,18 @@ public GetForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFromFamilyImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFromFamilyImageRequest.java index 26b295bab6be..b01438f76b8b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFromFamilyImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetFromFamilyImageRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetFromFamilyImageRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1664951518: - { - java.lang.String s = input.readStringRequireUtf8(); - - family_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetFromFamilyImageRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(family_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 328751972, family_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(family_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(328751972, family_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFamily().equals(other.getFamily())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getFamily().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -417,17 +364,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetFromFamilyImageRequest.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 @@ -524,7 +464,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetFromFamilyImageRequest o project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -539,18 +479,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetFromFamilyImageRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1664951518: + { + family_ = input.readStringRequireUtf8(); + + break; + } // case -1664951518 + 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.compute.v1.GetFromFamilyImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -798,7 +763,18 @@ public GetFromFamilyImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetFromFamilyImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalAddressRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalAddressRequest.java index 3739f5e0a843..f49263347edf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalAddressRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalAddressRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGlobalAddressRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -591601758: - { - java.lang.String s = input.readStringRequireUtf8(); - - address_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetGlobalAddressRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 462920692, address_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(462920692, address_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAddress().equals(other.getAddress())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getAddress().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetGlobalAddressRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetGlobalAddressRequest oth project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetGlobalAddressRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -591601758: + { + address_ = input.readStringRequireUtf8(); + + break; + } // case -591601758 + 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.compute.v1.GetGlobalAddressRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetGlobalAddressRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGlobalAddressRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalForwardingRuleRequest.java index 41fbb0d09e44..8b470135c2c5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalForwardingRuleRequest.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGlobalForwardingRuleRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2135255054: - { - java.lang.String s = input.readStringRequireUtf8(); - - forwardingRule_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetGlobalForwardingRuleRequest_descriptor; @@ -240,7 +187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 269964030, forwardingRule_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -255,7 +202,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(forwardingRule_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(269964030, forwardingRule_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -273,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (!getForwardingRule().equals(other.getForwardingRule())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -288,7 +235,7 @@ public int hashCode() { hash = (53 * hash) + getForwardingRule().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -418,17 +365,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetGlobalForwardingRuleRequest.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 @@ -525,7 +465,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetGlobalForwardingRuleRequ project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -540,18 +480,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetGlobalForwardingRuleRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2135255054: + { + forwardingRule_ = input.readStringRequireUtf8(); + + break; + } // case -2135255054 + 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.compute.v1.GetGlobalForwardingRuleRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -799,7 +764,18 @@ public GetGlobalForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGlobalForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalNetworkEndpointGroupRequest.java index c738fdcb70ff..cc1834665d55 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalNetworkEndpointGroupRequest.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGlobalNetworkEndpointGroupRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetGlobalNetworkEndpointGroupRequest_descriptor; @@ -243,7 +190,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkEndpointGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 433907078, networkEndpointGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -260,7 +207,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 433907078, networkEndpointGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -278,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNetworkEndpointGroup().equals(other.getNetworkEndpointGroup())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -293,7 +240,7 @@ public int hashCode() { hash = (53 * hash) + getNetworkEndpointGroup().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -423,17 +370,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupRequest.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 @@ -533,7 +473,7 @@ public Builder mergeFrom( project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -548,19 +488,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetGlobalNetworkEndpointGroupRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + 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.compute.v1.GetGlobalNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -815,7 +779,18 @@ public GetGlobalNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGlobalNetworkEndpointGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalOperationRequest.java index d4f29ea57bb2..03d3f8cecaee 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalOperationRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGlobalOperationRequest( - 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 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetGlobalOperationRequest_descriptor; @@ -243,7 +190,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -258,7 +205,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -276,7 +223,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOperation().equals(other.getOperation())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -291,7 +238,7 @@ public int hashCode() { hash = (53 * hash) + getOperation().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -421,17 +368,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetGlobalOperationRequest.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 @@ -528,7 +468,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetGlobalOperationRequest o project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -543,18 +483,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetGlobalOperationRequest 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 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetGlobalOperationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -812,7 +777,18 @@ public GetGlobalOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGlobalOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalOrganizationOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalOrganizationOperationRequest.java index ec2aae8385e8..efacd2f57e32 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalOrganizationOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalOrganizationOperationRequest.java @@ -55,60 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGlobalOrganizationOperationRequest( - 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 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case -617249150: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - parentId_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetGlobalOrganizationOperationRequest_descriptor; @@ -262,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 459714768, parentId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -277,7 +223,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(459714768, parentId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -298,7 +244,7 @@ public boolean equals(final java.lang.Object obj) { if (hasParentId()) { if (!getParentId().equals(other.getParentId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -315,7 +261,7 @@ public int hashCode() { hash = (37 * hash) + PARENT_ID_FIELD_NUMBER; hash = (53 * hash) + getParentId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -447,17 +393,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetGlobalOrganizationOperationRequest.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 @@ -564,7 +503,7 @@ public Builder mergeFrom( parentId_ = other.parentId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -579,19 +518,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetGlobalOrganizationOperationRequest 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 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case -617249150: + { + parentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -617249150 + 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.compute.v1.GetGlobalOrganizationOperationRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -867,7 +830,18 @@ public GetGlobalOrganizationOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGlobalOrganizationOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalPublicDelegatedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalPublicDelegatedPrefixeRequest.java index fc36eb515121..a58569ff0b73 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalPublicDelegatedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGlobalPublicDelegatedPrefixeRequest.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGlobalPublicDelegatedPrefixeRequest( - 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 1633907522: - { - java.lang.String s = input.readStringRequireUtf8(); - - publicDelegatedPrefix_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetGlobalPublicDelegatedPrefixeRequest_descriptor; @@ -243,7 +190,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -260,7 +207,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -278,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getPublicDelegatedPrefix().equals(other.getPublicDelegatedPrefix())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -293,7 +240,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + PUBLIC_DELEGATED_PREFIX_FIELD_NUMBER; hash = (53 * hash) + getPublicDelegatedPrefix().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -425,17 +372,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetGlobalPublicDelegatedPrefixeRequest.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 @@ -537,7 +477,7 @@ public Builder mergeFrom( publicDelegatedPrefix_ = other.publicDelegatedPrefix_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -552,19 +492,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetGlobalPublicDelegatedPrefixeRequest 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 1633907522: + { + publicDelegatedPrefix_ = input.readStringRequireUtf8(); + + break; + } // case 1633907522 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetGlobalPublicDelegatedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -819,7 +783,18 @@ public GetGlobalPublicDelegatedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGlobalPublicDelegatedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGuestAttributesInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGuestAttributesInstanceRequest.java index 67b424c84a7d..82754452db39 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGuestAttributesInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetGuestAttributesInstanceRequest.java @@ -57,81 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetGuestAttributesInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 1314918626: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - variableKey_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1346237982: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - queryPath_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetGuestAttributesInstanceRequest_descriptor; @@ -452,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 368591164, queryPath_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -476,7 +401,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(368591164, queryPath_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -503,7 +428,7 @@ public boolean equals(final java.lang.Object obj) { if (!getVariableKey().equals(other.getVariableKey())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -528,7 +453,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -658,17 +583,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetGuestAttributesInstanceRequest.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 @@ -799,7 +717,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetGuestAttributesInstanceR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -814,19 +732,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetGuestAttributesInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 1314918626: + { + variableKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1314918626 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1346237982: + { + queryPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1346237982 + 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.compute.v1.GetGuestAttributesInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1423,7 +1383,18 @@ public GetGuestAttributesInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetGuestAttributesInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthBackendServiceRequest.java index ed222683fbb5..ba11f31bbe73 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthBackendServiceRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetHealthBackendServiceRequest( - 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 903608986: - { - com.google.cloud.compute.v1.ResourceGroupReference.Builder subBuilder = null; - if (resourceGroupReferenceResource_ != null) { - subBuilder = resourceGroupReferenceResource_.toBuilder(); - } - resourceGroupReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.ResourceGroupReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resourceGroupReferenceResource_); - resourceGroupReferenceResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetHealthBackendServiceRequest_descriptor; @@ -303,7 +233,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -323,7 +253,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -347,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResourceGroupReferenceResource().equals(other.getResourceGroupReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -366,7 +296,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_GROUP_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResourceGroupReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -496,17 +426,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetHealthBackendServiceRequest.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 @@ -617,7 +540,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetHealthBackendServiceRequ if (other.hasResourceGroupReferenceResource()) { mergeResourceGroupReferenceResource(other.getResourceGroupReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -632,18 +555,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetHealthBackendServiceRequest 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 903608986: + { + input.readMessage( + getResourceGroupReferenceResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 903608986 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + 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.compute.v1.GetHealthBackendServiceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1071,7 +1027,18 @@ public GetHealthBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetHealthBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthCheckRequest.java index cda882c13b22..0afaa5f7746d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthCheckRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetHealthCheckRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheck_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetHealthCheckRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 308876645, healthCheck_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(308876645, healthCheck_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getHealthCheck().equals(other.getHealthCheck())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getHealthCheck().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetHealthCheckRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetHealthCheckRequest other project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetHealthCheckRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + + break; + } // case -1823954134 + 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.compute.v1.GetHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthRegionBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthRegionBackendServiceRequest.java index 34d95c99a0d2..14a487e9ca38 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthRegionBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthRegionBackendServiceRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetHealthRegionBackendServiceRequest( - 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 903608986: - { - com.google.cloud.compute.v1.ResourceGroupReference.Builder subBuilder = null; - if (resourceGroupReferenceResource_ != null) { - subBuilder = resourceGroupReferenceResource_.toBuilder(); - } - resourceGroupReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.ResourceGroupReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resourceGroupReferenceResource_); - resourceGroupReferenceResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetHealthRegionBackendServiceRequest_descriptor; @@ -364,7 +287,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -387,7 +310,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -412,7 +335,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResourceGroupReferenceResource().equals(other.getResourceGroupReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -433,7 +356,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_GROUP_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResourceGroupReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -563,17 +486,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetHealthRegionBackendServiceRequest.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 @@ -694,7 +610,7 @@ public Builder mergeFrom( if (other.hasResourceGroupReferenceResource()) { mergeResourceGroupReferenceResource(other.getResourceGroupReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -709,19 +625,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetHealthRegionBackendServiceRequest 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 903608986: + { + input.readMessage( + getResourceGroupReferenceResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 903608986 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + 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.compute.v1.GetHealthRegionBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1257,7 +1211,18 @@ public GetHealthRegionBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetHealthRegionBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthTargetPoolRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthTargetPoolRequest.java index 61073893149a..93d64ac83c11 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthTargetPoolRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetHealthTargetPoolRequest.java @@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetHealthTargetPoolRequest( - 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 502370386: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetPool_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1951558814: - { - com.google.cloud.compute.v1.InstanceReference.Builder subBuilder = null; - if (instanceReferenceResource_ != null) { - subBuilder = instanceReferenceResource_.toBuilder(); - } - instanceReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceReferenceResource_); - instanceReferenceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetHealthTargetPoolRequest_descriptor; @@ -373,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceReferenceResource_ != null) { output.writeMessage(292926060, getInstanceReferenceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -396,7 +320,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 292926060, getInstanceReferenceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -420,7 +344,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getTargetPool().equals(other.getTargetPool())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -441,7 +365,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + TARGET_POOL_FIELD_NUMBER; hash = (53 * hash) + getTargetPool().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -571,17 +495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetHealthTargetPoolRequest.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 @@ -699,7 +616,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetHealthTargetPoolRequest targetPool_ = other.targetPool_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -714,18 +631,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetHealthTargetPoolRequest 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 502370386: + { + targetPool_ = input.readStringRequireUtf8(); + + break; + } // case 502370386 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1951558814: + { + input.readMessage( + getInstanceReferenceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1951558814 + 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.compute.v1.GetHealthTargetPoolRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1287,7 +1242,18 @@ public GetHealthTargetPoolRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetHealthTargetPoolRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyBackendServiceRequest.java index 9dbf0720fc0e..da5e1fa1e41f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyBackendServiceRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyBackendServiceRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyBackendServiceRequest_descriptor; @@ -284,7 +224,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +244,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -328,7 +268,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -347,7 +287,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,17 +417,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyBackendServiceRequest.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 @@ -598,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyBackendServiceR resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,19 +546,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyBackendServiceRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -943,7 +906,18 @@ public GetIamPolicyBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyDiskRequest.java index 7796245a3cf7..d5fea313ee3a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyDiskRequest.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyDiskRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyDiskRequest_descriptor; @@ -343,7 +276,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -366,7 +299,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -391,7 +324,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -412,7 +345,7 @@ public int hashCode() { hash = (53 * hash) + getResource().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -541,17 +474,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyDiskRequest.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 @@ -667,7 +593,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyDiskRequest oth zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -682,18 +608,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyDiskRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1116,7 +1079,18 @@ public GetIamPolicyDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyFirewallPolicyRequest.java index a40d110a0bb3..82cb43399ccb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyFirewallPolicyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyFirewallPolicyRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyFirewallPolicyRequest_descriptor; @@ -224,7 +171,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -241,7 +188,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -264,7 +211,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -281,7 +228,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -411,17 +358,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyFirewallPolicyRequest.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 @@ -525,7 +465,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyFirewallPolicyR resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -540,19 +480,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyFirewallPolicyRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -764,7 +728,18 @@ public GetIamPolicyFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyImageRequest.java index 68d5fbd14e60..55a0b6fbe924 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyImageRequest.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyImageRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyImageRequest_descriptor; @@ -283,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -303,7 +243,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -327,7 +267,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -346,7 +286,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -475,17 +415,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyImageRequest.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 @@ -594,7 +527,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyImageRequest ot resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -609,18 +542,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyImageRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -937,7 +901,18 @@ public GetIamPolicyImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyInstanceRequest.java index 97beaf3610c2..b25e794547c1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyInstanceRequest.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyInstanceRequest_descriptor; @@ -343,7 +276,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -366,7 +299,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -391,7 +324,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -412,7 +345,7 @@ public int hashCode() { hash = (53 * hash) + getResource().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -542,17 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyInstanceRequest.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 @@ -668,7 +594,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyInstanceRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -683,18 +609,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1117,7 +1080,18 @@ public GetIamPolicyInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyInstanceTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyInstanceTemplateRequest.java index 9e81486a6c17..454a4ea3ebd9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyInstanceTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyInstanceTemplateRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyInstanceTemplateRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyInstanceTemplateRequest_descriptor; @@ -285,7 +225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -305,7 +245,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -329,7 +269,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -348,7 +288,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -478,17 +418,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyInstanceTemplateRequest.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 @@ -600,7 +533,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -615,19 +548,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyInstanceTemplateRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyInstanceTemplateRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -946,7 +909,18 @@ public GetIamPolicyInstanceTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyInstanceTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyLicenseRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyLicenseRequest.java index 1d9b03f1b3ac..9ab9234d1916 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyLicenseRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyLicenseRequest.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyLicenseRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyLicenseRequest_descriptor; @@ -283,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -303,7 +243,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -327,7 +267,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -346,7 +286,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -476,17 +416,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyLicenseRequest.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 @@ -595,7 +528,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyLicenseRequest resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,18 +543,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyLicenseRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyLicenseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -938,7 +902,18 @@ public GetIamPolicyLicenseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyLicenseRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyMachineImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyMachineImageRequest.java index 1d6d98f20d5f..fb31769082f0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyMachineImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyMachineImageRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyMachineImageRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyMachineImageRequest_descriptor; @@ -284,7 +224,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +244,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -328,7 +268,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -347,7 +287,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,17 +417,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyMachineImageRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyMachineImageReq resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyMachineImageRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyMachineImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -939,7 +903,18 @@ public GetIamPolicyMachineImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyMachineImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNetworkFirewallPolicyRequest.java index 45d8b074aaa9..150e8aa94f60 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNetworkFirewallPolicyRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyNetworkFirewallPolicyRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyNetworkFirewallPolicyRequest_descriptor; @@ -285,7 +225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -305,7 +245,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -329,7 +269,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -348,7 +288,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -480,17 +420,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetIamPolicyNetworkFirewallPolicyRequest.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 @@ -604,7 +537,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -619,19 +552,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyNetworkFirewallPolicyRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -950,7 +913,18 @@ public GetIamPolicyNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNodeGroupRequest.java index 1e80b1b7eadc..f790225dc9e4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNodeGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNodeGroupRequest.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyNodeGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyNodeGroupRequest_descriptor; @@ -343,7 +276,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -366,7 +299,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -391,7 +324,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -412,7 +345,7 @@ public int hashCode() { hash = (53 * hash) + getResource().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -542,17 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyNodeGroupRequest.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 @@ -668,7 +594,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyNodeGroupReques zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -683,18 +609,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyNodeGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyNodeGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1117,7 +1080,18 @@ public GetIamPolicyNodeGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyNodeGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNodeTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNodeTemplateRequest.java index bd150f775009..60a8e5f4626a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNodeTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyNodeTemplateRequest.java @@ -55,73 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyNodeTemplateRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyNodeTemplateRequest_descriptor; @@ -344,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -367,7 +300,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +325,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +346,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -543,17 +476,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyNodeTemplateRequest.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 @@ -669,7 +595,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyNodeTemplateReq resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -684,18 +610,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyNodeTemplateRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyNodeTemplateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1118,7 +1081,18 @@ public GetIamPolicyNodeTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyNodeTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionBackendServiceRequest.java index 396637ec34ec..e07c7872152c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionBackendServiceRequest.java @@ -56,73 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyRegionBackendServiceRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyRegionBackendServiceRequest_descriptor; @@ -345,7 +278,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -368,7 +301,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -393,7 +326,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +347,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -546,17 +479,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetIamPolicyRegionBackendServiceRequest.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 @@ -677,7 +603,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -692,19 +618,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyRegionBackendServiceRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyRegionBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1129,7 +1091,18 @@ public GetIamPolicyRegionBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyRegionBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionDiskRequest.java index aabe1584e588..b7536f75c255 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionDiskRequest.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyRegionDiskRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyRegionDiskRequest_descriptor; @@ -343,7 +276,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -366,7 +299,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -391,7 +324,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -412,7 +345,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -542,17 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyRegionDiskRequest.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 @@ -668,7 +594,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyRegionDiskReque resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -683,18 +609,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyRegionDiskRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyRegionDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1117,7 +1080,18 @@ public GetIamPolicyRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionNetworkFirewallPolicyRequest.java index 088cedebf465..3d0408e6de7b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyRegionNetworkFirewallPolicyRequest.java @@ -56,73 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyRegionNetworkFirewallPolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyRegionNetworkFirewallPolicyRequest_descriptor; @@ -346,7 +279,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -369,7 +302,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -395,7 +328,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -416,7 +349,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -554,17 +487,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest.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 @@ -688,7 +614,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -703,20 +629,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1143,7 +1104,19 @@ public GetIamPolicyRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyReservationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyReservationRequest.java index d14fb62a8329..3aa81e013a8d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyReservationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyReservationRequest.java @@ -55,73 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyReservationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyReservationRequest_descriptor; @@ -344,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -367,7 +300,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +325,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +346,7 @@ public int hashCode() { hash = (53 * hash) + getResource().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -543,17 +476,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyReservationRequest.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 @@ -669,7 +595,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicyReservationRequ zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -684,18 +610,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyReservationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyReservationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1118,7 +1081,18 @@ public GetIamPolicyReservationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyReservationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyResourcePolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyResourcePolicyRequest.java index 150841b9f124..5e366599c333 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyResourcePolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyResourcePolicyRequest.java @@ -55,73 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyResourcePolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyResourcePolicyRequest_descriptor; @@ -344,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -367,7 +300,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +325,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +346,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -543,17 +476,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyResourcePolicyRequest.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.compute.v1.GetIamPolicyResourcePolicyR resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -686,19 +612,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyResourcePolicyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyResourcePolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1122,7 +1084,18 @@ public GetIamPolicyResourcePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyResourcePolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyServiceAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyServiceAttachmentRequest.java index ffff2c38dec4..d63feae69084 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyServiceAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicyServiceAttachmentRequest.java @@ -56,73 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyServiceAttachmentRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicyServiceAttachmentRequest_descriptor; @@ -345,7 +278,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -368,7 +301,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -393,7 +326,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +347,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -544,17 +477,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicyServiceAttachmentRequest.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 @@ -673,7 +599,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -688,19 +614,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicyServiceAttachmentRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicyServiceAttachmentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1125,7 +1087,18 @@ public GetIamPolicyServiceAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyServiceAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicySnapshotRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicySnapshotRequest.java index 0884ca111f39..370879d138eb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicySnapshotRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicySnapshotRequest.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicySnapshotRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicySnapshotRequest_descriptor; @@ -283,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -303,7 +243,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -327,7 +267,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -346,7 +286,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -476,17 +416,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicySnapshotRequest.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 @@ -595,7 +528,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicySnapshotRequest resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,18 +543,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicySnapshotRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicySnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -938,7 +902,18 @@ public GetIamPolicySnapshotRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicySnapshotRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicySubnetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicySubnetworkRequest.java index 8959fdb3626d..2fc61f1925da 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicySubnetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetIamPolicySubnetworkRequest.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicySubnetworkRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -301207064: - { - bitField0_ |= 0x00000001; - optionsRequestedPolicyVersion_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetIamPolicySubnetworkRequest_descriptor; @@ -343,7 +276,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(499220029, optionsRequestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -366,7 +299,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 499220029, optionsRequestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -391,7 +324,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -412,7 +345,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -542,17 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetIamPolicySubnetworkRequest.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 @@ -668,7 +594,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetIamPolicySubnetworkReque resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -683,18 +609,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetIamPolicySubnetworkRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -301207064: + { + optionsRequestedPolicyVersion_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -301207064 + 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.compute.v1.GetIamPolicySubnetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1117,7 +1080,18 @@ public GetIamPolicySubnetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicySubnetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetImageFamilyViewRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetImageFamilyViewRequest.java index cdbed9f85633..01d031e9639f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetImageFamilyViewRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetImageFamilyViewRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetImageFamilyViewRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1664951518: - { - java.lang.String s = input.readStringRequireUtf8(); - - family_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetImageFamilyViewRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(family_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 328751972, family_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(family_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(328751972, family_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFamily().equals(other.getFamily())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetImageFamilyViewRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetImageFamilyViewRequest o zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetImageFamilyViewRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1664951518: + { + family_ = input.readStringRequireUtf8(); + + break; + } // case -1664951518 + 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.compute.v1.GetImageFamilyViewRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetImageFamilyViewRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetImageFamilyViewRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetImageRequest.java index ba86a20aeb73..337163a86123 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetImageRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetImageRequest( - 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 802507482: - { - java.lang.String s = input.readStringRequireUtf8(); - - image_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetImageRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getImage().equals(other.getImage())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getImage().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetImageRequest.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 @@ -522,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetImageRequest other) { project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -537,17 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetImageRequest 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 802507482: + { + image_ = input.readStringRequireUtf8(); + + break; + } // case 802507482 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -795,7 +761,18 @@ public GetImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceGroupManagerRequest.java index 1f8b9b730c8d..cee33a294de2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceGroupManagerRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetInstanceGroupManagerRequest_descriptor; @@ -302,7 +242,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -322,7 +262,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -341,7 +281,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstanceGroupManager().equals(other.getInstanceGroupManager())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -358,7 +298,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -488,17 +428,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetInstanceGroupManagerRequest.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 @@ -602,7 +535,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetInstanceGroupManagerRequ zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -617,18 +550,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.GetInstanceGroupManagerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -987,7 +951,18 @@ public GetInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceGroupRequest.java index 68e63077348a..1f505c3ae708 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceGroupRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetInstanceGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 648762026: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroup_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetInstanceGroupRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstanceGroup().equals(other.getInstanceGroup())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetInstanceGroupRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetInstanceGroupRequest oth zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetInstanceGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 648762026: + { + instanceGroup_ = input.readStringRequireUtf8(); + + break; + } // case 648762026 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetInstanceGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -976,7 +940,18 @@ public GetInstanceGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInstanceGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceRequest.java index 3c4b951c285f..eb444a46d51d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetInstanceRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstance().equals(other.getInstance())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetInstanceRequest.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 @@ -595,7 +528,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetInstanceRequest other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,17 +543,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -974,7 +939,18 @@ public GetInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceTemplateRequest.java index 8299b12a5f1a..32a8d0761296 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInstanceTemplateRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetInstanceTemplateRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1820981470: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceTemplate_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetInstanceTemplateRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceTemplate_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 309248228, instanceTemplate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -255,7 +202,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(309248228, instanceTemplate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -273,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstanceTemplate().equals(other.getInstanceTemplate())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -288,7 +235,7 @@ public int hashCode() { hash = (53 * hash) + getInstanceTemplate().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -418,17 +365,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetInstanceTemplateRequest.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 @@ -525,7 +465,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetInstanceTemplateRequest project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -540,18 +480,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetInstanceTemplateRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1820981470: + { + instanceTemplate_ = input.readStringRequireUtf8(); + + break; + } // case -1820981470 + 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.compute.v1.GetInstanceTemplateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -799,7 +764,18 @@ public GetInstanceTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInstanceTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectAttachmentRequest.java index 9f2ac593b423..eb38e0cb2930 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectAttachmentRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetInterconnectAttachmentRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1829885022: - { - java.lang.String s = input.readStringRequireUtf8(); - - interconnectAttachment_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetInterconnectAttachmentRequest_descriptor; @@ -303,7 +243,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 308135284, interconnectAttachment_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -323,7 +263,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 308135284, interconnectAttachment_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -342,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInterconnectAttachment().equals(other.getInterconnectAttachment())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -359,7 +299,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -489,17 +429,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetInterconnectAttachmentRequest.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 @@ -605,7 +538,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetInterconnectAttachmentRe region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -620,18 +553,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetInterconnectAttachmentRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1829885022: + { + interconnectAttachment_ = input.readStringRequireUtf8(); + + break; + } // case -1829885022 + 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.compute.v1.GetInterconnectAttachmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -991,7 +955,18 @@ public GetInterconnectAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInterconnectAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectLocationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectLocationRequest.java index 50eaf0e33e9b..6418c249ec7d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectLocationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectLocationRequest.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetInterconnectLocationRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -357080526: - { - java.lang.String s = input.readStringRequireUtf8(); - - interconnectLocation_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetInterconnectLocationRequest_descriptor; @@ -242,7 +189,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(interconnectLocation_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 492235846, interconnectLocation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -259,7 +206,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 492235846, interconnectLocation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -277,7 +224,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInterconnectLocation().equals(other.getInterconnectLocation())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -292,7 +239,7 @@ public int hashCode() { hash = (53 * hash) + getInterconnectLocation().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -422,17 +369,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetInterconnectLocationRequest.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 @@ -529,7 +469,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetInterconnectLocationRequ project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -544,18 +484,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetInterconnectLocationRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -357080526: + { + interconnectLocation_ = input.readStringRequireUtf8(); + + break; + } // case -357080526 + 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.compute.v1.GetInterconnectLocationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -808,7 +773,18 @@ public GetInterconnectLocationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInterconnectLocationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectRequest.java index e8b494674a02..6eeab859d00e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetInterconnectRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetInterconnectRequest( - 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 1796809842: - { - java.lang.String s = input.readStringRequireUtf8(); - - interconnect_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetInterconnectRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInterconnect().equals(other.getInterconnect())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getInterconnect().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetInterconnectRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetInterconnectRequest othe project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetInterconnectRequest 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 1796809842: + { + interconnect_ = input.readStringRequireUtf8(); + + break; + } // case 1796809842 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetInterconnectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetInterconnectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetInterconnectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetLicenseCodeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetLicenseCodeRequest.java index 62b72553a7cf..d689feff2311 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetLicenseCodeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetLicenseCodeRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetLicenseCodeRequest( - 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 11737434: - { - java.lang.String s = input.readStringRequireUtf8(); - - licenseCode_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetLicenseCodeRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLicenseCode().equals(other.getLicenseCode())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getLicenseCode().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetLicenseCodeRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetLicenseCodeRequest other project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetLicenseCodeRequest 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 11737434: + { + licenseCode_ = input.readStringRequireUtf8(); + + break; + } // case 11737434 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetLicenseCodeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetLicenseCodeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetLicenseCodeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetLicenseRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetLicenseRequest.java index 8e27415739bf..b83cda920918 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetLicenseRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetLicenseRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetLicenseRequest( - 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 1334059530: - { - java.lang.String s = input.readStringRequireUtf8(); - - license_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetLicenseRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLicense().equals(other.getLicense())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getLicense().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetLicenseRequest.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 @@ -522,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetLicenseRequest other) { project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -537,17 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetLicenseRequest 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 1334059530: + { + license_ = input.readStringRequireUtf8(); + + break; + } // case 1334059530 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetLicenseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -795,7 +761,18 @@ public GetLicenseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetLicenseRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetMachineImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetMachineImageRequest.java index 097e49a55e06..768e8afa456c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetMachineImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetMachineImageRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetMachineImageRequest( - 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 553515802: - { - java.lang.String s = input.readStringRequireUtf8(); - - machineImage_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetMachineImageRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMachineImage().equals(other.getMachineImage())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getMachineImage().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetMachineImageRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetMachineImageRequest othe project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetMachineImageRequest 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 553515802: + { + machineImage_ = input.readStringRequireUtf8(); + + break; + } // case 553515802 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetMachineImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetMachineImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetMachineImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetMachineTypeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetMachineTypeRequest.java index def3a27d5107..e35633152802 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetMachineTypeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetMachineTypeRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetMachineTypeRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1821688210: - { - java.lang.String s = input.readStringRequireUtf8(); - - machineType_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetMachineTypeRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227711026, machineType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227711026, machineType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMachineType().equals(other.getMachineType())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetMachineTypeRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetMachineTypeRequest other zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetMachineTypeRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1821688210: + { + machineType_ = input.readStringRequireUtf8(); + + break; + } // case 1821688210 + 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.compute.v1.GetMachineTypeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -976,7 +940,18 @@ public GetMachineTypeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetMachineTypeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNatMappingInfoRoutersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNatMappingInfoRoutersRequest.java index e04de410b320..b643739b6241 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNatMappingInfoRoutersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNatMappingInfoRoutersRequest.java @@ -58,100 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetNatMappingInfoRoutersRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1188870730: - { - java.lang.String s = input.readStringRequireUtf8(); - - router_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetNatMappingInfoRoutersRequest_descriptor; @@ -611,7 +517,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -645,7 +551,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -684,7 +590,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getRouter().equals(other.getRouter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -721,7 +627,7 @@ public int hashCode() { } hash = (37 * hash) + ROUTER_FIELD_NUMBER; hash = (53 * hash) + getRouter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -851,17 +757,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest.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 @@ -1019,7 +918,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetNatMappingInfoRoutersReq router_ = other.router_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1034,18 +933,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetNatMappingInfoRoutersRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1188870730: + { + router_ = input.readStringRequireUtf8(); + + break; + } // case 1188870730 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.GetNatMappingInfoRoutersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1895,7 +1855,18 @@ public GetNatMappingInfoRoutersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetNatMappingInfoRoutersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkEdgeSecurityServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkEdgeSecurityServiceRequest.java index 6052f7a4c6d5..b852740957b0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkEdgeSecurityServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkEdgeSecurityServiceRequest.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetNetworkEdgeSecurityServiceRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1256095034: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEdgeSecurityService_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetNetworkEdgeSecurityServiceRequest_descriptor; @@ -306,7 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -326,7 +266,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -346,7 +286,7 @@ public boolean equals(final java.lang.Object obj) { return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -363,7 +303,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -493,17 +433,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetNetworkEdgeSecurityServiceRequest.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 @@ -610,7 +543,7 @@ public Builder mergeFrom( region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -625,19 +558,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetNetworkEdgeSecurityServiceRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1256095034: + { + networkEdgeSecurityService_ = input.readStringRequireUtf8(); + + break; + } // case 1256095034 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetNetworkEdgeSecurityServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1003,7 +966,18 @@ public GetNetworkEdgeSecurityServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetNetworkEdgeSecurityServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkEndpointGroupRequest.java index a41cf0c70df6..aaa8fb4abe44 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkEndpointGroupRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetNetworkEndpointGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetNetworkEndpointGroupRequest_descriptor; @@ -302,7 +242,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkEndpointGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 433907078, networkEndpointGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -322,7 +262,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 433907078, networkEndpointGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -341,7 +281,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNetworkEndpointGroup().equals(other.getNetworkEndpointGroup())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -358,7 +298,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -488,17 +428,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetNetworkEndpointGroupRequest.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 @@ -602,7 +535,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetNetworkEndpointGroupRequ zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -617,18 +550,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetNetworkEndpointGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + 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.compute.v1.GetNetworkEndpointGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -987,7 +951,18 @@ public GetNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetNetworkEndpointGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkFirewallPolicyRequest.java index c536c41ebe7a..e606cc82ec8c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkFirewallPolicyRequest.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetNetworkFirewallPolicyRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetNetworkFirewallPolicyRequest_descriptor; @@ -240,7 +187,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -255,7 +202,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -273,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFirewallPolicy().equals(other.getFirewallPolicy())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -288,7 +235,7 @@ public int hashCode() { hash = (53 * hash) + getFirewallPolicy().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -418,17 +365,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetNetworkFirewallPolicyRequest.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 @@ -525,7 +465,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetNetworkFirewallPolicyReq project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -540,18 +480,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetNetworkFirewallPolicyRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.GetNetworkFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -799,7 +764,18 @@ public GetNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkRequest.java index 732d499004a4..3c1a6ceac59b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNetworkRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetNetworkRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetNetworkRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNetwork().equals(other.getNetwork())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getNetwork().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetNetworkRequest.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 @@ -522,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetNetworkRequest other) { project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -537,17 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetNetworkRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 1862979954 + 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.compute.v1.GetNetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -795,7 +761,18 @@ public GetNetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetNetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeGroupRequest.java index 6c1bc4b12e2a..c0313885d7f8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeGroupRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetNodeGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -535302126: - { - java.lang.String s = input.readStringRequireUtf8(); - - nodeGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetNodeGroupRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 469958146, nodeGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(469958146, nodeGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNodeGroup().equals(other.getNodeGroup())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetNodeGroupRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetNodeGroupRequest other) zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,17 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetNodeGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -535302126: + { + nodeGroup_ = input.readStringRequireUtf8(); + + break; + } // case -535302126 + 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.compute.v1.GetNodeGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -975,7 +940,18 @@ public GetNodeGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetNodeGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeTemplateRequest.java index 23b20c8505f8..e1f45e140095 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeTemplateRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetNodeTemplateRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1709731654: - { - java.lang.String s = input.readStringRequireUtf8(); - - nodeTemplate_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetNodeTemplateRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeTemplate_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 323154455, nodeTemplate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeTemplate_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(323154455, nodeTemplate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNodeTemplate().equals(other.getNodeTemplate())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetNodeTemplateRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetNodeTemplateRequest othe region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetNodeTemplateRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1709731654: + { + nodeTemplate_ = input.readStringRequireUtf8(); + + break; + } // case -1709731654 + 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.compute.v1.GetNodeTemplateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -976,7 +940,18 @@ public GetNodeTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetNodeTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeTypeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeTypeRequest.java index 5832b413eb86..45596b7ab2e8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeTypeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetNodeTypeRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetNodeTypeRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -568304966: - { - java.lang.String s = input.readStringRequireUtf8(); - - nodeType_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetNodeTypeRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 465832791, nodeType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(465832791, nodeType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNodeType().equals(other.getNodeType())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetNodeTypeRequest.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 @@ -595,7 +528,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetNodeTypeRequest other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,17 +543,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetNodeTypeRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -568304966: + { + nodeType_ = input.readStringRequireUtf8(); + + break; + } // case -568304966 + 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.compute.v1.GetNodeTypeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -974,7 +939,18 @@ public GetNodeTypeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetNodeTypeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPacketMirroringRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPacketMirroringRequest.java index b5174f6bea00..c46dd42084c6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPacketMirroringRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPacketMirroringRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPacketMirroringRequest( - 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 178447970: - { - java.lang.String s = input.readStringRequireUtf8(); - - packetMirroring_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetPacketMirroringRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPacketMirroring().equals(other.getPacketMirroring())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetPacketMirroringRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetPacketMirroringRequest o region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetPacketMirroringRequest 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 178447970: + { + packetMirroring_ = input.readStringRequireUtf8(); + + break; + } // case 178447970 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetPacketMirroringRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetPacketMirroringRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPacketMirroringRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetProjectRequest.java index 3aec1cb059f9..8b45c4cee00f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetProjectRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetProjectRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetProjectRequest_descriptor; @@ -179,7 +133,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -191,7 +145,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -208,7 +162,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.GetProjectRequest) obj; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -221,7 +175,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -350,17 +304,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetProjectRequest.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 @@ -449,7 +396,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetProjectRequest other) { project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -464,17 +411,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetProjectRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetProjectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -616,7 +583,18 @@ public GetProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPublicAdvertisedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPublicAdvertisedPrefixeRequest.java index d1dd5ceaa80e..1751fd2490ea 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPublicAdvertisedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPublicAdvertisedPrefixeRequest.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPublicAdvertisedPrefixeRequest( - 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 814996722: - { - java.lang.String s = input.readStringRequireUtf8(); - - publicAdvertisedPrefix_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetPublicAdvertisedPrefixeRequest_descriptor; @@ -243,7 +190,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -260,7 +207,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -278,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getPublicAdvertisedPrefix().equals(other.getPublicAdvertisedPrefix())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -293,7 +240,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + PUBLIC_ADVERTISED_PREFIX_FIELD_NUMBER; hash = (53 * hash) + getPublicAdvertisedPrefix().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -423,17 +370,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetPublicAdvertisedPrefixeRequest.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 @@ -532,7 +472,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetPublicAdvertisedPrefixeR publicAdvertisedPrefix_ = other.publicAdvertisedPrefix_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -547,19 +487,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetPublicAdvertisedPrefixeRequest 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 814996722: + { + publicAdvertisedPrefix_ = input.readStringRequireUtf8(); + + break; + } // case 814996722 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetPublicAdvertisedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -813,7 +777,18 @@ public GetPublicAdvertisedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPublicAdvertisedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPublicDelegatedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPublicDelegatedPrefixeRequest.java index 2a5eb5689a47..878d94536982 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPublicDelegatedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetPublicDelegatedPrefixeRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPublicDelegatedPrefixeRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1633907522: - { - java.lang.String s = input.readStringRequireUtf8(); - - publicDelegatedPrefix_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetPublicDelegatedPrefixeRequest_descriptor; @@ -302,7 +242,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -322,7 +262,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -341,7 +281,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getPublicDelegatedPrefix().equals(other.getPublicDelegatedPrefix())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -358,7 +298,7 @@ public int hashCode() { hash = (53 * hash) + getPublicDelegatedPrefix().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -488,17 +428,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetPublicDelegatedPrefixeRequest.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 @@ -604,7 +537,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetPublicDelegatedPrefixeRe region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -619,18 +552,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetPublicDelegatedPrefixeRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1633907522: + { + publicDelegatedPrefix_ = input.readStringRequireUtf8(); + + break; + } // case 1633907522 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetPublicDelegatedPrefixeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -990,7 +954,18 @@ public GetPublicDelegatedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPublicDelegatedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionAutoscalerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionAutoscalerRequest.java index 5dc8d4f9f2b4..f4de5cea6284 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionAutoscalerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionAutoscalerRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionAutoscalerRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -156895558: - { - java.lang.String s = input.readStringRequireUtf8(); - - autoscaler_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionAutoscalerRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(autoscaler_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517258967, autoscaler_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(autoscaler_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517258967, autoscaler_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAutoscaler().equals(other.getAutoscaler())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionAutoscalerRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionAutoscalerRequest region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionAutoscalerRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -156895558: + { + autoscaler_ = input.readStringRequireUtf8(); + + break; + } // case -156895558 + 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.compute.v1.GetRegionAutoscalerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetRegionAutoscalerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionAutoscalerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionBackendServiceRequest.java index 7eb9f1973c27..085083b8f11c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionBackendServiceRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionBackendServiceRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionBackendServiceRequest_descriptor; @@ -300,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -318,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -337,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBackendService().equals(other.getBackendService())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -484,17 +424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionBackendServiceRequest.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 @@ -598,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionBackendServiceRequ region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,18 +546,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionBackendServiceRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + 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.compute.v1.GetRegionBackendServiceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -978,7 +942,18 @@ public GetRegionBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionCommitmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionCommitmentRequest.java index d7e21548516e..a0cc7e5f7422 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionCommitmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionCommitmentRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionCommitmentRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -437888854: - { - java.lang.String s = input.readStringRequireUtf8(); - - commitment_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionCommitmentRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(commitment_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 482134805, commitment_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(commitment_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(482134805, commitment_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCommitment().equals(other.getCommitment())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionCommitmentRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionCommitmentRequest region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionCommitmentRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -437888854: + { + commitment_ = input.readStringRequireUtf8(); + + break; + } // case -437888854 + 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.compute.v1.GetRegionCommitmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetRegionCommitmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionCommitmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionDiskRequest.java index 1a4ce978d24f..23926a351035 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionDiskRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionDiskRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDisk().equals(other.getDisk())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionDiskRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionDiskRequest other) region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,17 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRegionDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -975,7 +940,18 @@ public GetRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionDiskTypeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionDiskTypeRequest.java index 927b1b6fab87..55b3a58c0d61 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionDiskTypeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionDiskTypeRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionDiskTypeRequest( - 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 744072418: - { - java.lang.String s = input.readStringRequireUtf8(); - - diskType_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionDiskTypeRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDiskType().equals(other.getDiskType())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionDiskTypeRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionDiskTypeRequest ot region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionDiskTypeRequest 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 744072418: + { + diskType_ = input.readStringRequireUtf8(); + + break; + } // case 744072418 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRegionDiskTypeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -976,7 +940,18 @@ public GetRegionDiskTypeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionDiskTypeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionHealthCheckRequest.java index 1aec921f826a..ffa0f2c22198 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionHealthCheckRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionHealthCheckRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheck_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionHealthCheckRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 308876645, healthCheck_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(308876645, healthCheck_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getHealthCheck().equals(other.getHealthCheck())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionHealthCheckRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionHealthCheckRequest region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionHealthCheckRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + + break; + } // case -1823954134 + 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.compute.v1.GetRegionHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetRegionHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionHealthCheckServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionHealthCheckServiceRequest.java index 67fb14ef9b51..b8a29a77cf71 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionHealthCheckServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionHealthCheckServiceRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionHealthCheckServiceRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1027969318: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheckService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionHealthCheckServiceRequest_descriptor; @@ -300,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheckService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 408374747, healthCheckService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -319,7 +259,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(408374747, healthCheckService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -338,7 +278,7 @@ public boolean equals(final java.lang.Object obj) { if (!getHealthCheckService().equals(other.getHealthCheckService())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -355,7 +295,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -485,17 +425,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionHealthCheckServiceRequest.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 @@ -601,7 +534,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionHealthCheckService region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,19 +549,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionHealthCheckServiceRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1027969318: + { + healthCheckService_ = input.readStringRequireUtf8(); + + break; + } // case -1027969318 + 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.compute.v1.GetRegionHealthCheckServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -989,7 +952,18 @@ public GetRegionHealthCheckServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionHealthCheckServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionInstanceGroupManagerRequest.java index ccf5af3df3ce..387a9b3ba803 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionInstanceGroupManagerRequest.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionInstanceGroupManagerRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionInstanceGroupManagerRequest_descriptor; @@ -303,7 +243,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -323,7 +263,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -342,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstanceGroupManager().equals(other.getInstanceGroupManager())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -359,7 +299,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -489,17 +429,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionInstanceGroupManagerRequest.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 @@ -606,7 +539,7 @@ public Builder mergeFrom( region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -621,19 +554,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionInstanceGroupManagerRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.GetRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -994,7 +957,18 @@ public GetRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionInstanceGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionInstanceGroupRequest.java index 8b84e72ec35e..af0a71c80f62 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionInstanceGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionInstanceGroupRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionInstanceGroupRequest( - 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 648762026: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroup_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionInstanceGroupRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstanceGroup().equals(other.getInstanceGroup())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionInstanceGroupRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionInstanceGroupReque region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionInstanceGroupRequest 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 648762026: + { + instanceGroup_ = input.readStringRequireUtf8(); + + break; + } // case 648762026 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRegionInstanceGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetRegionInstanceGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionInstanceGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNetworkEndpointGroupRequest.java index fd9db1c7908d..99a2e400f1ec 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNetworkEndpointGroupRequest.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionNetworkEndpointGroupRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionNetworkEndpointGroupRequest_descriptor; @@ -303,7 +243,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkEndpointGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 433907078, networkEndpointGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -323,7 +263,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 433907078, networkEndpointGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -342,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNetworkEndpointGroup().equals(other.getNetworkEndpointGroup())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -359,7 +299,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -489,17 +429,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionNetworkEndpointGroupRequest.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 @@ -606,7 +539,7 @@ public Builder mergeFrom( region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -621,19 +554,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionNetworkEndpointGroupRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + 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.compute.v1.GetRegionNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -994,7 +957,18 @@ public GetRegionNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionNetworkEndpointGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNetworkFirewallPolicyRequest.java index b1432ba9409c..ce4cd35537d8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNetworkFirewallPolicyRequest.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionNetworkFirewallPolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionNetworkFirewallPolicyRequest_descriptor; @@ -301,7 +241,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -319,7 +259,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -338,7 +278,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFirewallPolicy().equals(other.getFirewallPolicy())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -355,7 +295,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -487,17 +427,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetRegionNetworkFirewallPolicyRequest.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 @@ -604,7 +537,7 @@ public Builder mergeFrom( region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -619,19 +552,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionNetworkFirewallPolicyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.GetRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -987,7 +950,18 @@ public GetRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNotificationEndpointRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNotificationEndpointRequest.java index 1312fcf8e1e9..6c2d09853166 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNotificationEndpointRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionNotificationEndpointRequest.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionNotificationEndpointRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1280511158: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationEndpoint_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionNotificationEndpointRequest_descriptor; @@ -303,7 +243,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationEndpoint_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 376807017, notificationEndpoint_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -323,7 +263,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 376807017, notificationEndpoint_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -342,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNotificationEndpoint().equals(other.getNotificationEndpoint())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -359,7 +299,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -489,17 +429,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionNotificationEndpointRequest.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 @@ -606,7 +539,7 @@ public Builder mergeFrom( region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -621,19 +554,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionNotificationEndpointRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1280511158: + { + notificationEndpoint_ = input.readStringRequireUtf8(); + + break; + } // case -1280511158 + 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.compute.v1.GetRegionNotificationEndpointRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -994,7 +957,18 @@ public GetRegionNotificationEndpointRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionNotificationEndpointRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionOperationRequest.java index 81fcc16f51b3..272ea79eabb3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionOperationRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionOperationRequest( - 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 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionOperationRequest_descriptor; @@ -303,7 +243,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -321,7 +261,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -340,7 +280,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOperation().equals(other.getOperation())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -357,7 +297,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -487,17 +427,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionOperationRequest.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 @@ -601,7 +534,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionOperationRequest o region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,18 +549,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionOperationRequest 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 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRegionOperationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -991,7 +955,18 @@ public GetRegionOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionRequest.java index eb0a176ab744..de3a63d9e40e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionRequest.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 @@ -522,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionRequest other) { region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -537,17 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRegionRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -795,7 +761,18 @@ public GetRegionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSecurityPolicyRequest.java index 010afaad2813..ed9dd4482f4b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSecurityPolicyRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionSecurityPolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - - securityPolicy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionSecurityPolicyRequest_descriptor; @@ -300,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -318,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -337,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getSecurityPolicy().equals(other.getSecurityPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + SECURITY_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -484,17 +424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionSecurityPolicyRequest.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 @@ -598,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionSecurityPolicyRequ securityPolicy_ = other.securityPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,18 +546,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionSecurityPolicyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1368660106 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRegionSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -978,7 +942,18 @@ public GetRegionSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSslCertificateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSslCertificateRequest.java index c07b35a3fafa..8bfbac481cec 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSslCertificateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSslCertificateRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionSslCertificateRequest( - 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 371547938: - { - java.lang.String s = input.readStringRequireUtf8(); - - sslCertificate_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionSslCertificateRequest_descriptor; @@ -300,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -318,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -337,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getSslCertificate().equals(other.getSslCertificate())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + SSL_CERTIFICATE_FIELD_NUMBER; hash = (53 * hash) + getSslCertificate().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -484,17 +424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionSslCertificateRequest.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 @@ -598,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionSslCertificateRequ sslCertificate_ = other.sslCertificate_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,18 +546,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionSslCertificateRequest 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 371547938: + { + sslCertificate_ = input.readStringRequireUtf8(); + + break; + } // case 371547938 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRegionSslCertificateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -978,7 +942,18 @@ public GetRegionSslCertificateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionSslCertificateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSslPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSslPolicyRequest.java index 54ce5885d328..fc598b9306fe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSslPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionSslPolicyRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionSslPolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1933445590: - { - java.lang.String s = input.readStringRequireUtf8(); - - sslPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionSslPolicyRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 295190213, sslPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(295190213, sslPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getSslPolicy().equals(other.getSslPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + SSL_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSslPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionSslPolicyRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionSslPolicyRequest o sslPolicy_ = other.sslPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionSslPolicyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1933445590: + { + sslPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -1933445590 + 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.compute.v1.GetRegionSslPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetRegionSslPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionSslPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetHttpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetHttpProxyRequest.java index c56d0471960a..e2d5fe0a933d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetHttpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetHttpProxyRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionTargetHttpProxyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1654979370: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionTargetHttpProxyRequest_descriptor; @@ -300,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -318,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -337,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getTargetHttpProxy().equals(other.getTargetHttpProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + TARGET_HTTP_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -484,17 +424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionTargetHttpProxyRequest.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 @@ -598,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionTargetHttpProxyReq targetHttpProxy_ = other.targetHttpProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,18 +546,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionTargetHttpProxyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1654979370: + { + targetHttpProxy_ = input.readStringRequireUtf8(); + + break; + } // case 1654979370 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRegionTargetHttpProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -978,7 +942,18 @@ public GetRegionTargetHttpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionTargetHttpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetHttpsProxyRequest.java index f5563385e000..a4260da1c59e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetHttpsProxyRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionTargetHttpsProxyRequest( - 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 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionTargetHttpsProxyRequest_descriptor; @@ -300,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -318,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -337,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getTargetHttpsProxy().equals(other.getTargetHttpsProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + TARGET_HTTPS_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -484,17 +424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionTargetHttpsProxyRequest.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 @@ -600,7 +533,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionTargetHttpsProxyRe targetHttpsProxy_ = other.targetHttpsProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -615,18 +548,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionTargetHttpsProxyRequest 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 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRegionTargetHttpsProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -981,7 +945,18 @@ public GetRegionTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetTcpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetTcpProxyRequest.java index cc7d6ac941de..1babcfc38633 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetTcpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionTargetTcpProxyRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionTargetTcpProxyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -270443758: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetTcpProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionTargetTcpProxyRequest_descriptor; @@ -300,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 503065442, targetTcpProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -318,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(503065442, targetTcpProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -337,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getTargetTcpProxy().equals(other.getTargetTcpProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + TARGET_TCP_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetTcpProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -484,17 +424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionTargetTcpProxyRequest.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 @@ -598,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionTargetTcpProxyRequ targetTcpProxy_ = other.targetTcpProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,18 +546,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionTargetTcpProxyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -270443758: + { + targetTcpProxy_ = input.readStringRequireUtf8(); + + break; + } // case -270443758 + 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.compute.v1.GetRegionTargetTcpProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -978,7 +942,18 @@ public GetRegionTargetTcpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionTargetTcpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionUrlMapRequest.java index 155305609b8b..b5f8dab798a3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRegionUrlMapRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRegionUrlMapRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRegionUrlMapRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getUrlMap().equals(other.getUrlMap())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + URL_MAP_FIELD_NUMBER; hash = (53 * hash) + getUrlMap().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRegionUrlMapRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRegionUrlMapRequest othe urlMap_ = other.urlMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRegionUrlMapRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + 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.compute.v1.GetRegionUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -976,7 +940,18 @@ public GetRegionUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRegionUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetReservationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetReservationRequest.java index f210a2826a75..169535bb24b7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetReservationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetReservationRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetReservationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 380247650: - { - java.lang.String s = input.readStringRequireUtf8(); - - reservation_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetReservationRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getReservation().equals(other.getReservation())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getReservation().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetReservationRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetReservationRequest other zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetReservationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 380247650: + { + reservation_ = input.readStringRequireUtf8(); + + break; + } // case 380247650 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetReservationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -976,7 +940,18 @@ public GetReservationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetReservationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetResourcePolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetResourcePolicyRequest.java index f62899ad1c18..cbb3acb4364d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetResourcePolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetResourcePolicyRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetResourcePolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1273926682: - { - java.lang.String s = input.readStringRequireUtf8(); - - resourcePolicy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetResourcePolicyRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getResourcePolicy().equals(other.getResourcePolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + RESOURCE_POLICY_FIELD_NUMBER; hash = (53 * hash) + getResourcePolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetResourcePolicyRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetResourcePolicyRequest ot resourcePolicy_ = other.resourcePolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetResourcePolicyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1273926682: + { + resourcePolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1273926682 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetResourcePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -976,7 +940,18 @@ public GetResourcePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetResourcePolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouteRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouteRequest.java index 6f6bc94c7b0a..8fc9b50979a1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouteRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouteRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRouteRequest( - 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 869634634: - { - java.lang.String s = input.readStringRequireUtf8(); - - route_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRouteRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRoute().equals(other.getRoute())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ROUTE_FIELD_NUMBER; hash = (53 * hash) + getRoute().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRouteRequest.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 @@ -522,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRouteRequest other) { route_ = other.route_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -537,17 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRouteRequest 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 869634634: + { + route_ = input.readStringRequireUtf8(); + + break; + } // case 869634634 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRouteRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -795,7 +761,18 @@ public GetRouteRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRouteRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouterRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouterRequest.java index 9f38e3f86437..659da18b6365 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouterRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouterRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRouterRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1188870730: - { - java.lang.String s = input.readStringRequireUtf8(); - - router_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRouterRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getRouter().equals(other.getRouter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + ROUTER_FIELD_NUMBER; hash = (53 * hash) + getRouter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRouterRequest.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 @@ -595,7 +528,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRouterRequest other) { router_ = other.router_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,17 +543,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRouterRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1188870730: + { + router_ = input.readStringRequireUtf8(); + + break; + } // case 1188870730 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRouterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -974,7 +939,18 @@ public GetRouterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRouterRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouterStatusRouterRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouterStatusRouterRequest.java index 34892f89b54d..d4a70fdddf8f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouterStatusRouterRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRouterStatusRouterRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRouterStatusRouterRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1188870730: - { - java.lang.String s = input.readStringRequireUtf8(); - - router_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRouterStatusRouterRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getRouter().equals(other.getRouter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + ROUTER_FIELD_NUMBER; hash = (53 * hash) + getRouter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRouterStatusRouterRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRouterStatusRouterReques router_ = other.router_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRouterStatusRouterRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1188870730: + { + router_ = input.readStringRequireUtf8(); + + break; + } // case 1188870730 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetRouterStatusRouterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetRouterStatusRouterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRouterStatusRouterRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleFirewallPolicyRequest.java index f48bb0ca44ed..3bd6b3dd987b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleFirewallPolicyRequest.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRuleFirewallPolicyRequest( - 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 -733754080: - { - bitField0_ |= 0x00000001; - priority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRuleFirewallPolicyRequest_descriptor; @@ -223,7 +170,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -238,7 +185,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -259,7 +206,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPriority()) { if (getPriority() != other.getPriority()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -276,7 +223,7 @@ public int hashCode() { hash = (37 * hash) + PRIORITY_FIELD_NUMBER; hash = (53 * hash) + getPriority(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -406,17 +353,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRuleFirewallPolicyRequest.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.compute.v1.GetRuleFirewallPolicyReques if (other.hasPriority()) { setPriority(other.getPriority()); } - 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.compute.v1.GetRuleFirewallPolicyRequest 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 -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.GetRuleFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -755,7 +720,18 @@ public GetRuleFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRuleFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleNetworkFirewallPolicyRequest.java index e590d8449ec9..ff4b28eb9f60 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleNetworkFirewallPolicyRequest.java @@ -55,66 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRuleNetworkFirewallPolicyRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRuleNetworkFirewallPolicyRequest_descriptor; @@ -285,7 +225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -303,7 +243,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -325,7 +265,7 @@ public boolean equals(final java.lang.Object obj) { if (getPriority() != other.getPriority()) return false; } if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -344,7 +284,7 @@ public int hashCode() { } hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -474,17 +414,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRuleNetworkFirewallPolicyRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom( project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,19 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRuleNetworkFirewallPolicyRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.GetRuleNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -942,7 +905,18 @@ public GetRuleNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRuleNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleRegionNetworkFirewallPolicyRequest.java index a4a18ad42287..4d73a02bf38e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleRegionNetworkFirewallPolicyRequest.java @@ -56,73 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRuleRegionNetworkFirewallPolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRuleRegionNetworkFirewallPolicyRequest_descriptor; @@ -345,7 +278,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -366,7 +299,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -389,7 +322,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -410,7 +343,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -542,17 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest.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 @@ -673,7 +599,7 @@ public Builder mergeFrom( region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -688,19 +614,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.GetRuleRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1126,7 +1088,19 @@ public GetRuleRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRuleRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleSecurityPolicyRequest.java index ecc25379c47c..435249882dbc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetRuleSecurityPolicyRequest.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetRuleSecurityPolicyRequest( - 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 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - - securityPolicy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetRuleSecurityPolicyRequest_descriptor; @@ -283,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(445151652, priority_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -301,7 +241,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(445151652, priority_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -323,7 +263,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getSecurityPolicy().equals(other.getSecurityPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -342,7 +282,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + SECURITY_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -472,17 +412,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetRuleSecurityPolicyRequest.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 @@ -591,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetRuleSecurityPolicyReques securityPolicy_ = other.securityPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,18 +539,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetRuleSecurityPolicyRequest 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 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1368660106 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + 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.compute.v1.GetRuleSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -934,7 +898,18 @@ public GetRuleSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetRuleSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetScreenshotInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetScreenshotInstanceRequest.java index ad73a0ca1f21..ad0590ec5705 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetScreenshotInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetScreenshotInstanceRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetScreenshotInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetScreenshotInstanceRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstance().equals(other.getInstance())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetScreenshotInstanceRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetScreenshotInstanceReques zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetScreenshotInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetScreenshotInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetScreenshotInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetScreenshotInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSecurityPolicyRequest.java index 2d666eb7c289..786732825838 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSecurityPolicyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetSecurityPolicyRequest( - 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 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - - securityPolicy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetSecurityPolicyRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getSecurityPolicy().equals(other.getSecurityPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + SECURITY_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetSecurityPolicyRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetSecurityPolicyRequest ot securityPolicy_ = other.securityPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetSecurityPolicyRequest 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 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1368660106 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSerialPortOutputInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSerialPortOutputInstanceRequest.java index 8669423a2d2d..2e132e6988af 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSerialPortOutputInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSerialPortOutputInstanceRequest.java @@ -55,79 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetSerialPortOutputInstanceRequest( - 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 27575304: - { - bitField0_ |= 0x00000001; - port_ = input.readInt32(); - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 878060304: - { - bitField0_ |= 0x00000002; - start_ = input.readInt64(); - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetSerialPortOutputInstanceRequest_descriptor; @@ -386,7 +313,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -410,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -437,7 +364,7 @@ public boolean equals(final java.lang.Object obj) { if (getStart() != other.getStart()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -462,7 +389,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -592,17 +519,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetSerialPortOutputInstanceRequest.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 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetSerialPortOutputInstance zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,19 +664,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetSerialPortOutputInstanceRequest 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 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 27575304 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 878060304: + { + start_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 878060304 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetSerialPortOutputInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1248,7 +1210,18 @@ public GetSerialPortOutputInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSerialPortOutputInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetServiceAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetServiceAttachmentRequest.java index 45b43aebe018..86d9be04b5e2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetServiceAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetServiceAttachmentRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetServiceAttachmentRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1583306902: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAttachment_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetServiceAttachmentRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAttachment_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 338957549, serviceAttachment_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -318,7 +258,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(338957549, serviceAttachment_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -337,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getServiceAttachment().equals(other.getServiceAttachment())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + SERVICE_ATTACHMENT_FIELD_NUMBER; hash = (53 * hash) + getServiceAttachment().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -484,17 +424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetServiceAttachmentRequest.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 @@ -598,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetServiceAttachmentRequest serviceAttachment_ = other.serviceAttachment_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,18 +546,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetServiceAttachmentRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1583306902: + { + serviceAttachment_ = input.readStringRequireUtf8(); + + break; + } // case -1583306902 + 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.compute.v1.GetServiceAttachmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -978,7 +942,18 @@ public GetServiceAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetServiceAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetShieldedInstanceIdentityInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetShieldedInstanceIdentityInstanceRequest.java index e272349e9d84..19535a9282d1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetShieldedInstanceIdentityInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetShieldedInstanceIdentityInstanceRequest.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetShieldedInstanceIdentityInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetShieldedInstanceIdentityInstanceRequest_descriptor; @@ -301,7 +241,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -319,7 +259,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -338,7 +278,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstance().equals(other.getInstance())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -355,7 +295,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -487,17 +427,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceRequest.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 @@ -607,7 +540,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -622,19 +555,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetShieldedInstanceIdentityInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetShieldedInstanceIdentityInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -991,7 +954,19 @@ public GetShieldedInstanceIdentityInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetShieldedInstanceIdentityInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSnapshotRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSnapshotRequest.java index d0f9364bf642..406b0b494cf2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSnapshotRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSnapshotRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetSnapshotRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2015973854: - { - java.lang.String s = input.readStringRequireUtf8(); - - snapshot_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetSnapshotRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 284874180, snapshot_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(snapshot_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(284874180, snapshot_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getSnapshot().equals(other.getSnapshot())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + SNAPSHOT_FIELD_NUMBER; hash = (53 * hash) + getSnapshot().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetSnapshotRequest.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 @@ -522,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetSnapshotRequest other) { snapshot_ = other.snapshot_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -537,17 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetSnapshotRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2015973854: + { + snapshot_ = input.readStringRequireUtf8(); + + break; + } // case -2015973854 + 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.compute.v1.GetSnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -795,7 +761,18 @@ public GetSnapshotRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSnapshotRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSslCertificateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSslCertificateRequest.java index a998ac66536a..1f711b99292f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSslCertificateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSslCertificateRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetSslCertificateRequest( - 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 371547938: - { - java.lang.String s = input.readStringRequireUtf8(); - - sslCertificate_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetSslCertificateRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getSslCertificate().equals(other.getSslCertificate())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + SSL_CERTIFICATE_FIELD_NUMBER; hash = (53 * hash) + getSslCertificate().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetSslCertificateRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetSslCertificateRequest ot sslCertificate_ = other.sslCertificate_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetSslCertificateRequest 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 371547938: + { + sslCertificate_ = input.readStringRequireUtf8(); + + break; + } // case 371547938 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetSslCertificateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetSslCertificateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSslCertificateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSslPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSslPolicyRequest.java index c4445f284f52..fd46dd8f1d25 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSslPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSslPolicyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetSslPolicyRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1933445590: - { - java.lang.String s = input.readStringRequireUtf8(); - - sslPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetSslPolicyRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 295190213, sslPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(295190213, sslPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getSslPolicy().equals(other.getSslPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + SSL_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSslPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetSslPolicyRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetSslPolicyRequest other) sslPolicy_ = other.sslPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,17 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetSslPolicyRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1933445590: + { + sslPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -1933445590 + 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.compute.v1.GetSslPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -796,7 +762,18 @@ public GetSslPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSslPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetStatusVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetStatusVpnGatewayRequest.java index 0ee44371676d..12e3d4c8b759 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetStatusVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetStatusVpnGatewayRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetStatusVpnGatewayRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1041494070: - { - java.lang.String s = input.readStringRequireUtf8(); - - vpnGateway_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetStatusVpnGatewayRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpnGateway_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 406684153, vpnGateway_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpnGateway_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(406684153, vpnGateway_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getVpnGateway().equals(other.getVpnGateway())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + VPN_GATEWAY_FIELD_NUMBER; hash = (53 * hash) + getVpnGateway().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetStatusVpnGatewayRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetStatusVpnGatewayRequest vpnGateway_ = other.vpnGateway_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetStatusVpnGatewayRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1041494070: + { + vpnGateway_ = input.readStringRequireUtf8(); + + break; + } // case -1041494070 + 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.compute.v1.GetStatusVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public GetStatusVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetStatusVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSubnetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSubnetworkRequest.java index 6bde2308c0e7..5bc80892ce25 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSubnetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetSubnetworkRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetSubnetworkRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - - subnetwork_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetSubnetworkRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 307827694, subnetwork_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(307827694, subnetwork_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getSubnetwork().equals(other.getSubnetwork())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; hash = (53 * hash) + getSubnetwork().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetSubnetworkRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetSubnetworkRequest other) subnetwork_ = other.subnetwork_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,17 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetSubnetworkRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + + break; + } // case -1832345742 + 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.compute.v1.GetSubnetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -975,7 +940,18 @@ public GetSubnetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSubnetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetGrpcProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetGrpcProxyRequest.java index 725a903757e4..b29573e2238f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetGrpcProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetGrpcProxyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTargetGrpcProxyRequest( - 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 40162266: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetGrpcProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetTargetGrpcProxyRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getTargetGrpcProxy().equals(other.getTargetGrpcProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + TARGET_GRPC_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetGrpcProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -417,17 +364,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetTargetGrpcProxyRequest.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 @@ -524,7 +464,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetTargetGrpcProxyRequest o targetGrpcProxy_ = other.targetGrpcProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -539,18 +479,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetTargetGrpcProxyRequest 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 40162266: + { + targetGrpcProxy_ = input.readStringRequireUtf8(); + + break; + } // case 40162266 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetTargetGrpcProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -798,7 +763,18 @@ public GetTargetGrpcProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTargetGrpcProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetHttpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetHttpProxyRequest.java index 9cd9e42ee844..739c007ca748 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetHttpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetHttpProxyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTargetHttpProxyRequest( - 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 1654979370: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetTargetHttpProxyRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getTargetHttpProxy().equals(other.getTargetHttpProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + TARGET_HTTP_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -417,17 +364,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetTargetHttpProxyRequest.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 @@ -524,7 +464,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetTargetHttpProxyRequest o targetHttpProxy_ = other.targetHttpProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -539,18 +479,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetTargetHttpProxyRequest 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 1654979370: + { + targetHttpProxy_ = input.readStringRequireUtf8(); + + break; + } // case 1654979370 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetTargetHttpProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -798,7 +763,18 @@ public GetTargetHttpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTargetHttpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetHttpsProxyRequest.java index 82dc6a478d1b..29d8afc9dd6e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetHttpsProxyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTargetHttpsProxyRequest( - 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 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetTargetHttpsProxyRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getTargetHttpsProxy().equals(other.getTargetHttpsProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + TARGET_HTTPS_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -417,17 +364,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetTargetHttpsProxyRequest.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 @@ -524,7 +464,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetTargetHttpsProxyRequest targetHttpsProxy_ = other.targetHttpsProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -539,18 +479,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetTargetHttpsProxyRequest 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 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetTargetHttpsProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -798,7 +763,18 @@ public GetTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetInstanceRequest.java index 863465782d99..a4daa2495858 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetInstanceRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTargetInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1976812518: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetInstance_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetTargetInstanceRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetInstance_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 289769347, targetInstance_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetInstance_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(289769347, targetInstance_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getTargetInstance().equals(other.getTargetInstance())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getTargetInstance().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetTargetInstanceRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetTargetInstanceRequest ot zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetTargetInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1976812518: + { + targetInstance_ = input.readStringRequireUtf8(); + + break; + } // case -1976812518 + 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.compute.v1.GetTargetInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -976,7 +940,18 @@ public GetTargetInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTargetInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetPoolRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetPoolRequest.java index e76304d7419f..6f6036ccf885 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetPoolRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetPoolRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTargetPoolRequest( - 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 502370386: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetPool_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetTargetPoolRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getTargetPool().equals(other.getTargetPool())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + TARGET_POOL_FIELD_NUMBER; hash = (53 * hash) + getTargetPool().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetTargetPoolRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetTargetPoolRequest other) targetPool_ = other.targetPool_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,17 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetTargetPoolRequest 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 502370386: + { + targetPool_ = input.readStringRequireUtf8(); + + break; + } // case 502370386 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetTargetPoolRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -975,7 +940,18 @@ public GetTargetPoolRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTargetPoolRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetSslProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetSslProxyRequest.java index 8f4f0d73bc0d..74afb4df0678 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetSslProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetSslProxyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTargetSslProxyRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1584600470: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetSslProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetTargetSslProxyRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 338795853, targetSslProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(338795853, targetSslProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getTargetSslProxy().equals(other.getTargetSslProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + TARGET_SSL_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetSslProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetTargetSslProxyRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetTargetSslProxyRequest ot targetSslProxy_ = other.targetSslProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetTargetSslProxyRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1584600470: + { + targetSslProxy_ = input.readStringRequireUtf8(); + + break; + } // case -1584600470 + 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.compute.v1.GetTargetSslProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetTargetSslProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTargetSslProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetTcpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetTcpProxyRequest.java index f9e18bfc27ea..ec073e558aac 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetTcpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetTcpProxyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTargetTcpProxyRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -270443758: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetTcpProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetTargetTcpProxyRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 503065442, targetTcpProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(503065442, targetTcpProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getTargetTcpProxy().equals(other.getTargetTcpProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + TARGET_TCP_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetTcpProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetTargetTcpProxyRequest.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 @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetTargetTcpProxyRequest ot targetTcpProxy_ = other.targetTcpProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetTargetTcpProxyRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -270443758: + { + targetTcpProxy_ = input.readStringRequireUtf8(); + + break; + } // case -270443758 + 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.compute.v1.GetTargetTcpProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public GetTargetTcpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTargetTcpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetVpnGatewayRequest.java index 66960f46da62..bea0362bafdf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetTargetVpnGatewayRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetTargetVpnGatewayRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -34864550: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetVpnGateway_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetTargetVpnGatewayRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetVpnGateway_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 532512843, targetVpnGateway_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -318,7 +258,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(532512843, targetVpnGateway_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -337,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getTargetVpnGateway().equals(other.getTargetVpnGateway())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + TARGET_VPN_GATEWAY_FIELD_NUMBER; hash = (53 * hash) + getTargetVpnGateway().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -484,17 +424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetTargetVpnGatewayRequest.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 @@ -598,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetTargetVpnGatewayRequest targetVpnGateway_ = other.targetVpnGateway_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,18 +546,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetTargetVpnGatewayRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -34864550: + { + targetVpnGateway_ = input.readStringRequireUtf8(); + + break; + } // case -34864550 + 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.compute.v1.GetTargetVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -978,7 +942,18 @@ public GetTargetVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetTargetVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetUrlMapRequest.java index ed22fe36b94c..5b2f57518fdb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetUrlMapRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetUrlMapRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetUrlMapRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getUrlMap().equals(other.getUrlMap())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + URL_MAP_FIELD_NUMBER; hash = (53 * hash) + getUrlMap().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetUrlMapRequest.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 @@ -522,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetUrlMapRequest other) { urlMap_ = other.urlMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -537,17 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetUrlMapRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + 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.compute.v1.GetUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -795,7 +761,18 @@ public GetUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetVpnGatewayRequest.java index 0dc70310052a..ef5e69adfb54 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetVpnGatewayRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetVpnGatewayRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1041494070: - { - java.lang.String s = input.readStringRequireUtf8(); - - vpnGateway_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetVpnGatewayRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpnGateway_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 406684153, vpnGateway_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vpnGateway_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(406684153, vpnGateway_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getVpnGateway().equals(other.getVpnGateway())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + VPN_GATEWAY_FIELD_NUMBER; hash = (53 * hash) + getVpnGateway().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetVpnGatewayRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetVpnGatewayRequest other) vpnGateway_ = other.vpnGateway_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,17 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetVpnGatewayRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1041494070: + { + vpnGateway_ = input.readStringRequireUtf8(); + + break; + } // case -1041494070 + 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.compute.v1.GetVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -975,7 +940,18 @@ public GetVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetVpnTunnelRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetVpnTunnelRequest.java index 42db6512b374..81029d3a1afa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetVpnTunnelRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetVpnTunnelRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetVpnTunnelRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1150570650: - { - java.lang.String s = input.readStringRequireUtf8(); - - vpnTunnel_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetVpnTunnelRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; if (!getVpnTunnel().equals(other.getVpnTunnel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getRegion().hashCode(); hash = (37 * hash) + VPN_TUNNEL_FIELD_NUMBER; hash = (53 * hash) + getVpnTunnel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetVpnTunnelRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetVpnTunnelRequest other) vpnTunnel_ = other.vpnTunnel_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,17 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetVpnTunnelRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1150570650: + { + vpnTunnel_ = input.readStringRequireUtf8(); + + break; + } // case 1150570650 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetVpnTunnelRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -975,7 +940,18 @@ public GetVpnTunnelRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetVpnTunnelRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetXpnHostProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetXpnHostProjectRequest.java index 7cd0b7670ced..2184e03eaab1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetXpnHostProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetXpnHostProjectRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetXpnHostProjectRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetXpnHostProjectRequest_descriptor; @@ -179,7 +133,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -191,7 +145,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -208,7 +162,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.GetXpnHostProjectRequest) obj; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -221,7 +175,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -350,17 +304,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetXpnHostProjectRequest.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 @@ -450,7 +397,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetXpnHostProjectRequest ot project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -465,18 +412,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetXpnHostProjectRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetXpnHostProjectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -618,7 +584,18 @@ public GetXpnHostProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetXpnHostProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetXpnResourcesProjectsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetXpnResourcesProjectsRequest.java index 94b8faccb023..9b854bdd6d98 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetXpnResourcesProjectsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetXpnResourcesProjectsRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetXpnResourcesProjectsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetXpnResourcesProjectsRequest_descriptor; @@ -491,7 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -519,7 +439,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -556,7 +476,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -589,7 +509,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -719,17 +639,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetXpnResourcesProjectsRequest.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 @@ -873,7 +786,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetXpnResourcesProjectsRequ if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -888,18 +801,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetXpnResourcesProjectsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.GetXpnResourcesProjectsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1537,7 +1499,18 @@ public GetXpnResourcesProjectsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetXpnResourcesProjectsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetZoneOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetZoneOperationRequest.java index 2390142b0c9a..d80bb8ffb332 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetZoneOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetZoneOperationRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetZoneOperationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetZoneOperationRequest_descriptor; @@ -303,7 +243,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -321,7 +261,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -340,7 +280,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOperation().equals(other.getOperation())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -357,7 +297,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -486,17 +426,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetZoneOperationRequest.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 @@ -600,7 +533,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetZoneOperationRequest oth zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -615,18 +548,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetZoneOperationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetZoneOperationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -990,7 +954,18 @@ public GetZoneOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetZoneOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetZoneRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetZoneRequest.java index 035a4eb73238..c887a0df92cf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetZoneRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GetZoneRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetZoneRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GetZoneRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GetZoneRequest.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 @@ -522,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GetZoneRequest other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -537,17 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GetZoneRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.GetZoneRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -795,7 +761,18 @@ public GetZoneRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetZoneRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsAttachEndpointsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsAttachEndpointsRequest.java index 26763dc180f1..8b0fae5ba328 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsAttachEndpointsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsAttachEndpointsRequest.java @@ -53,61 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GlobalNetworkEndpointGroupsAttachEndpointsRequest( - 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 1198802282: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - networkEndpoints_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - networkEndpoints_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpoint.parser(), extensionRegistry)); - 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)) { - networkEndpoints_ = java.util.Collections.unmodifiableList(networkEndpoints_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_GlobalNetworkEndpointGroupsAttachEndpointsRequest_descriptor; @@ -211,7 +156,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < networkEndpoints_.size(); i++) { output.writeMessage(149850285, networkEndpoints_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -225,7 +170,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 149850285, networkEndpoints_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -243,7 +188,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequest) obj; if (!getNetworkEndpointsList().equals(other.getNetworkEndpointsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -258,7 +203,7 @@ public int hashCode() { hash = (37 * hash) + NETWORK_ENDPOINTS_FIELD_NUMBER; hash = (53 * hash) + getNetworkEndpointsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -395,19 +340,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequest.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) { - getNetworkEndpointsFieldBuilder(); - } } @java.lang.Override @@ -415,10 +351,11 @@ public Builder clear() { super.clear(); if (networkEndpointsBuilder_ == null) { networkEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + networkEndpoints_ = null; networkEndpointsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -542,7 +479,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -557,20 +494,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequest 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 1198802282: + { + com.google.cloud.compute.v1.NetworkEndpoint m = + input.readMessage( + com.google.cloud.compute.v1.NetworkEndpoint.parser(), extensionRegistry); + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(m); + } else { + networkEndpointsBuilder_.addMessage(m); + } + break; + } // case 1198802282 + 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.compute.v1.GlobalNetworkEndpointGroupsAttachEndpointsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -972,8 +933,19 @@ public GlobalNetworkEndpointGroupsAttachEndpointsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalNetworkEndpointGroupsAttachEndpointsRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsDetachEndpointsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsDetachEndpointsRequest.java index 649fcc60bc05..ab03c496d6ab 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsDetachEndpointsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalNetworkEndpointGroupsDetachEndpointsRequest.java @@ -53,61 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GlobalNetworkEndpointGroupsDetachEndpointsRequest( - 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 1198802282: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - networkEndpoints_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - networkEndpoints_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpoint.parser(), extensionRegistry)); - 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)) { - networkEndpoints_ = java.util.Collections.unmodifiableList(networkEndpoints_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_GlobalNetworkEndpointGroupsDetachEndpointsRequest_descriptor; @@ -211,7 +156,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < networkEndpoints_.size(); i++) { output.writeMessage(149850285, networkEndpoints_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -225,7 +170,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 149850285, networkEndpoints_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -243,7 +188,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequest) obj; if (!getNetworkEndpointsList().equals(other.getNetworkEndpointsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -258,7 +203,7 @@ public int hashCode() { hash = (37 * hash) + NETWORK_ENDPOINTS_FIELD_NUMBER; hash = (53 * hash) + getNetworkEndpointsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -395,19 +340,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequest.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) { - getNetworkEndpointsFieldBuilder(); - } } @java.lang.Override @@ -415,10 +351,11 @@ public Builder clear() { super.clear(); if (networkEndpointsBuilder_ == null) { networkEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + networkEndpoints_ = null; networkEndpointsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -542,7 +479,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -557,20 +494,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequest 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 1198802282: + { + com.google.cloud.compute.v1.NetworkEndpoint m = + input.readMessage( + com.google.cloud.compute.v1.NetworkEndpoint.parser(), extensionRegistry); + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(m); + } else { + networkEndpointsBuilder_.addMessage(m); + } + break; + } // case 1198802282 + 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.compute.v1.GlobalNetworkEndpointGroupsDetachEndpointsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -972,8 +933,19 @@ public GlobalNetworkEndpointGroupsDetachEndpointsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalNetworkEndpointGroupsDetachEndpointsRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalOrganizationSetPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalOrganizationSetPolicyRequest.java index 579f1dc367e8..555e3cb906e9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalOrganizationSetPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalOrganizationSetPolicyRequest.java @@ -53,82 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GlobalOrganizationSetPolicyRequest( - 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 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 728574354: - { - com.google.cloud.compute.v1.Policy.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage(com.google.cloud.compute.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -1068952462: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bindings_.add( - input.readMessage( - com.google.cloud.compute.v1.Binding.parser(), extensionRegistry)); - 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)) { - bindings_ = java.util.Collections.unmodifiableList(bindings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_GlobalOrganizationSetPolicyRequest_descriptor; @@ -347,7 +271,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < bindings_.size(); i++) { output.writeMessage(403251854, bindings_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -365,7 +289,7 @@ public int getSerializedSize() { for (int i = 0; i < bindings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(403251854, bindings_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -390,7 +314,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +337,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -563,10 +487,11 @@ public Builder clear() { super.clear(); if (bindingsBuilder_ == null) { bindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bindings_ = null; bindingsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); etag_ = ""; bitField0_ = (bitField0_ & ~0x00000002); if (policyBuilder_ == null) { @@ -713,7 +638,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GlobalOrganizationSetPolicy if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -728,19 +653,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GlobalOrganizationSetPolicyRequest 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 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 24987818 + case 728574354: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 728574354 + case -1068952462: + { + com.google.cloud.compute.v1.Binding m = + input.readMessage( + com.google.cloud.compute.v1.Binding.parser(), extensionRegistry); + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(m); + } else { + bindingsBuilder_.addMessage(m); + } + break; + } // case -1068952462 + 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.compute.v1.GlobalOrganizationSetPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1430,7 +1392,18 @@ public GlobalOrganizationSetPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalOrganizationSetPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalSetLabelsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalSetLabelsRequest.java index 7fe758e3ce27..fd8ec9d723b6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalSetLabelsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalSetLabelsRequest.java @@ -51,66 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GlobalSetLabelsRequest( - 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 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - labelFingerprint_ = s; - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GlobalSetLabelsRequest_descriptor; @@ -319,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +282,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -363,7 +303,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLabelFingerprint().equals(other.getLabelFingerprint())) return false; } if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +470,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.GlobalSetLabelsRequest.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 @@ -641,7 +574,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GlobalSetLabelsRequest othe onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -656,18 +589,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GlobalSetLabelsRequest 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 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1424998602 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.GlobalSetLabelsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -983,7 +946,18 @@ public GlobalSetLabelsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalSetLabelsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalSetPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalSetPolicyRequest.java index 2280682ff69a..eaacb6c6aaa5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalSetPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GlobalSetPolicyRequest.java @@ -52,82 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GlobalSetPolicyRequest( - 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 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 728574354: - { - com.google.cloud.compute.v1.Policy.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage(com.google.cloud.compute.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -1068952462: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bindings_.add( - input.readMessage( - com.google.cloud.compute.v1.Binding.parser(), extensionRegistry)); - 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)) { - bindings_ = java.util.Collections.unmodifiableList(bindings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_GlobalSetPolicyRequest_descriptor; @@ -346,7 +270,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < bindings_.size(); i++) { output.writeMessage(403251854, bindings_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -364,7 +288,7 @@ public int getSerializedSize() { for (int i = 0; i < bindings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(403251854, bindings_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -389,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -412,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -561,10 +485,11 @@ public Builder clear() { super.clear(); if (bindingsBuilder_ == null) { bindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bindings_ = null; bindingsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); etag_ = ""; bitField0_ = (bitField0_ & ~0x00000002); if (policyBuilder_ == null) { @@ -709,7 +634,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GlobalSetPolicyRequest othe if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -724,18 +649,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GlobalSetPolicyRequest 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 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 24987818 + case 728574354: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 728574354 + case -1068952462: + { + com.google.cloud.compute.v1.Binding m = + input.readMessage( + com.google.cloud.compute.v1.Binding.parser(), extensionRegistry); + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(m); + } else { + bindingsBuilder_.addMessage(m); + } + break; + } // case -1068952462 + 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.compute.v1.GlobalSetPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1423,7 +1386,18 @@ public GlobalSetPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GlobalSetPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributes.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributes.java index 096482d9bf2f..59d041cda6a3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributes.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributes.java @@ -56,97 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GuestAttributes( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - kind_ = s; - break; - } - case 996659058: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - variableValue_ = s; - break; - } - case 1260566994: - { - com.google.cloud.compute.v1.GuestAttributesValue.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = queryValue_.toBuilder(); - } - queryValue_ = - input.readMessage( - com.google.cloud.compute.v1.GuestAttributesValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(queryValue_); - queryValue_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 1314918626: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - variableKey_ = s; - break; - } - case -1346237982: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - queryPath_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GuestAttributes_descriptor; @@ -565,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -592,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -632,7 +541,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVariableValue()) { if (!getVariableValue().equals(other.getVariableValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -667,7 +576,7 @@ public int hashCode() { hash = (37 * hash) + VARIABLE_VALUE_FIELD_NUMBER; hash = (53 * hash) + getVariableValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -965,7 +874,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GuestAttributes other) { variableValue_ = other.variableValue_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -980,17 +889,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GuestAttributes 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26336418 + case 996659058: + { + variableValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 996659058 + case 1260566994: + { + input.readMessage(getQueryValueFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 1260566994 + case 1314918626: + { + variableKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1314918626 + case -1346237982: + { + queryPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1346237982 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -645248918 + 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.compute.v1.GuestAttributes) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1816,7 +1775,18 @@ public GuestAttributes parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GuestAttributes(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributesEntry.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributesEntry.java index 203c49892ffb..7869af5df3ec 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributesEntry.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributesEntry.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GuestAttributesEntry( - 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 848634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - key_ = s; - break; - } - case 895781770: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - value_ = s; - break; - } - case 1427811034: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - namespace_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GuestAttributesEntry_descriptor; @@ -346,7 +285,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 178476379, namespace_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -364,7 +303,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(178476379, namespace_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +331,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValue()) { if (!getValue().equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -415,7 +354,7 @@ public int 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; } @@ -544,17 +483,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GuestAttributesEntry.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 @@ -673,7 +605,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GuestAttributesEntry other) value_ = other.value_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -688,17 +620,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GuestAttributesEntry 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 848634: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 848634 + case 895781770: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 895781770 + case 1427811034: + { + namespace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1427811034 + 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.compute.v1.GuestAttributesEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1096,7 +1060,18 @@ public GuestAttributesEntry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GuestAttributesEntry(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributesValue.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributesValue.java index b0f7e5e66996..bcd7ee6f1525 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributesValue.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestAttributesValue.java @@ -52,62 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GuestAttributesValue( - 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 804208130: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.GuestAttributesEntry.parser(), - extensionRegistry)); - 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)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_GuestAttributesValue_descriptor; @@ -169,7 +113,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < items_.size(); i++) { output.writeMessage(100526016, items_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -181,7 +125,7 @@ public int getSerializedSize() { for (int i = 0; i < items_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(100526016, items_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -198,7 +142,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.GuestAttributesValue) obj; if (!getItemsList().equals(other.getItemsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -213,7 +157,7 @@ public int hashCode() { hash = (37 * hash) + ITEMS_FIELD_NUMBER; hash = (53 * hash) + getItemsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -342,19 +286,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GuestAttributesValue.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) { - getItemsFieldBuilder(); - } } @java.lang.Override @@ -362,10 +297,11 @@ public Builder clear() { super.clear(); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -480,7 +416,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GuestAttributesValue other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -495,17 +431,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GuestAttributesValue 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 804208130: + { + com.google.cloud.compute.v1.GuestAttributesEntry m = + input.readMessage( + com.google.cloud.compute.v1.GuestAttributesEntry.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + 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.compute.v1.GuestAttributesValue) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -749,7 +713,18 @@ public GuestAttributesValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GuestAttributesValue(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestOsFeature.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestOsFeature.java index 167fca65d0a5..4309c47ce009 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestOsFeature.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/GuestOsFeature.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GuestOsFeature( - 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 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - type_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_GuestOsFeature_descriptor; @@ -360,7 +313,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3575610, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -372,7 +325,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3575610, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -407,7 +360,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -536,17 +489,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.GuestOsFeature.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 @@ -642,7 +588,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.GuestOsFeature other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -657,17 +603,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.GuestOsFeature 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 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 28604882 + 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.compute.v1.GuestOsFeature) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -831,7 +797,18 @@ public GuestOsFeature parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GuestOsFeature(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTP2HealthCheck.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTP2HealthCheck.java index 869771182dc0..5b45d90ac4cc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTP2HealthCheck.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTP2HealthCheck.java @@ -56,94 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HTTP2HealthCheck( - 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 25668930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - host_ = s; - break; - } - case 27575304: - { - bitField0_ |= 0x00000002; - port_ = input.readInt32(); - break; - } - case 332274762: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - portName_ = s; - break; - } - case 412724778: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - portSpecification_ = s; - break; - } - case 1282993138: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - proxyHeader_ = s; - break; - } - case 1572381194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - response_ = s; - break; - } - case 1835228842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - requestPath_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HTTP2HealthCheck_descriptor; @@ -925,7 +837,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 229403605, requestPath_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -956,7 +868,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(229403605, requestPath_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1000,7 +912,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResponse()) { if (!getResponse().equals(other.getResponse())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1039,7 +951,7 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_FIELD_NUMBER; hash = (53 * hash) + getResponse().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1167,17 +1079,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HTTP2HealthCheck.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 @@ -1337,7 +1242,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HTTP2HealthCheck other) { response_ = other.response_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1352,17 +1257,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HTTP2HealthCheck 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 25668930: + { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 25668930 + case 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 27575304 + case 332274762: + { + portName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 332274762 + case 412724778: + { + portSpecification_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 412724778 + case 1282993138: + { + proxyHeader_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1282993138 + case 1572381194: + { + response_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1572381194 + case 1835228842: + { + requestPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1835228842 + 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.compute.v1.HTTP2HealthCheck) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2199,7 +2160,18 @@ public HTTP2HealthCheck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HTTP2HealthCheck(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTPHealthCheck.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTPHealthCheck.java index 688a763ea7a6..3601d11a075f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTPHealthCheck.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTPHealthCheck.java @@ -56,94 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HTTPHealthCheck( - 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 25668930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - host_ = s; - break; - } - case 27575304: - { - bitField0_ |= 0x00000002; - port_ = input.readInt32(); - break; - } - case 332274762: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - portName_ = s; - break; - } - case 412724778: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - portSpecification_ = s; - break; - } - case 1282993138: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - proxyHeader_ = s; - break; - } - case 1572381194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - response_ = s; - break; - } - case 1835228842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - requestPath_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HTTPHealthCheck_descriptor; @@ -925,7 +837,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 229403605, requestPath_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -956,7 +868,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(229403605, requestPath_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1000,7 +912,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResponse()) { if (!getResponse().equals(other.getResponse())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1039,7 +951,7 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_FIELD_NUMBER; hash = (53 * hash) + getResponse().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1167,17 +1079,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HTTPHealthCheck.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 @@ -1337,7 +1242,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HTTPHealthCheck other) { response_ = other.response_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1352,17 +1257,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HTTPHealthCheck 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 25668930: + { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 25668930 + case 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 27575304 + case 332274762: + { + portName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 332274762 + case 412724778: + { + portSpecification_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 412724778 + case 1282993138: + { + proxyHeader_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1282993138 + case 1572381194: + { + response_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1572381194 + case 1835228842: + { + requestPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1835228842 + 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.compute.v1.HTTPHealthCheck) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2199,7 +2160,18 @@ public HTTPHealthCheck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HTTPHealthCheck(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTPSHealthCheck.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTPSHealthCheck.java index 368536f83432..b394b182c169 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTPSHealthCheck.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HTTPSHealthCheck.java @@ -56,94 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HTTPSHealthCheck( - 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 25668930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - host_ = s; - break; - } - case 27575304: - { - bitField0_ |= 0x00000002; - port_ = input.readInt32(); - break; - } - case 332274762: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - portName_ = s; - break; - } - case 412724778: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - portSpecification_ = s; - break; - } - case 1282993138: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - proxyHeader_ = s; - break; - } - case 1572381194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - response_ = s; - break; - } - case 1835228842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - requestPath_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HTTPSHealthCheck_descriptor; @@ -925,7 +837,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 229403605, requestPath_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -956,7 +868,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(229403605, requestPath_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1000,7 +912,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResponse()) { if (!getResponse().equals(other.getResponse())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1039,7 +951,7 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_FIELD_NUMBER; hash = (53 * hash) + getResponse().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1167,17 +1079,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HTTPSHealthCheck.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 @@ -1337,7 +1242,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HTTPSHealthCheck other) { response_ = other.response_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1352,17 +1257,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HTTPSHealthCheck 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 25668930: + { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 25668930 + case 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 27575304 + case 332274762: + { + portName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 332274762 + case 412724778: + { + portSpecification_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 412724778 + case 1282993138: + { + proxyHeader_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1282993138 + case 1572381194: + { + response_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1572381194 + case 1835228842: + { + requestPath_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1835228842 + 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.compute.v1.HTTPSHealthCheck) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2199,7 +2160,18 @@ public HTTPSHealthCheck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HTTPSHealthCheck(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheck.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheck.java index 4287c0cc1299..c0aa844aace5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheck.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheck.java @@ -58,237 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthCheck( - 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 26840: - { - bitField0_ |= 0x00000100; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - name_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - type_ = s; - break; - } - case 90887890: - { - com.google.cloud.compute.v1.HTTP2HealthCheck.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = http2HealthCheck_.toBuilder(); - } - http2HealthCheck_ = - input.readMessage( - com.google.cloud.compute.v1.HTTP2HealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(http2HealthCheck_); - http2HealthCheck_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 639959960: - { - bitField0_ |= 0x00010000; - timeoutSec_ = input.readInt32(); - break; - } - case 684236594: - { - com.google.cloud.compute.v1.GRPCHealthCheck.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = grpcHealthCheck_.toBuilder(); - } - grpcHealthCheck_ = - input.readMessage( - com.google.cloud.compute.v1.GRPCHealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(grpcHealthCheck_); - grpcHealthCheck_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - region_ = s; - break; - } - case 1823667840: - { - bitField0_ |= 0x00040000; - unhealthyThreshold_ = input.readInt32(); - break; - } - case -2054707774: - { - com.google.cloud.compute.v1.SSLHealthCheck.Builder subBuilder = null; - if (((bitField0_ & 0x00004000) != 0)) { - subBuilder = sslHealthCheck_.toBuilder(); - } - sslHealthCheck_ = - input.readMessage( - com.google.cloud.compute.v1.SSLHealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sslHealthCheck_); - sslHealthCheck_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00004000; - break; - } - case -1530479248: - { - bitField0_ |= 0x00000001; - checkIntervalSec_ = input.readInt32(); - break; - } - case -1484569366: - { - com.google.cloud.compute.v1.HealthCheckLogConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00000400) != 0)) { - subBuilder = logConfig_.toBuilder(); - } - logConfig_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheckLogConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(logConfig_); - logConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000400; - break; - } - case -1069268408: - { - bitField0_ |= 0x00000010; - healthyThreshold_ = input.readInt32(); - break; - } - case -994271774: - { - com.google.cloud.compute.v1.HTTPHealthCheck.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = httpHealthCheck_.toBuilder(); - } - httpHealthCheck_ = - input.readMessage( - com.google.cloud.compute.v1.HTTPHealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(httpHealthCheck_); - httpHealthCheck_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -806592054: - { - com.google.cloud.compute.v1.HTTPSHealthCheck.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = httpsHealthCheck_.toBuilder(); - } - httpsHealthCheck_ = - input.readMessage( - com.google.cloud.compute.v1.HTTPSHealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(httpsHealthCheck_); - httpsHealthCheck_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - selfLink_ = s; - break; - } - case -535123942: - { - com.google.cloud.compute.v1.TCPHealthCheck.Builder subBuilder = null; - if (((bitField0_ & 0x00008000) != 0)) { - subBuilder = tcpHealthCheck_.toBuilder(); - } - tcpHealthCheck_ = - input.readMessage( - com.google.cloud.compute.v1.TCPHealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tcpHealthCheck_); - tcpHealthCheck_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00008000; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthCheck_descriptor; @@ -1385,7 +1154,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00008000) != 0)) { output.writeMessage(469980419, getTcpHealthCheck()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1460,7 +1229,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(469980419, getTcpHealthCheck()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1551,7 +1320,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUnhealthyThreshold()) { if (getUnhealthyThreshold() != other.getUnhealthyThreshold()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1638,7 +1407,7 @@ public int hashCode() { hash = (37 * hash) + UNHEALTHY_THRESHOLD_FIELD_NUMBER; hash = (53 * hash) + getUnhealthyThreshold(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2111,7 +1880,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthCheck other) { if (other.hasUnhealthyThreshold()) { setUnhealthyThreshold(other.getUnhealthyThreshold()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2126,17 +1895,147 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthCheck 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 26989658 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 28604882 + case 90887890: + { + input.readMessage( + getHttp2HealthCheckFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 90887890 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 639959960: + { + timeoutSec_ = input.readInt32(); + bitField0_ |= 0x00010000; + break; + } // case 639959960 + case 684236594: + { + input.readMessage(getGrpcHealthCheckFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 684236594 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 1111570338 + case 1823667840: + { + unhealthyThreshold_ = input.readInt32(); + bitField0_ |= 0x00040000; + break; + } // case 1823667840 + case -2054707774: + { + input.readMessage(getSslHealthCheckFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case -2054707774 + case -1530479248: + { + checkIntervalSec_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -1530479248 + case -1484569366: + { + input.readMessage(getLogConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case -1484569366 + case -1069268408: + { + healthyThreshold_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case -1069268408 + case -994271774: + { + input.readMessage(getHttpHealthCheckFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case -994271774 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -806592054: + { + input.readMessage( + getHttpsHealthCheckFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case -806592054 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case -645248918 + case -535123942: + { + input.readMessage(getTcpHealthCheckFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case -535123942 + 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.compute.v1.HealthCheck) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4363,7 +4262,18 @@ public HealthCheck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthCheck(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckList.java index 7f1c3f3b990d..a2ad34e0f30f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthCheckList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.HealthCheck.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthCheckList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthCheckList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthCheckList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.HealthCheck m = + input.readMessage( + com.google.cloud.compute.v1.HealthCheck.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.HealthCheckList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public HealthCheckList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthCheckList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckLogConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckLogConfig.java index d63db71e93e4..7936a1529372 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckLogConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckLogConfig.java @@ -50,52 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthCheckLogConfig( - 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 -1800852456: - { - bitField0_ |= 0x00000001; - enable_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthCheckLogConfig_descriptor; @@ -162,7 +116,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(311764355, enable_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -174,7 +128,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(311764355, enable_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -194,7 +148,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEnable()) { if (getEnable() != other.getEnable()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -209,7 +163,7 @@ public int hashCode() { hash = (37 * hash) + ENABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnable()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -338,17 +292,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HealthCheckLogConfig.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 @@ -443,7 +390,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthCheckLogConfig other) if (other.hasEnable()) { setEnable(other.getEnable()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -458,17 +405,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthCheckLogConfig 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 -1800852456: + { + enable_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1800852456 + 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.compute.v1.HealthCheckLogConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -573,7 +540,18 @@ public HealthCheckLogConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthCheckLogConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckReference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckReference.java index 60db32e24194..fac71d95b397 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckReference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckReference.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthCheckReference( - 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 -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - healthCheck_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthCheckReference_descriptor; @@ -178,7 +131,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 308876645, healthCheck_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -190,7 +143,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(308876645, healthCheck_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +163,7 @@ public boolean equals(final java.lang.Object obj) { if (hasHealthCheck()) { if (!getHealthCheck().equals(other.getHealthCheck())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +178,7 @@ public int hashCode() { hash = (37 * hash) + HEALTH_CHECK_FIELD_NUMBER; hash = (53 * hash) + getHealthCheck().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HealthCheckReference.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 @@ -461,7 +407,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthCheckReference other) healthCheck_ = other.healthCheck_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -476,17 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthCheckReference 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 -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1823954134 + 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.compute.v1.HealthCheckReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -608,7 +574,18 @@ public HealthCheckReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthCheckReference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckService.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckService.java index c56077a01882..0cab21d5b193 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckService.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckService.java @@ -62,147 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthCheckService( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 234773866: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - networkEndpointGroups_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - networkEndpointGroups_.add(s); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - region_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - fingerprint_ = s; - break; - } - case 2025305034: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - healthStatusAggregationPolicy_ = s; - break; - } - case -1041139374: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - notificationEndpoints_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000200; - } - notificationEndpoints_.add(s); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -708002446: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - healthChecks_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - healthChecks_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = 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_ & 0x00000100) != 0)) { - networkEndpointGroups_ = networkEndpointGroups_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000200) != 0)) { - notificationEndpoints_ = notificationEndpoints_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - healthChecks_ = healthChecks_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthCheckService_descriptor; @@ -1164,7 +1023,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1227,7 +1086,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1284,7 +1143,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSelfLink()) { if (!getSelfLink().equals(other.getSelfLink())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1343,7 +1202,7 @@ public int hashCode() { hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; hash = (53 * hash) + getSelfLink().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1472,17 +1331,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HealthCheckService.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 @@ -1715,7 +1567,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthCheckService other) { selfLink_ = other.selfLink_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1730,17 +1582,106 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthCheckService 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 234773866: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNetworkEndpointGroupsIsMutable(); + networkEndpointGroups_.add(s); + break; + } // case 234773866 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1111570338 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1877428002 + case 2025305034: + { + healthStatusAggregationPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 2025305034 + case -1041139374: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNotificationEndpointsIsMutable(); + notificationEndpoints_.add(s); + break; + } // case -1041139374 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -708002446: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHealthChecksIsMutable(); + healthChecks_.add(s); + break; + } // case -708002446 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -645248918 + 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.compute.v1.HealthCheckService) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3317,7 +3258,18 @@ public HealthCheckService parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthCheckService(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckServiceReference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckServiceReference.java index 1d93faf8aa6a..554016032602 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckServiceReference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckServiceReference.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthCheckServiceReference( - 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 -1027969318: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - healthCheckService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthCheckServiceReference_descriptor; @@ -178,7 +131,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 408374747, healthCheckService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -191,7 +144,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(408374747, healthCheckService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -211,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { if (hasHealthCheckService()) { if (!getHealthCheckService().equals(other.getHealthCheckService())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -226,7 +179,7 @@ public int hashCode() { hash = (37 * hash) + HEALTH_CHECK_SERVICE_FIELD_NUMBER; hash = (53 * hash) + getHealthCheckService().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +309,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HealthCheckServiceReference.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 @@ -463,7 +409,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthCheckServiceReference healthCheckService_ = other.healthCheckService_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -478,18 +424,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthCheckServiceReference 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 -1027969318: + { + healthCheckService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1027969318 + 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.compute.v1.HealthCheckServiceReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -611,7 +576,18 @@ public HealthCheckServiceReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthCheckServiceReference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckServicesList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckServicesList.java index 99c3fec9434f..9b7efd8b745e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckServicesList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthCheckServicesList.java @@ -55,104 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthCheckServicesList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.HealthCheckService.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthCheckServicesList_descriptor; @@ -572,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -822,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthCheckServicesList oth if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,18 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthCheckServicesList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.HealthCheckService m = + input.readMessage( + com.google.cloud.compute.v1.HealthCheckService.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.HealthCheckServicesList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2081,7 +2040,18 @@ public HealthCheckServicesList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthCheckServicesList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthChecksAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthChecksAggregatedList.java index 0074a6cb5f75..32064ae52507 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthChecksAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthChecksAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthChecksAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.HealthChecksScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthChecksAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1158,7 +1045,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthChecksAggregatedList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1173,18 +1060,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthChecksAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.HealthChecksScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.HealthChecksAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2235,7 +2183,18 @@ public HealthChecksAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthChecksAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthChecksScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthChecksScopedList.java index c2561dbd7396..29c6777d7131 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthChecksScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthChecksScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthChecksScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -708002446: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - healthChecks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - healthChecks_.add( - input.readMessage( - com.google.cloud.compute.v1.HealthCheck.parser(), extensionRegistry)); - 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)) { - healthChecks_ = java.util.Collections.unmodifiableList(healthChecks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthChecksScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < healthChecks_.size(); i++) { output.writeMessage(448370606, healthChecks_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(448370606, healthChecks_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (healthChecksBuilder_ == null) { healthChecks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + healthChecks_ = null; healthChecksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthChecksScopedList othe if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,18 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthChecksScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -708002446: + { + com.google.cloud.compute.v1.HealthCheck m = + input.readMessage( + com.google.cloud.compute.v1.HealthCheck.parser(), extensionRegistry); + if (healthChecksBuilder_ == null) { + ensureHealthChecksIsMutable(); + healthChecks_.add(m); + } else { + healthChecksBuilder_.addMessage(m); + } + break; + } // case -708002446 + 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.compute.v1.HealthChecksScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1215,7 +1178,18 @@ public HealthChecksScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthChecksScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatus.java index 0c55720f9f7a..9c9d48dc9c96 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatus.java @@ -57,116 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthStatus( - 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 27575304: - { - bitField0_ |= 0x00000020; - port_ = input.readInt32(); - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - instance_ = s; - break; - } - case 896260386: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case 1378005058: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - forwardingRuleIp_ = s; - break; - } - case -2135255054: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - forwardingRule_ = s; - break; - } - case -2037771326: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - weight_ = s; - break; - } - case -1702910094: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - healthState_ = s; - break; - } - case -1044789534: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - ipAddress_ = s; - break; - } - case -114955254: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - weightError_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthStatus_descriptor; @@ -1128,7 +1018,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 522501505, weightError_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1172,7 +1062,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(522501505, weightError_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1220,7 +1110,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWeightError()) { if (!getWeightError().equals(other.getWeightError())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1267,7 +1157,7 @@ public int hashCode() { hash = (37 * hash) + WEIGHT_ERROR_FIELD_NUMBER; hash = (53 * hash) + getWeightError().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1415,17 +1305,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.HealthStatus.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 @@ -1600,7 +1483,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthStatus other) { weightError_ = other.weightError_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1615,17 +1498,90 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthStatus 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 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 27575304 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 146056362 + case 896260386: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 896260386 + case 1378005058: + { + forwardingRuleIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1378005058 + case -2135255054: + { + forwardingRule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -2135255054 + case -2037771326: + { + weight_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -2037771326 + case -1702910094: + { + healthState_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -1702910094 + case -1044789534: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -1044789534 + case -114955254: + { + weightError_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -114955254 + 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.compute.v1.HealthStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2707,7 +2663,18 @@ public HealthStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java index 00872721c04e..6860e358e216 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HealthStatusForNetworkEndpoint.java @@ -52,120 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HealthStatusForNetworkEndpoint( - 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 -2135255054: - { - com.google.cloud.compute.v1.ForwardingRuleReference.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = forwardingRule_.toBuilder(); - } - forwardingRule_ = - input.readMessage( - com.google.cloud.compute.v1.ForwardingRuleReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(forwardingRule_); - forwardingRule_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -1839398830: - { - com.google.cloud.compute.v1.BackendServiceReference.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = backendService_.toBuilder(); - } - backendService_ = - input.readMessage( - com.google.cloud.compute.v1.BackendServiceReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backendService_); - backendService_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1823954134: - { - com.google.cloud.compute.v1.HealthCheckReference.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = healthCheck_.toBuilder(); - } - healthCheck_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheckReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(healthCheck_); - healthCheck_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -1702910094: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - healthState_ = s; - break; - } - case -1027969318: - { - com.google.cloud.compute.v1.HealthCheckServiceReference.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = healthCheckService_.toBuilder(); - } - healthCheckService_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheckServiceReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(healthCheckService_); - healthCheckService_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HealthStatusForNetworkEndpoint_descriptor; @@ -630,7 +516,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(408374747, getHealthCheckService()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -658,7 +544,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 408374747, getHealthCheckService()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -694,7 +580,7 @@ public boolean equals(final java.lang.Object obj) { if (hasHealthState()) { if (!getHealthState().equals(other.getHealthState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -725,7 +611,7 @@ public int hashCode() { hash = (37 * hash) + HEALTH_STATE_FIELD_NUMBER; hash = (53 * hash) + getHealthState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1034,7 +920,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HealthStatusForNetworkEndpo healthState_ = other.healthState_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1049,18 +935,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HealthStatusForNetworkEndpoint 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 -2135255054: + { + input.readMessage(getForwardingRuleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -2135255054 + case -1839398830: + { + input.readMessage(getBackendServiceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -1839398830 + case -1823954134: + { + input.readMessage(getHealthCheckFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -1823954134 + case -1702910094: + { + healthState_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -1702910094 + case -1027969318: + { + input.readMessage( + getHealthCheckServiceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -1027969318 + 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.compute.v1.HealthStatusForNetworkEndpoint) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2019,7 +1949,18 @@ public HealthStatusForNetworkEndpoint parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HealthStatusForNetworkEndpoint(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Help.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Help.java index 31c8bc4b294c..90a3569f26e7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Help.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Help.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Help( - 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 823819722: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - links_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - links_.add( - input.readMessage( - com.google.cloud.compute.v1.HelpLink.parser(), extensionRegistry)); - 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)) { - links_ = java.util.Collections.unmodifiableList(links_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Help_descriptor; @@ -206,7 +152,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < links_.size(); i++) { output.writeMessage(102977465, links_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -218,7 +164,7 @@ public int getSerializedSize() { for (int i = 0; i < links_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(102977465, links_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -234,7 +180,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.compute.v1.Help other = (com.google.cloud.compute.v1.Help) obj; if (!getLinksList().equals(other.getLinksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -249,7 +195,7 @@ public int hashCode() { hash = (37 * hash) + LINKS_FIELD_NUMBER; hash = (53 * hash) + getLinksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -377,19 +323,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Help.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) { - getLinksFieldBuilder(); - } } @java.lang.Override @@ -397,10 +334,11 @@ public Builder clear() { super.clear(); if (linksBuilder_ == null) { links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + links_ = null; linksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -513,7 +451,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Help other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -528,17 +466,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Help 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 823819722: + { + com.google.cloud.compute.v1.HelpLink m = + input.readMessage( + com.google.cloud.compute.v1.HelpLink.parser(), extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.addMessage(m); + } + break; + } // case 823819722 + 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.compute.v1.Help) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -924,7 +889,18 @@ public Help parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Help(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HelpLink.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HelpLink.java index a09524c577aa..ddd1f3a0fb69 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HelpLink.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HelpLink.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HelpLink( - 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 928634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - url_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - description_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HelpLink_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrl()) { if (!getUrl().equals(other.getUrl())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + URL_FIELD_NUMBER; hash = (53 * hash) + getUrl().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -456,17 +402,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HelpLink.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 @@ -572,7 +511,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HelpLink other) { url_ = other.url_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -587,17 +526,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HelpLink 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 928634: + { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 928634 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -911466526 + 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.compute.v1.HelpLink) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -875,7 +840,18 @@ public HelpLink parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HelpLink(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HostRule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HostRule.java index d36ca282e60e..0cf9fc16e062 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HostRule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HostRule.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HostRule( - 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 795737690: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - hosts_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - hosts_.add(s); - break; - } - case -1592461118: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - pathMatcher_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - description_ = 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_ & 0x00000002) != 0)) { - hosts_ = hosts_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HostRule_descriptor; @@ -349,7 +282,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -372,7 +305,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -396,7 +329,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPathMatcher()) { if (!getPathMatcher().equals(other.getPathMatcher())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -419,7 +352,7 @@ public int hashCode() { hash = (37 * hash) + PATH_MATCHER_FIELD_NUMBER; hash = (53 * hash) + getPathMatcher().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -547,17 +480,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HostRule.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 @@ -680,7 +606,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HostRule other) { pathMatcher_ = other.pathMatcher_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -695,17 +621,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HostRule 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 795737690: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHostsIsMutable(); + hosts_.add(s); + break; + } // case 795737690 + case -1592461118: + { + pathMatcher_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1592461118 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -911466526 + 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.compute.v1.HostRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1151,7 +1110,18 @@ public HostRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HostRule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultAbort.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultAbort.java index 5c011bc058ec..97f2a2198ece 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultAbort.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultAbort.java @@ -50,58 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpFaultAbort( - 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 1215272145: - { - bitField0_ |= 0x00000002; - percentage_ = input.readDouble(); - break; - } - case -543368120: - { - bitField0_ |= 0x00000001; - httpStatus_ = input.readUInt32(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpFaultAbort_descriptor; @@ -204,7 +152,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeUInt32(468949897, httpStatus_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +167,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(468949897, httpStatus_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -244,7 +192,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Double.doubleToLongBits(getPercentage()) != java.lang.Double.doubleToLongBits(other.getPercentage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -266,7 +214,7 @@ public int hashCode() { + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getPercentage())); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -395,17 +343,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HttpFaultAbort.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 @@ -508,7 +449,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpFaultAbort other) { if (other.hasPercentage()) { setPercentage(other.getPercentage()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -523,17 +464,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpFaultAbort 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 1215272145: + { + percentage_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 1215272145 + case -543368120: + { + httpStatus_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case -543368120 + 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.compute.v1.HttpFaultAbort) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -705,7 +672,18 @@ public HttpFaultAbort parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpFaultAbort(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultDelay.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultDelay.java index ccd84db49f07..fb2ea5f92306 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultDelay.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultDelay.java @@ -50,68 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpFaultDelay( - 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 1215272145: - { - bitField0_ |= 0x00000002; - percentage_ = input.readDouble(); - break; - } - case -1758664766: - { - com.google.cloud.compute.v1.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = fixedDelay_.toBuilder(); - } - fixedDelay_ = - input.readMessage( - com.google.cloud.compute.v1.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(fixedDelay_); - fixedDelay_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpFaultDelay_descriptor; @@ -231,7 +169,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(317037816, getFixedDelay()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -246,7 +184,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(317037816, getFixedDelay()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -271,7 +209,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Double.doubleToLongBits(getPercentage()) != java.lang.Double.doubleToLongBits(other.getPercentage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -293,7 +231,7 @@ public int hashCode() { + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getPercentage())); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -545,7 +483,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpFaultDelay other) { if (other.hasPercentage()) { setPercentage(other.getPercentage()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -560,17 +498,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpFaultDelay 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 1215272145: + { + percentage_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 1215272145 + case -1758664766: + { + input.readMessage(getFixedDelayFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -1758664766 + 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.compute.v1.HttpFaultDelay) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -861,7 +825,18 @@ public HttpFaultDelay parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpFaultDelay(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultInjection.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultInjection.java index 8ad307b8716e..48ac2b04d9bc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultInjection.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpFaultInjection.java @@ -50,78 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpFaultInjection( - 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 740891010: - { - com.google.cloud.compute.v1.HttpFaultAbort.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = abort_.toBuilder(); - } - abort_ = - input.readMessage( - com.google.cloud.compute.v1.HttpFaultAbort.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(abort_); - abort_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 763743258: - { - com.google.cloud.compute.v1.HttpFaultDelay.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = delay_.toBuilder(); - } - delay_ = - input.readMessage( - com.google.cloud.compute.v1.HttpFaultDelay.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(delay_); - delay_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpFaultInjection_descriptor; @@ -258,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(95467907, getDelay()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -273,7 +201,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(95467907, getDelay()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -297,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDelay()) { if (!getDelay().equals(other.getDelay())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -316,7 +244,7 @@ public int hashCode() { hash = (37 * hash) + DELAY_FIELD_NUMBER; hash = (53 * hash) + getDelay().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -577,7 +505,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpFaultInjection other) { if (other.hasDelay()) { mergeDelay(other.getDelay()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -592,17 +520,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpFaultInjection 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 740891010: + { + input.readMessage(getAbortFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 740891010 + case 763743258: + { + input.readMessage(getDelayFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 763743258 + 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.compute.v1.HttpFaultInjection) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1012,7 +966,18 @@ public HttpFaultInjection parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpFaultInjection(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderAction.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderAction.java index 1dc5d4916b66..6144a0f710d4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderAction.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderAction.java @@ -55,102 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpHeaderAction( - 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 257088418: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - responseHeadersToAdd_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - responseHeadersToAdd_.add( - input.readMessage( - com.google.cloud.compute.v1.HttpHeaderOption.parser(), extensionRegistry)); - break; - } - case 576895794: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requestHeadersToAdd_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requestHeadersToAdd_.add( - input.readMessage( - com.google.cloud.compute.v1.HttpHeaderOption.parser(), extensionRegistry)); - break; - } - case 603326090: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - responseHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - responseHeadersToRemove_.add(s); - break; - } - case 1747401978: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - requestHeadersToRemove_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - requestHeadersToRemove_.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_ & 0x00000004) != 0)) { - responseHeadersToAdd_ = java.util.Collections.unmodifiableList(responseHeadersToAdd_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requestHeadersToAdd_ = java.util.Collections.unmodifiableList(requestHeadersToAdd_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - responseHeadersToRemove_ = responseHeadersToRemove_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - requestHeadersToRemove_ = requestHeadersToRemove_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpHeaderAction_descriptor; @@ -467,7 +371,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 218425247, requestHeadersToRemove_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -502,7 +406,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getRequestHeadersToRemoveList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -524,7 +428,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResponseHeadersToAddList().equals(other.getResponseHeadersToAddList())) return false; if (!getResponseHeadersToRemoveList().equals(other.getResponseHeadersToRemoveList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -551,7 +455,7 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_HEADERS_TO_REMOVE_FIELD_NUMBER; hash = (53 * hash) + getResponseHeadersToRemoveList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -680,20 +584,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HttpHeaderAction.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) { - getRequestHeadersToAddFieldBuilder(); - getResponseHeadersToAddFieldBuilder(); - } } @java.lang.Override @@ -701,18 +595,20 @@ public Builder clear() { super.clear(); if (requestHeadersToAddBuilder_ == null) { requestHeadersToAdd_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + requestHeadersToAdd_ = null; requestHeadersToAddBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); requestHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); if (responseHeadersToAddBuilder_ == null) { responseHeadersToAdd_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + responseHeadersToAdd_ = null; responseHeadersToAddBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); responseHeadersToRemove_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); return this; @@ -894,7 +790,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpHeaderAction other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -909,17 +805,71 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpHeaderAction 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 257088418: + { + com.google.cloud.compute.v1.HttpHeaderOption m = + input.readMessage( + com.google.cloud.compute.v1.HttpHeaderOption.parser(), extensionRegistry); + if (responseHeadersToAddBuilder_ == null) { + ensureResponseHeadersToAddIsMutable(); + responseHeadersToAdd_.add(m); + } else { + responseHeadersToAddBuilder_.addMessage(m); + } + break; + } // case 257088418 + case 576895794: + { + com.google.cloud.compute.v1.HttpHeaderOption m = + input.readMessage( + com.google.cloud.compute.v1.HttpHeaderOption.parser(), extensionRegistry); + if (requestHeadersToAddBuilder_ == null) { + ensureRequestHeadersToAddIsMutable(); + requestHeadersToAdd_.add(m); + } else { + requestHeadersToAddBuilder_.addMessage(m); + } + break; + } // case 576895794 + case 603326090: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResponseHeadersToRemoveIsMutable(); + responseHeadersToRemove_.add(s); + break; + } // case 603326090 + case 1747401978: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequestHeadersToRemoveIsMutable(); + requestHeadersToRemove_.add(s); + break; + } // case 1747401978 + 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.compute.v1.HttpHeaderAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2053,7 +2003,18 @@ public HttpHeaderAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpHeaderAction(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderMatch.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderMatch.java index 22d567ad6c91..fc0e6302a44e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderMatch.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderMatch.java @@ -56,109 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpHeaderMatch( - 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 539486728: - { - bitField0_ |= 0x00000010; - presentMatch_ = input.readBool(); - break; - } - case 777953818: - { - com.google.cloud.compute.v1.Int64RangeMatch.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = rangeMatch_.toBuilder(); - } - rangeMatch_ = - input.readMessage( - com.google.cloud.compute.v1.Int64RangeMatch.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rangeMatch_); - rangeMatch_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 859102826: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - regexMatch_ = s; - break; - } - case 881788906: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - headerName_ = s; - break; - } - case 2063191746: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - prefixMatch_ = s; - break; - } - case -883057990: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - suffixMatch_ = s; - break; - } - case -633838550: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - exactMatch_ = s; - break; - } - case -285925152: - { - bitField0_ |= 0x00000004; - invertMatch_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpHeaderMatch_descriptor; @@ -649,7 +546,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeBool(501130268, invertMatch_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -682,7 +579,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(501130268, invertMatch_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -730,7 +627,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSuffixMatch()) { if (!getSuffixMatch().equals(other.getSuffixMatch())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -773,7 +670,7 @@ public int hashCode() { hash = (37 * hash) + SUFFIX_MATCH_FIELD_NUMBER; hash = (53 * hash) + getSuffixMatch().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1089,7 +986,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpHeaderMatch other) { suffixMatch_ = other.suffixMatch_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1104,17 +1001,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpHeaderMatch 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 539486728: + { + presentMatch_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 539486728 + case 777953818: + { + input.readMessage(getRangeMatchFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 777953818 + case 859102826: + { + regexMatch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 859102826 + case 881788906: + { + headerName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 881788906 + case 2063191746: + { + prefixMatch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 2063191746 + case -883057990: + { + suffixMatch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -883057990 + case -633838550: + { + exactMatch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -633838550 + case -285925152: + { + invertMatch_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case -285925152 + 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.compute.v1.HttpHeaderMatch) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2073,7 +2032,18 @@ public HttpHeaderMatch parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpHeaderMatch(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderOption.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderOption.java index aad9a7feef4a..e01859c9b8a3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderOption.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpHeaderOption.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpHeaderOption( - 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 166040992: - { - bitField0_ |= 0x00000004; - replace_ = input.readBool(); - break; - } - case 881788906: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - headerName_ = s; - break; - } - case 1624754682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - headerValue_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpHeaderOption_descriptor; @@ -313,7 +253,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 203094335, headerValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -331,7 +271,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(203094335, headerValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReplace()) { if (getReplace() != other.getReplace()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + REPLACE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReplace()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -511,17 +451,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HttpHeaderOption.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 +570,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpHeaderOption other) { if (other.hasReplace()) { setReplace(other.getReplace()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -652,17 +585,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpHeaderOption 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 166040992: + { + replace_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 166040992 + case 881788906: + { + headerName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 881788906 + case 1624754682: + { + headerValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1624754682 + 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.compute.v1.HttpHeaderOption) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1007,7 +972,18 @@ public HttpHeaderOption parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpHeaderOption(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpQueryParameterMatch.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpQueryParameterMatch.java index 7ddb9cf2ebd7..3dd3a638a483 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpQueryParameterMatch.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpQueryParameterMatch.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpQueryParameterMatch( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - name_ = s; - break; - } - case 539486728: - { - bitField0_ |= 0x00000004; - presentMatch_ = input.readBool(); - break; - } - case 859102826: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - regexMatch_ = s; - break; - } - case -633838550: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - exactMatch_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpQueryParameterMatch_descriptor; @@ -388,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 457641093, exactMatch_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -409,7 +342,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(457641093, exactMatch_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -441,7 +374,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRegexMatch()) { if (!getRegexMatch().equals(other.getRegexMatch())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -468,7 +401,7 @@ public int hashCode() { hash = (37 * hash) + REGEX_MATCH_FIELD_NUMBER; hash = (53 * hash) + getRegexMatch().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -597,17 +530,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HttpQueryParameterMatch.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 @@ -735,7 +661,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpQueryParameterMatch oth regexMatch_ = other.regexMatch_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -750,18 +676,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpQueryParameterMatch 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26989658 + case 539486728: + { + presentMatch_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 539486728 + case 859102826: + { + regexMatch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 859102826 + case -633838550: + { + exactMatch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -633838550 + 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.compute.v1.HttpQueryParameterMatch) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1226,7 +1189,18 @@ public HttpQueryParameterMatch parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpQueryParameterMatch(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRedirectAction.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRedirectAction.java index 67c798cdf990..bb3b85698648 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRedirectAction.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRedirectAction.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpRedirectAction( - 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 418277128: - { - bitField0_ |= 0x00000020; - stripQuery_ = input.readBool(); - break; - } - case 859341978: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - hostRedirect_ = s; - break; - } - case 1362085248: - { - bitField0_ |= 0x00000002; - httpsRedirect_ = input.readBool(); - break; - } - case -2116225614: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - pathRedirect_ = s; - break; - } - case -801284030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - redirectResponseCode_ = s; - break; - } - case -725493942: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - prefixRedirect_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpRedirectAction_descriptor; @@ -734,7 +654,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 446184169, prefixRedirect_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -763,7 +683,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(446184169, prefixRedirect_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -803,7 +723,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStripQuery()) { if (getStripQuery() != other.getStripQuery()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -838,7 +758,7 @@ public int hashCode() { hash = (37 * hash) + STRIP_QUERY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getStripQuery()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -967,17 +887,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HttpRedirectAction.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 @@ -1124,7 +1037,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpRedirectAction other) { if (other.hasStripQuery()) { setStripQuery(other.getStripQuery()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1139,17 +1052,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpRedirectAction 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 418277128: + { + stripQuery_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 418277128 + case 859341978: + { + hostRedirect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 859341978 + case 1362085248: + { + httpsRedirect_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 1362085248 + case -2116225614: + { + pathRedirect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -2116225614 + case -801284030: + { + redirectResponseCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -801284030 + case -725493942: + { + prefixRedirect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -725493942 + 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.compute.v1.HttpRedirectAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1807,7 +1770,18 @@ public HttpRedirectAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpRedirectAction(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRetryPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRetryPolicy.java index f69e8533d75e..7baaa4702709 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRetryPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRetryPolicy.java @@ -52,81 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpRetryPolicy( - 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 230524282: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - retryConditions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - retryConditions_.add(s); - break; - } - case 2013441128: - { - bitField0_ |= 0x00000001; - numRetries_ = input.readUInt32(); - break; - } - case -2054638118: - { - com.google.cloud.compute.v1.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = perTryTimeout_.toBuilder(); - } - perTryTimeout_ = - input.readMessage( - com.google.cloud.compute.v1.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(perTryTimeout_); - perTryTimeout_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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_ & 0x00000004) != 0)) { - retryConditions_ = retryConditions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpRetryPolicy_descriptor; @@ -311,7 +236,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(280041147, getPerTryTimeout()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -335,7 +260,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(280041147, getPerTryTimeout()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +285,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPerTryTimeout().equals(other.getPerTryTimeout())) return false; } if (!getRetryConditionsList().equals(other.getRetryConditionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +308,7 @@ public int hashCode() { hash = (37 * hash) + RETRY_CONDITIONS_FIELD_NUMBER; hash = (53 * hash) + getRetryConditionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -652,7 +577,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpRetryPolicy other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -667,17 +592,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpRetryPolicy 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 230524282: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRetryConditionsIsMutable(); + retryConditions_.add(s); + break; + } // case 230524282 + case 2013441128: + { + numRetries_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 2013441128 + case -2054638118: + { + input.readMessage(getPerTryTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -2054638118 + 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.compute.v1.HttpRetryPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1136,7 +1094,18 @@ public HttpRetryPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpRetryPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteAction.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteAction.java index c5f86dc25b65..67091d0e849d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteAction.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteAction.java @@ -51,174 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpRouteAction( - 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 454399306: - { - com.google.cloud.compute.v1.HttpRetryPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = retryPolicy_.toBuilder(); - } - retryPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.HttpRetryPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(retryPolicy_); - retryPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 491427010: - { - com.google.cloud.compute.v1.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = maxStreamDuration_.toBuilder(); - } - maxStreamDuration_ = - input.readMessage( - com.google.cloud.compute.v1.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxStreamDuration_); - maxStreamDuration_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 1761574930: - { - com.google.cloud.compute.v1.RequestMirrorPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = requestMirrorPolicy_.toBuilder(); - } - requestMirrorPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.RequestMirrorPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(requestMirrorPolicy_); - requestMirrorPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case -2108295710: - { - com.google.cloud.compute.v1.UrlRewrite.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = urlRewrite_.toBuilder(); - } - urlRewrite_ = - input.readMessage( - com.google.cloud.compute.v1.UrlRewrite.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlRewrite_); - urlRewrite_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case -1921357046: - { - com.google.cloud.compute.v1.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = timeout_.toBuilder(); - } - timeout_ = - input.readMessage( - com.google.cloud.compute.v1.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(timeout_); - timeout_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case -1598742902: - { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - weightedBackendServices_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - weightedBackendServices_.add( - input.readMessage( - com.google.cloud.compute.v1.WeightedBackendService.parser(), - extensionRegistry)); - break; - } - case -1103417310: - { - com.google.cloud.compute.v1.CorsPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = corsPolicy_.toBuilder(); - } - corsPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.CorsPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(corsPolicy_); - corsPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -992718662: - { - com.google.cloud.compute.v1.HttpFaultInjection.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = faultInjectionPolicy_.toBuilder(); - } - faultInjectionPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.HttpFaultInjection.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(faultInjectionPolicy_); - faultInjectionPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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_ & 0x00000080) != 0)) { - weightedBackendServices_ = java.util.Collections.unmodifiableList(weightedBackendServices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpRouteAction_descriptor; @@ -709,7 +541,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(412781079, getFaultInjectionPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -750,7 +582,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 412781079, getFaultInjectionPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -796,7 +628,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getWeightedBackendServicesList().equals(other.getWeightedBackendServicesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -839,7 +671,7 @@ public int hashCode() { hash = (37 * hash) + WEIGHTED_BACKEND_SERVICES_FIELD_NUMBER; hash = (53 * hash) + getWeightedBackendServicesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1036,10 +868,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000040); if (weightedBackendServicesBuilder_ == null) { weightedBackendServices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); } else { + weightedBackendServices_ = null; weightedBackendServicesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -1233,7 +1066,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpRouteAction other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1248,17 +1081,90 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpRouteAction 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 454399306: + { + input.readMessage(getRetryPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 454399306 + case 491427010: + { + input.readMessage( + getMaxStreamDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 491427010 + case 1761574930: + { + input.readMessage( + getRequestMirrorPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 1761574930 + case -2108295710: + { + input.readMessage(getUrlRewriteFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case -2108295710 + case -1921357046: + { + input.readMessage(getTimeoutFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case -1921357046 + case -1598742902: + { + com.google.cloud.compute.v1.WeightedBackendService m = + input.readMessage( + com.google.cloud.compute.v1.WeightedBackendService.parser(), + extensionRegistry); + if (weightedBackendServicesBuilder_ == null) { + ensureWeightedBackendServicesIsMutable(); + weightedBackendServices_.add(m); + } else { + weightedBackendServicesBuilder_.addMessage(m); + } + break; + } // case -1598742902 + case -1103417310: + { + input.readMessage(getCorsPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -1103417310 + case -992718662: + { + input.readMessage( + getFaultInjectionPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -992718662 + 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.compute.v1.HttpRouteAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3043,7 +2949,18 @@ public HttpRouteAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpRouteAction(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteRule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteRule.java index b7be1e090e20..360b9b7fc4fc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteRule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteRule.java @@ -54,129 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpRouteRule( - 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 -1670348478: - { - com.google.cloud.compute.v1.HttpHeaderAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = headerAction_.toBuilder(); - } - headerAction_ = - input.readMessage( - com.google.cloud.compute.v1.HttpHeaderAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(headerAction_); - headerAction_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - service_ = s; - break; - } - case -1285361686: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - matchRules_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - matchRules_.add( - input.readMessage( - com.google.cloud.compute.v1.HttpRouteRuleMatch.parser(), extensionRegistry)); - break; - } - case -1053784734: - { - com.google.cloud.compute.v1.HttpRedirectAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = urlRedirect_.toBuilder(); - } - urlRedirect_ = - input.readMessage( - com.google.cloud.compute.v1.HttpRedirectAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlRedirect_); - urlRedirect_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - description_ = s; - break; - } - case -898455710: - { - com.google.cloud.compute.v1.HttpRouteAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = routeAction_.toBuilder(); - } - routeAction_ = - input.readMessage( - com.google.cloud.compute.v1.HttpRouteAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(routeAction_); - routeAction_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case -733754080: - { - bitField0_ |= 0x00000004; - priority_ = 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 { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - matchRules_ = java.util.Collections.unmodifiableList(matchRules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpRouteRule_descriptor; @@ -608,7 +485,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeInt32(445151652, priority_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -640,7 +517,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(445151652, priority_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -681,7 +558,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlRedirect()) { if (!getUrlRedirect().equals(other.getUrlRedirect())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -720,7 +597,7 @@ public int hashCode() { hash = (37 * hash) + URL_REDIRECT_FIELD_NUMBER; hash = (53 * hash) + getUrlRedirect().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -880,10 +757,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (matchRulesBuilder_ == null) { matchRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + matchRules_ = null; matchRulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); priority_ = 0; bitField0_ = (bitField0_ & ~0x00000008); if (routeActionBuilder_ == null) { @@ -1073,7 +951,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpRouteRule other) { if (other.hasUrlRedirect()) { mergeUrlRedirect(other.getUrlRedirect()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1088,17 +966,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpRouteRule 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 -1670348478: + { + input.readMessage(getHeaderActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1670348478 + case -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -1306643030 + case -1285361686: + { + com.google.cloud.compute.v1.HttpRouteRuleMatch m = + input.readMessage( + com.google.cloud.compute.v1.HttpRouteRuleMatch.parser(), extensionRegistry); + if (matchRulesBuilder_ == null) { + ensureMatchRulesIsMutable(); + matchRules_.add(m); + } else { + matchRulesBuilder_.addMessage(m); + } + break; + } // case -1285361686 + case -1053784734: + { + input.readMessage(getUrlRedirectFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case -1053784734 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -911466526 + case -898455710: + { + input.readMessage(getRouteActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case -898455710 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case -733754080 + 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.compute.v1.HttpRouteRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2357,7 +2298,18 @@ public HttpRouteRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpRouteRule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteRuleMatch.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteRuleMatch.java index 75590adb7b55..800107864d20 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteRuleMatch.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/HttpRouteRuleMatch.java @@ -57,119 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private HttpRouteRuleMatch( - 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 859102826: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - regexMatch_ = s; - break; - } - case 1716791002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - fullPathMatch_ = s; - break; - } - case 2063191746: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - prefixMatch_ = s; - break; - } - case -2005117134: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - queryParameterMatches_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - queryParameterMatches_.add( - input.readMessage( - com.google.cloud.compute.v1.HttpQueryParameterMatch.parser(), - extensionRegistry)); - break; - } - case -1399739382: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - headerMatches_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - headerMatches_.add( - input.readMessage( - com.google.cloud.compute.v1.HttpHeaderMatch.parser(), extensionRegistry)); - break; - } - case -580367384: - { - bitField0_ |= 0x00000002; - ignoreCase_ = input.readBool(); - break; - } - case -577161382: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - metadataFilters_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - metadataFilters_.add( - input.readMessage( - com.google.cloud.compute.v1.MetadataFilter.parser(), extensionRegistry)); - 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_ & 0x00000020) != 0)) { - queryParameterMatches_ = java.util.Collections.unmodifiableList(queryParameterMatches_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - headerMatches_ = java.util.Collections.unmodifiableList(headerMatches_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - metadataFilters_ = java.util.Collections.unmodifiableList(metadataFilters_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_HttpRouteRuleMatch_descriptor; @@ -667,7 +554,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < metadataFilters_.size(); i++) { output.writeMessage(464725739, metadataFilters_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -703,7 +590,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 464725739, metadataFilters_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -738,7 +625,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRegexMatch()) { if (!getRegexMatch().equals(other.getRegexMatch())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -777,7 +664,7 @@ public int hashCode() { hash = (37 * hash) + REGEX_MATCH_FIELD_NUMBER; hash = (53 * hash) + getRegexMatch().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -906,21 +793,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.HttpRouteRuleMatch.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) { - getHeaderMatchesFieldBuilder(); - getMetadataFiltersFieldBuilder(); - getQueryParameterMatchesFieldBuilder(); - } } @java.lang.Override @@ -930,26 +806,29 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (headerMatchesBuilder_ == null) { headerMatches_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + headerMatches_ = null; headerMatchesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); ignoreCase_ = false; bitField0_ = (bitField0_ & ~0x00000004); if (metadataFiltersBuilder_ == null) { metadataFilters_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + metadataFilters_ = null; metadataFiltersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); prefixMatch_ = ""; bitField0_ = (bitField0_ & ~0x00000010); if (queryParameterMatchesBuilder_ == null) { queryParameterMatches_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); } else { + queryParameterMatches_ = null; queryParameterMatchesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000020); regexMatch_ = ""; bitField0_ = (bitField0_ & ~0x00000040); return this; @@ -1173,7 +1052,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.HttpRouteRuleMatch other) { regexMatch_ = other.regexMatch_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1188,17 +1067,95 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.HttpRouteRuleMatch 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 859102826: + { + regexMatch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 859102826 + case 1716791002: + { + fullPathMatch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1716791002 + case 2063191746: + { + prefixMatch_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 2063191746 + case -2005117134: + { + com.google.cloud.compute.v1.HttpQueryParameterMatch m = + input.readMessage( + com.google.cloud.compute.v1.HttpQueryParameterMatch.parser(), + extensionRegistry); + if (queryParameterMatchesBuilder_ == null) { + ensureQueryParameterMatchesIsMutable(); + queryParameterMatches_.add(m); + } else { + queryParameterMatchesBuilder_.addMessage(m); + } + break; + } // case -2005117134 + case -1399739382: + { + com.google.cloud.compute.v1.HttpHeaderMatch m = + input.readMessage( + com.google.cloud.compute.v1.HttpHeaderMatch.parser(), extensionRegistry); + if (headerMatchesBuilder_ == null) { + ensureHeaderMatchesIsMutable(); + headerMatches_.add(m); + } else { + headerMatchesBuilder_.addMessage(m); + } + break; + } // case -1399739382 + case -580367384: + { + ignoreCase_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case -580367384 + case -577161382: + { + com.google.cloud.compute.v1.MetadataFilter m = + input.readMessage( + com.google.cloud.compute.v1.MetadataFilter.parser(), extensionRegistry); + if (metadataFiltersBuilder_ == null) { + ensureMetadataFiltersIsMutable(); + metadataFilters_.add(m); + } else { + metadataFiltersBuilder_.addMessage(m); + } + break; + } // case -577161382 + 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.compute.v1.HttpRouteRuleMatch) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2773,7 +2730,18 @@ public HttpRouteRuleMatch parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HttpRouteRuleMatch(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Image.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Image.java index 4f5993194e2b..0b52197d8690 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Image.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Image.java @@ -71,378 +71,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Image( - 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 26840: - { - bitField0_ |= 0x00000080; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - creationTimestamp_ = s; - break; - } - case 363861312: - { - if (!((mutable_bitField0_ & 0x00002000) != 0)) { - licenseCodes_ = newLongList(); - mutable_bitField0_ |= 0x00002000; - } - licenseCodes_.addLong(input.readInt64()); - break; - } - case 363861314: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00002000) != 0) && input.getBytesUntilLimit() > 0) { - licenseCodes_ = newLongList(); - mutable_bitField0_ |= 0x00002000; - } - while (input.getBytesUntilLimit() > 0) { - licenseCodes_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 403546554: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; - sourceImage_ = s; - break; - } - case 442626330: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00200000; - sourceImageId_ = s; - break; - } - case 634356362: - { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - guestOsFeatures_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - guestOsFeatures_.add( - input.readMessage( - com.google.cloud.compute.v1.GuestOsFeature.parser(), extensionRegistry)); - break; - } - case 791698066: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x01000000; - sourceSnapshotId_ = s; - break; - } - case 1008495426: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00400000; - sourceSnapshot_ = s; - break; - } - case 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - labelFingerprint_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x04000000; - status_ = s; - break; - } - case 1538854938: - { - com.google.cloud.compute.v1.InitialStateConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00008000) != 0)) { - subBuilder = shieldedInstanceInitialState_.toBuilder(); - } - shieldedInstanceInitialState_ = - input.readMessage( - com.google.cloud.compute.v1.InitialStateConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shieldedInstanceInitialState_); - shieldedInstanceInitialState_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00008000; - break; - } - case -1872541030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - architecture_ = s; - break; - } - case -1865532718: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00800000) != 0)) { - subBuilder = sourceSnapshotEncryptionKey_.toBuilder(); - } - sourceSnapshotEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceSnapshotEncryptionKey_); - sourceSnapshotEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00800000; - break; - } - case -1764857416: - { - bitField0_ |= 0x00000020; - diskSizeGb_ = input.readInt64(); - break; - } - case -1670925102: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x80000000) != 0)) { - storageLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x80000000; - } - storageLocations_.add(s); - break; - } - case -1664951518: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - family_ = s; - break; - } - case -1593826670: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00004000) != 0)) { - licenses_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00004000; - } - licenses_.add(s); - break; - } - case -1258866630: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = imageEncryptionKey_.toBuilder(); - } - imageEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageEncryptionKey_); - imageEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case -1246219696: - { - bitField0_ |= 0x00000002; - archiveSizeBytes_ = input.readInt64(); - break; - } - case -1242938022: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00100000) != 0)) { - subBuilder = sourceImageEncryptionKey_.toBuilder(); - } - sourceImageEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceImageEncryptionKey_); - sourceImageEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00100000; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - description_ = s; - break; - } - case -680936950: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - sourceDisk_ = s; - break; - } - case -677001486: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x02000000; - sourceType_ = s; - break; - } - case -661440822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; - sourceDiskId_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - selfLink_ = s; - break; - } - case -447253160: - { - bitField0_ |= 0x00002000; - satisfiesPzs_ = input.readBool(); - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00001000; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case -270058846: - { - com.google.cloud.compute.v1.RawDisk.Builder subBuilder = null; - if (((bitField0_ & 0x00001000) != 0)) { - subBuilder = rawDisk_.toBuilder(); - } - rawDisk_ = - input.readMessage( - com.google.cloud.compute.v1.RawDisk.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rawDisk_); - rawDisk_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00001000; - break; - } - case -173855334: - { - com.google.cloud.compute.v1.DeprecationStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = deprecated_.toBuilder(); - } - deprecated_ = - input.readMessage( - com.google.cloud.compute.v1.DeprecationStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deprecated_); - deprecated_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case -42958070: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00020000) != 0)) { - subBuilder = sourceDiskEncryptionKey_.toBuilder(); - } - sourceDiskEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceDiskEncryptionKey_); - sourceDiskEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00020000; - 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_ & 0x00002000) != 0)) { - licenseCodes_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_); - } - if (((mutable_bitField0_ & 0x80000000) != 0)) { - storageLocations_ = storageLocations_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00004000) != 0)) { - licenses_ = licenses_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Image_descriptor; @@ -2966,7 +2594,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00020000) != 0)) { output.writeMessage(531501153, getSourceDiskEncryptionKey()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3112,7 +2740,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 531501153, getSourceDiskEncryptionKey()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3242,7 +2870,7 @@ public boolean equals(final java.lang.Object obj) { if (!getStatus().equals(other.getStatus())) return false; } if (!getStorageLocationsList().equals(other.getStorageLocationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3381,7 +3009,7 @@ public int hashCode() { hash = (37 * hash) + STORAGE_LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getStorageLocationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3574,10 +3202,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000040); if (guestOsFeaturesBuilder_ == null) { guestOsFeatures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); } else { + guestOsFeatures_ = null; guestOsFeaturesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000080); id_ = 0L; bitField0_ = (bitField0_ & ~0x00000100); if (imageEncryptionKeyBuilder_ == null) { @@ -4060,7 +3689,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Image other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4075,17 +3704,254 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Image 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 244202930 + case 363861312: + { + long v = input.readInt64(); + ensureLicenseCodesIsMutable(); + licenseCodes_.addLong(v); + break; + } // case 363861312 + case 363861314: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureLicenseCodesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + licenseCodes_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 363861314 + case 403546554: + { + sourceImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case 403546554 + case 442626330: + { + sourceImageId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case 442626330 + case 634356362: + { + com.google.cloud.compute.v1.GuestOsFeature m = + input.readMessage( + com.google.cloud.compute.v1.GuestOsFeature.parser(), extensionRegistry); + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(m); + } else { + guestOsFeaturesBuilder_.addMessage(m); + } + break; + } // case 634356362 + case 791698066: + { + sourceSnapshotId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x10000000; + break; + } // case 791698066 + case 1008495426: + { + sourceSnapshot_ = input.readStringRequireUtf8(); + bitField0_ |= 0x04000000; + break; + } // case 1008495426 + case 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1424998602 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case 1450082194 + case 1538854938: + { + input.readMessage( + getShieldedInstanceInitialStateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 1538854938 + case -1872541030: + { + architecture_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1872541030 + case -1865532718: + { + input.readMessage( + getSourceSnapshotEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x08000000; + break; + } // case -1865532718 + case -1764857416: + { + diskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000020; + break; + } // case -1764857416 + case -1670925102: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureStorageLocationsIsMutable(); + storageLocations_.add(s); + break; + } // case -1670925102 + case -1664951518: + { + family_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -1664951518 + case -1593826670: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicensesIsMutable(); + licenses_.add(s); + break; + } // case -1593826670 + case -1258866630: + { + input.readMessage( + getImageEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case -1258866630 + case -1246219696: + { + archiveSizeBytes_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case -1246219696 + case -1242938022: + { + input.readMessage( + getSourceImageEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x01000000; + break; + } // case -1242938022 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -911466526 + case -680936950: + { + sourceDisk_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00100000; + break; + } // case -680936950 + case -677001486: + { + sourceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x20000000; + break; + } // case -677001486 + case -661440822: + { + sourceDiskId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case -661440822 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case -645248918 + case -447253160: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00020000; + break; + } // case -447253160 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + case -270058846: + { + input.readMessage(getRawDiskFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case -270058846 + case -173855334: + { + input.readMessage(getDeprecatedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -173855334 + case -42958070: + { + input.readMessage( + getSourceDiskEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case -42958070 + 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.compute.v1.Image) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8729,7 +8595,18 @@ public Image parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Image(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ImageFamilyView.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ImageFamilyView.java index a8d9aa9fcb52..3cec3e8f8e68 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ImageFamilyView.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ImageFamilyView.java @@ -49,61 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImageFamilyView( - 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 802507482: - { - com.google.cloud.compute.v1.Image.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = image_.toBuilder(); - } - image_ = - input.readMessage(com.google.cloud.compute.v1.Image.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(image_); - image_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ImageFamilyView_descriptor; @@ -183,7 +128,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(100313435, getImage()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +140,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(100313435, getImage()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -215,7 +160,7 @@ public boolean equals(final java.lang.Object obj) { if (hasImage()) { if (!getImage().equals(other.getImage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -230,7 +175,7 @@ public int hashCode() { hash = (37 * hash) + IMAGE_FIELD_NUMBER; hash = (53 * hash) + getImage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -472,7 +417,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ImageFamilyView other) { if (other.hasImage()) { mergeImage(other.getImage()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -487,17 +432,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ImageFamilyView 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 802507482: + { + input.readMessage(getImageFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 802507482 + 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.compute.v1.ImageFamilyView) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -715,7 +680,18 @@ public ImageFamilyView parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageFamilyView(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ImageList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ImageList.java index 8968e1a6e7d3..e6973c54e8c1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ImageList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ImageList.java @@ -56,103 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImageList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage(com.google.cloud.compute.v1.Image.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ImageList_descriptor; @@ -572,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -635,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -670,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -821,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -999,7 +903,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ImageList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1014,17 +918,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ImageList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Image m = + input.readMessage( + com.google.cloud.compute.v1.Image.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.ImageList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2074,7 +2035,18 @@ public ImageList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InitialStateConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InitialStateConfig.java index 49c633bf7bd2..63399d37d0d9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InitialStateConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InitialStateConfig.java @@ -54,104 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InitialStateConfig( - 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 28634: - { - com.google.cloud.compute.v1.FileContentBuffer.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = pk_.toBuilder(); - } - pk_ = - input.readMessage( - com.google.cloud.compute.v1.FileContentBuffer.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(pk_); - pk_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 794026: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - dbs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - dbs_.add( - input.readMessage( - com.google.cloud.compute.v1.FileContentBuffer.parser(), extensionRegistry)); - break; - } - case 24616906: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - dbxs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - dbxs_.add( - input.readMessage( - com.google.cloud.compute.v1.FileContentBuffer.parser(), extensionRegistry)); - break; - } - case 26305042: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - keks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - keks_.add( - input.readMessage( - com.google.cloud.compute.v1.FileContentBuffer.parser(), extensionRegistry)); - 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)) { - dbs_ = java.util.Collections.unmodifiableList(dbs_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - dbxs_ = java.util.Collections.unmodifiableList(dbxs_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - keks_ = java.util.Collections.unmodifiableList(keks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InitialStateConfig_descriptor; @@ -447,7 +349,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < keks_.size(); i++) { output.writeMessage(3288130, keks_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -468,7 +370,7 @@ public int getSerializedSize() { for (int i = 0; i < keks_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3288130, keks_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -491,7 +393,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPk()) { if (!getPk().equals(other.getPk())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -518,7 +420,7 @@ public int hashCode() { hash = (37 * hash) + PK_FIELD_NUMBER; hash = (53 * hash) + getPk().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -670,22 +572,25 @@ public Builder clear() { super.clear(); if (dbsBuilder_ == null) { dbs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + dbs_ = null; dbsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (dbxsBuilder_ == null) { dbxs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + dbxs_ = null; dbxsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (keksBuilder_ == null) { keks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + keks_ = null; keksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (pkBuilder_ == null) { pk_ = null; } else { @@ -890,7 +795,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InitialStateConfig other) { if (other.hasPk()) { mergePk(other.getPk()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -905,17 +810,76 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InitialStateConfig 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 28634: + { + input.readMessage(getPkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 28634 + case 794026: + { + com.google.cloud.compute.v1.FileContentBuffer m = + input.readMessage( + com.google.cloud.compute.v1.FileContentBuffer.parser(), extensionRegistry); + if (dbsBuilder_ == null) { + ensureDbsIsMutable(); + dbs_.add(m); + } else { + dbsBuilder_.addMessage(m); + } + break; + } // case 794026 + case 24616906: + { + com.google.cloud.compute.v1.FileContentBuffer m = + input.readMessage( + com.google.cloud.compute.v1.FileContentBuffer.parser(), extensionRegistry); + if (dbxsBuilder_ == null) { + ensureDbxsIsMutable(); + dbxs_.add(m); + } else { + dbxsBuilder_.addMessage(m); + } + break; + } // case 24616906 + case 26305042: + { + com.google.cloud.compute.v1.FileContentBuffer m = + input.readMessage( + com.google.cloud.compute.v1.FileContentBuffer.parser(), extensionRegistry); + if (keksBuilder_ == null) { + ensureKeksIsMutable(); + keks_.add(m); + } else { + keksBuilder_.addMessage(m); + } + break; + } // case 26305042 + 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.compute.v1.InitialStateConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2186,7 +2150,18 @@ public InitialStateConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InitialStateConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertAddressRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertAddressRequest.java index dc6c36046993..17429406e005 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertAddressRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertAddressRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertAddressRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -423862326: - { - com.google.cloud.compute.v1.Address.Builder subBuilder = null; - if (addressResource_ != null) { - subBuilder = addressResource_.toBuilder(); - } - addressResource_ = - input.readMessage( - com.google.cloud.compute.v1.Address.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addressResource_); - addressResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertAddressRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (addressResource_ != null) { output.writeMessage(483888121, getAddressResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -419,7 +342,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(483888121, getAddressResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -445,7 +368,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -468,7 +391,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -597,17 +520,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertAddressRequest.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 @@ -732,7 +648,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertAddressRequest other) requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -747,17 +663,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertAddressRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -423862326: + { + input.readMessage(getAddressResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -423862326 + 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.compute.v1.InsertAddressRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1350,7 +1304,18 @@ public InsertAddressRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertAddressRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertAutoscalerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertAutoscalerRequest.java index b57586b82038..5f9f16aaba42 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertAutoscalerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertAutoscalerRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertAutoscalerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1660928946: - { - com.google.cloud.compute.v1.Autoscaler.Builder subBuilder = null; - if (autoscalerResource_ != null) { - subBuilder = autoscalerResource_.toBuilder(); - } - autoscalerResource_ = - input.readMessage( - com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalerResource_); - autoscalerResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertAutoscalerRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -598,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertAutoscalerRequest.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 @@ -733,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertAutoscalerRequest oth zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,18 +664,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertAutoscalerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1660928946: + { + input.readMessage( + getAutoscalerResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1660928946 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertAutoscalerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1353,7 +1307,18 @@ public InsertAutoscalerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertAutoscalerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertBackendBucketRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertBackendBucketRequest.java index b96c86f37445..1771619f3106 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertBackendBucketRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertBackendBucketRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertBackendBucketRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1248905022: - { - com.google.cloud.compute.v1.BackendBucket.Builder subBuilder = null; - if (backendBucketResource_ != null) { - subBuilder = backendBucketResource_.toBuilder(); - } - backendBucketResource_ = - input.readMessage( - com.google.cloud.compute.v1.BackendBucket.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backendBucketResource_); - backendBucketResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertBackendBucketRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backendBucketResource_ != null) { output.writeMessage(380757784, getBackendBucketResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +283,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 380757784, getBackendBucketResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -399,7 +329,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -529,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertBackendBucketRequest.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 @@ -657,7 +580,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertBackendBucketRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -672,18 +595,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertBackendBucketRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1248905022: + { + input.readMessage( + getBackendBucketResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1248905022 + 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.compute.v1.InsertBackendBucketRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1161,7 +1116,18 @@ public InsertBackendBucketRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertBackendBucketRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertBackendServiceRequest.java index a9696ccadcfd..8f9f3ec15651 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertBackendServiceRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1514273510: - { - com.google.cloud.compute.v1.BackendService.Builder subBuilder = null; - if (backendServiceResource_ != null) { - subBuilder = backendServiceResource_.toBuilder(); - } - backendServiceResource_ = - input.readMessage( - com.google.cloud.compute.v1.BackendService.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backendServiceResource_); - backendServiceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertBackendServiceRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backendServiceResource_ != null) { output.writeMessage(347586723, getBackendServiceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +283,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 347586723, getBackendServiceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -399,7 +329,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -529,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertBackendServiceRequest.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 @@ -657,7 +580,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertBackendServiceRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -672,18 +595,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1514273510: + { + input.readMessage( + getBackendServiceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1514273510 + 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.compute.v1.InsertBackendServiceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1162,7 +1117,18 @@ public InsertBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertDiskRequest.java index dde6e094bb27..86dd5ea80060 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertDiskRequest.java @@ -55,89 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertDiskRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 207045506: - { - com.google.cloud.compute.v1.Disk.Builder subBuilder = null; - if (diskResource_ != null) { - subBuilder = diskResource_.toBuilder(); - } - diskResource_ = - input.readMessage(com.google.cloud.compute.v1.Disk.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diskResource_); - diskResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 403546554: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - sourceImage_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertDiskRequest_descriptor; @@ -471,7 +388,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -495,7 +412,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -525,7 +442,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceImage().equals(other.getSourceImage())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -552,7 +469,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -681,17 +598,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertDiskRequest.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 @@ -826,7 +736,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertDiskRequest other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -841,17 +751,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertDiskRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 207045506: + { + input.readMessage(getDiskResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 207045506 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 403546554: + { + sourceImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 403546554 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1564,7 +1518,18 @@ public InsertDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertExternalVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertExternalVpnGatewayRequest.java index d05a4d47835d..5000227ec79b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertExternalVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertExternalVpnGatewayRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertExternalVpnGatewayRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -400458686: - { - com.google.cloud.compute.v1.ExternalVpnGateway.Builder subBuilder = null; - if (externalVpnGatewayResource_ != null) { - subBuilder = externalVpnGatewayResource_.toBuilder(); - } - externalVpnGatewayResource_ = - input.readMessage( - com.google.cloud.compute.v1.ExternalVpnGateway.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(externalVpnGatewayResource_); - externalVpnGatewayResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertExternalVpnGatewayRequest_descriptor; @@ -335,7 +265,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (externalVpnGatewayResource_ != null) { output.writeMessage(486813576, getExternalVpnGatewayResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -355,7 +285,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 486813576, getExternalVpnGatewayResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -381,7 +311,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -402,7 +332,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -532,17 +462,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertExternalVpnGatewayRequest.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 @@ -660,7 +583,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertExternalVpnGatewayReq requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -675,18 +598,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertExternalVpnGatewayRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -400458686: + { + input.readMessage( + getExternalVpnGatewayResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -400458686 + 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.compute.v1.InsertExternalVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1168,7 +1123,18 @@ public InsertExternalVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertExternalVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertFirewallPolicyRequest.java index 886ef3cfce58..dc6077c6402b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertFirewallPolicyRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case -617249150: - { - java.lang.String s = input.readStringRequireUtf8(); - - parentId_ = s; - break; - } - case -334571038: - { - com.google.cloud.compute.v1.FirewallPolicy.Builder subBuilder = null; - if (firewallPolicyResource_ != null) { - subBuilder = firewallPolicyResource_.toBuilder(); - } - firewallPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyResource_); - firewallPolicyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertFirewallPolicyRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (firewallPolicyResource_ != null) { output.writeMessage(495049532, getFirewallPolicyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +283,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 495049532, getFirewallPolicyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -399,7 +329,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -529,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertFirewallPolicyRequest.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 @@ -657,7 +580,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertFirewallPolicyRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -672,18 +595,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case -617249150: + { + parentId_ = input.readStringRequireUtf8(); + + break; + } // case -617249150 + case -334571038: + { + input.readMessage( + getFirewallPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -334571038 + 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.compute.v1.InsertFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1162,7 +1117,18 @@ public InsertFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertFirewallRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertFirewallRequest.java index 0c6beeb511cb..d8ca0629df3b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertFirewallRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertFirewallRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertFirewallRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 331400042: - { - com.google.cloud.compute.v1.Firewall.Builder subBuilder = null; - if (firewallResource_ != null) { - subBuilder = firewallResource_.toBuilder(); - } - firewallResource_ = - input.readMessage( - com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallResource_); - firewallResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertFirewallRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -352,7 +282,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -377,7 +307,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -398,7 +328,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -527,17 +457,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertFirewallRequest.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 @@ -655,7 +578,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertFirewallRequest other requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -670,18 +593,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertFirewallRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 331400042: + { + input.readMessage( + getFirewallResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 331400042 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertFirewallRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1159,7 +1114,18 @@ public InsertFirewallRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertFirewallRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertForwardingRuleRequest.java index 152685cbcd42..29885baa6be2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertForwardingRuleRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertForwardingRuleRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1885273734: - { - com.google.cloud.compute.v1.ForwardingRule.Builder subBuilder = null; - if (forwardingRuleResource_ != null) { - subBuilder = forwardingRuleResource_.toBuilder(); - } - forwardingRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.ForwardingRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(forwardingRuleResource_); - forwardingRuleResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertForwardingRuleRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (forwardingRuleResource_ != null) { output.writeMessage(301211695, getForwardingRuleResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 301211695, getForwardingRuleResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertForwardingRuleRequest.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 @@ -734,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertForwardingRuleRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +665,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertForwardingRuleRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1885273734: + { + input.readMessage( + getForwardingRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1885273734 + 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.compute.v1.InsertForwardingRuleRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1355,7 +1309,18 @@ public InsertForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalAddressRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalAddressRequest.java index 3f88c48c7e2a..57286cce8a5d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalAddressRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalAddressRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertGlobalAddressRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -423862326: - { - com.google.cloud.compute.v1.Address.Builder subBuilder = null; - if (addressResource_ != null) { - subBuilder = addressResource_.toBuilder(); - } - addressResource_ = - input.readMessage( - com.google.cloud.compute.v1.Address.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addressResource_); - addressResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertGlobalAddressRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (addressResource_ != null) { output.writeMessage(483888121, getAddressResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -352,7 +282,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(483888121, getAddressResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -377,7 +307,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -398,7 +328,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -528,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertGlobalAddressRequest.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 @@ -656,7 +579,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertGlobalAddressRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -671,18 +594,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertGlobalAddressRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -423862326: + { + input.readMessage(getAddressResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -423862326 + 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.compute.v1.InsertGlobalAddressRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1159,7 +1113,18 @@ public InsertGlobalAddressRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertGlobalAddressRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalForwardingRuleRequest.java index 701dda960184..229c5f1d63fa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalForwardingRuleRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertGlobalForwardingRuleRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1885273734: - { - com.google.cloud.compute.v1.ForwardingRule.Builder subBuilder = null; - if (forwardingRuleResource_ != null) { - subBuilder = forwardingRuleResource_.toBuilder(); - } - forwardingRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.ForwardingRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(forwardingRuleResource_); - forwardingRuleResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertGlobalForwardingRuleRequest_descriptor; @@ -334,7 +264,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (forwardingRuleResource_ != null) { output.writeMessage(301211695, getForwardingRuleResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +284,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 301211695, getForwardingRuleResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -379,7 +309,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -400,7 +330,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +460,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest.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 @@ -660,7 +583,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertGlobalForwardingRuleR requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -675,19 +598,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertGlobalForwardingRuleRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1885273734: + { + input.readMessage( + getForwardingRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1885273734 + 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.compute.v1.InsertGlobalForwardingRuleRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1167,7 +1121,18 @@ public InsertGlobalForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertGlobalForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalNetworkEndpointGroupRequest.java index cdf2925c31b1..c40c0a4543f1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalNetworkEndpointGroupRequest.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertGlobalNetworkEndpointGroupRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -88656582: - { - com.google.cloud.compute.v1.NetworkEndpointGroup.Builder subBuilder = null; - if (networkEndpointGroupResource_ != null) { - subBuilder = networkEndpointGroupResource_.toBuilder(); - } - networkEndpointGroupResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkEndpointGroupResource_); - networkEndpointGroupResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertGlobalNetworkEndpointGroupRequest_descriptor; @@ -336,7 +266,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (networkEndpointGroupResource_ != null) { output.writeMessage(525788839, getNetworkEndpointGroupResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -356,7 +286,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 525788839, getNetworkEndpointGroupResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -382,7 +312,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -403,7 +333,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -535,17 +465,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest.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 @@ -668,7 +591,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -683,19 +606,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertGlobalNetworkEndpointGroupRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -88656582: + { + input.readMessage( + getNetworkEndpointGroupResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -88656582 + 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.compute.v1.InsertGlobalNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1180,7 +1134,18 @@ public InsertGlobalNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertGlobalNetworkEndpointGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalPublicDelegatedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalPublicDelegatedPrefixeRequest.java index 131f1566e5e4..4d71781ea3ca 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalPublicDelegatedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertGlobalPublicDelegatedPrefixeRequest.java @@ -55,77 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertGlobalPublicDelegatedPrefixeRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 380756010: - { - com.google.cloud.compute.v1.PublicDelegatedPrefix.Builder subBuilder = null; - if (publicDelegatedPrefixResource_ != null) { - subBuilder = publicDelegatedPrefixResource_.toBuilder(); - } - publicDelegatedPrefixResource_ = - input.readMessage( - com.google.cloud.compute.v1.PublicDelegatedPrefix.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(publicDelegatedPrefixResource_); - publicDelegatedPrefixResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertGlobalPublicDelegatedPrefixeRequest_descriptor; @@ -337,7 +266,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -357,7 +286,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -384,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -405,7 +334,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -537,17 +466,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest.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 @@ -670,7 +592,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -685,19 +607,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 380756010: + { + input.readMessage( + getPublicDelegatedPrefixResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 380756010 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertGlobalPublicDelegatedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1184,7 +1137,19 @@ public InsertGlobalPublicDelegatedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertGlobalPublicDelegatedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertHealthCheckRequest.java index 383abe402a86..39ecc212324a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertHealthCheckRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertHealthCheckRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1615400258: - { - com.google.cloud.compute.v1.HealthCheck.Builder subBuilder = null; - if (healthCheckResource_ != null) { - subBuilder = healthCheckResource_.toBuilder(); - } - healthCheckResource_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(healthCheckResource_); - healthCheckResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertHealthCheckRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +283,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -399,7 +329,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -528,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertHealthCheckRequest.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 @@ -656,7 +579,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertHealthCheckRequest ot requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -671,18 +594,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertHealthCheckRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1615400258: + { + input.readMessage( + getHealthCheckResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1615400258 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1160,7 +1115,18 @@ public InsertHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertImageRequest.java index 045d7fa40c3f..7ddbf097e1c9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertImageRequest.java @@ -53,81 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertImageRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1581786752: - { - bitField0_ |= 0x00000001; - forceCreate_ = input.readBool(); - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1325591662: - { - com.google.cloud.compute.v1.Image.Builder subBuilder = null; - if (imageResource_ != null) { - subBuilder = imageResource_.toBuilder(); - } - imageResource_ = - input.readMessage(com.google.cloud.compute.v1.Image.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageResource_); - imageResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertImageRequest_descriptor; @@ -374,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (imageResource_ != null) { output.writeMessage(371171954, getImageResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -396,7 +321,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(371171954, getImageResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -425,7 +350,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -450,7 +375,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +504,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertImageRequest.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 @@ -715,7 +633,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertImageRequest other) { requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -730,17 +648,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertImageRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1581786752: + { + forceCreate_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 1581786752 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1325591662: + { + input.readMessage(getImageResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1325591662 + 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.compute.v1.InsertImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1284,7 +1240,18 @@ public InsertImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceGroupManagerRequest.java index fe9107606985..4fa23ad64364 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceGroupManagerRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2088511570: - { - com.google.cloud.compute.v1.InstanceGroupManager.Builder subBuilder = null; - if (instanceGroupManagerResource_ != null) { - subBuilder = instanceGroupManagerResource_.toBuilder(); - } - instanceGroupManagerResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManager.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagerResource_); - instanceGroupManagerResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertInstanceGroupManagerRequest_descriptor; @@ -399,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupManagerResource_ != null) { output.writeMessage(261063946, getInstanceGroupManagerResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -422,7 +345,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 261063946, getInstanceGroupManagerResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -449,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -472,7 +395,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -602,17 +525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertInstanceGroupManagerRequest.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 @@ -739,7 +655,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertInstanceGroupManagerR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -754,19 +670,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2088511570: + { + input.readMessage( + getInstanceGroupManagerResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 2088511570 + 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.compute.v1.InsertInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1366,7 +1319,18 @@ public InsertInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceGroupRequest.java index c646f4d954a1..9aed9aa0db5d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceGroupRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertInstanceGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2002070078: - { - com.google.cloud.compute.v1.InstanceGroup.Builder subBuilder = null; - if (instanceGroupResource_ != null) { - subBuilder = instanceGroupResource_.toBuilder(); - } - instanceGroupResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupResource_); - instanceGroupResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertInstanceGroupRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupResource_ != null) { output.writeMessage(286612152, getInstanceGroupResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 286612152, getInstanceGroupResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertInstanceGroupRequest.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 @@ -734,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertInstanceGroupRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +665,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertInstanceGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2002070078: + { + input.readMessage( + getInstanceGroupResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -2002070078 + 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.compute.v1.InsertInstanceGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1354,7 +1308,18 @@ public InsertInstanceGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertInstanceGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceRequest.java index 3802fe04b15c..8143f2287a2e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceRequest.java @@ -56,97 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 174158330: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - sourceMachineImage_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1727906754: - { - com.google.cloud.compute.v1.Instance.Builder subBuilder = null; - if (instanceResource_ != null) { - subBuilder = instanceResource_.toBuilder(); - } - instanceResource_ = - input.readMessage( - com.google.cloud.compute.v1.Instance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceResource_); - instanceResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1635578366: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - sourceInstanceTemplate_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertInstanceRequest_descriptor; @@ -548,7 +457,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 332423616, sourceInstanceTemplate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -580,7 +489,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 332423616, sourceInstanceTemplate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -614,7 +523,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceMachineImage().equals(other.getSourceMachineImage())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -645,7 +554,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -774,17 +683,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertInstanceRequest.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 @@ -931,7 +833,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertInstanceRequest other zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -946,18 +848,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 174158330: + { + sourceMachineImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 174158330 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1727906754: + { + input.readMessage( + getInstanceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1727906754 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1635578366: + { + sourceInstanceTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1635578366 + 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.compute.v1.InsertInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1791,7 +1743,18 @@ public InsertInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceTemplateRequest.java index 9b22d01fb510..0a598242c209 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInstanceTemplateRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertInstanceTemplateRequest( - 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 85436490: - { - com.google.cloud.compute.v1.InstanceTemplate.Builder subBuilder = null; - if (instanceTemplateResource_ != null) { - subBuilder = instanceTemplateResource_.toBuilder(); - } - instanceTemplateResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceTemplate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceTemplateResource_); - instanceTemplateResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertInstanceTemplateRequest_descriptor; @@ -334,7 +264,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +284,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -379,7 +309,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -400,7 +330,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +460,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertInstanceTemplateRequest.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 @@ -658,7 +581,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertInstanceTemplateReque requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -673,18 +596,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertInstanceTemplateRequest 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 85436490: + { + input.readMessage( + getInstanceTemplateResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 85436490 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertInstanceTemplateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1165,7 +1120,18 @@ public InsertInstanceTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertInstanceTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInterconnectAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInterconnectAttachmentRequest.java index 8c216b0afabf..d16eeb727b05 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInterconnectAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInterconnectAttachmentRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertInterconnectAttachmentRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1698730954: - { - com.google.cloud.compute.v1.InterconnectAttachment.Builder subBuilder = null; - if (interconnectAttachmentResource_ != null) { - subBuilder = interconnectAttachmentResource_.toBuilder(); - } - interconnectAttachmentResource_ = - input.readMessage( - com.google.cloud.compute.v1.InterconnectAttachment.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(interconnectAttachmentResource_); - interconnectAttachmentResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1941957032: - { - bitField0_ |= 0x00000002; - validateOnly_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertInterconnectAttachmentRequest_descriptor; @@ -443,7 +359,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(242744629, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -469,7 +385,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(242744629, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -501,7 +417,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValidateOnly()) { if (getValidateOnly() != other.getValidateOnly()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -528,7 +444,7 @@ public int hashCode() { hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -658,17 +574,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertInterconnectAttachmentRequest.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 @@ -805,7 +714,7 @@ public Builder mergeFrom( if (other.hasValidateOnly()) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -820,19 +729,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertInterconnectAttachmentRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1698730954: + { + input.readMessage( + getInterconnectAttachmentResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1698730954 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1941957032: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 1941957032 + 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.compute.v1.InsertInterconnectAttachmentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1501,7 +1454,18 @@ public InsertInterconnectAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertInterconnectAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInterconnectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInterconnectRequest.java index 032fcaf42177..4a856e36a659 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInterconnectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertInterconnectRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertInterconnectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1114077958: - { - com.google.cloud.compute.v1.Interconnect.Builder subBuilder = null; - if (interconnectResource_ != null) { - subBuilder = interconnectResource_.toBuilder(); - } - interconnectResource_ = - input.readMessage( - com.google.cloud.compute.v1.Interconnect.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(interconnectResource_); - interconnectResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertInterconnectRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (interconnectResource_ != null) { output.writeMessage(397611167, getInterconnectResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +283,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 397611167, getInterconnectResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -399,7 +329,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -529,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertInterconnectRequest.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 @@ -657,7 +580,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertInterconnectRequest o requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -672,18 +595,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertInterconnectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1114077958: + { + input.readMessage( + getInterconnectResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1114077958 + 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.compute.v1.InsertInterconnectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1161,7 +1116,18 @@ public InsertInterconnectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertInterconnectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertLicenseRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertLicenseRequest.java index 2c4ff76e6b2b..63b235e62940 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertLicenseRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertLicenseRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertLicenseRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -791326110: - { - com.google.cloud.compute.v1.License.Builder subBuilder = null; - if (licenseResource_ != null) { - subBuilder = licenseResource_.toBuilder(); - } - licenseResource_ = - input.readMessage( - com.google.cloud.compute.v1.License.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(licenseResource_); - licenseResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertLicenseRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (licenseResource_ != null) { output.writeMessage(437955148, getLicenseResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -352,7 +282,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(437955148, getLicenseResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -377,7 +307,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -398,7 +328,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -527,17 +457,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertLicenseRequest.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 @@ -655,7 +578,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertLicenseRequest other) requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -670,17 +593,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertLicenseRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -791326110: + { + input.readMessage(getLicenseResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -791326110 + 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.compute.v1.InsertLicenseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1157,7 +1112,18 @@ public InsertLicenseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertLicenseRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertMachineImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertMachineImageRequest.java index 9e469b11722e..4dea26352fac 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertMachineImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertMachineImageRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertMachineImageRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 485927762: - { - com.google.cloud.compute.v1.MachineImage.Builder subBuilder = null; - if (machineImageResource_ != null) { - subBuilder = machineImageResource_.toBuilder(); - } - machineImageResource_ = - input.readMessage( - com.google.cloud.compute.v1.MachineImage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(machineImageResource_); - machineImageResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1124441654: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - sourceInstance_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertMachineImageRequest_descriptor; @@ -408,7 +331,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 396315705, sourceInstance_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -431,7 +354,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(396315705, sourceInstance_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -460,7 +383,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceInstance()) { if (!getSourceInstance().equals(other.getSourceInstance())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -485,7 +408,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getSourceInstance().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -615,17 +538,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertMachineImageRequest.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 @@ -754,7 +670,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertMachineImageRequest o sourceInstance_ = other.sourceInstance_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -769,18 +685,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertMachineImageRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 485927762: + { + input.readMessage( + getMachineImageResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 485927762 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1124441654: + { + sourceInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1124441654 + 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.compute.v1.InsertMachineImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1378,7 +1332,18 @@ public InsertMachineImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertMachineImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkEdgeSecurityServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkEdgeSecurityServiceRequest.java index 81d1cce4b9fb..58fce4995f8a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkEdgeSecurityServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkEdgeSecurityServiceRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertNetworkEdgeSecurityServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1941957032: - { - bitField0_ |= 0x00000002; - validateOnly_ = input.readBool(); - break; - } - case -474575566: - { - com.google.cloud.compute.v1.NetworkEdgeSecurityService.Builder subBuilder = null; - if (networkEdgeSecurityServiceResource_ != null) { - subBuilder = networkEdgeSecurityServiceResource_.toBuilder(); - } - networkEdgeSecurityServiceResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEdgeSecurityService.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkEdgeSecurityServiceResource_); - networkEdgeSecurityServiceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertNetworkEdgeSecurityServiceRequest_descriptor; @@ -445,7 +361,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (networkEdgeSecurityServiceResource_ != null) { output.writeMessage(477548966, getNetworkEdgeSecurityServiceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -471,7 +387,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 477548966, getNetworkEdgeSecurityServiceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -503,7 +419,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValidateOnly()) { if (getValidateOnly() != other.getValidateOnly()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -530,7 +446,7 @@ public int hashCode() { hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -662,17 +578,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InsertNetworkEdgeSecurityServiceRequest.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 @@ -812,7 +721,7 @@ public Builder mergeFrom( if (other.hasValidateOnly()) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -827,19 +736,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertNetworkEdgeSecurityServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1941957032: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 1941957032 + case -474575566: + { + input.readMessage( + getNetworkEdgeSecurityServiceResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -474575566 + 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.compute.v1.InsertNetworkEdgeSecurityServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1510,7 +1463,18 @@ public InsertNetworkEdgeSecurityServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertNetworkEdgeSecurityServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupRequest.java index ba156f493acb..b71a863d1229 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkEndpointGroupRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertNetworkEndpointGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -88656582: - { - com.google.cloud.compute.v1.NetworkEndpointGroup.Builder subBuilder = null; - if (networkEndpointGroupResource_ != null) { - subBuilder = networkEndpointGroupResource_.toBuilder(); - } - networkEndpointGroupResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkEndpointGroupResource_); - networkEndpointGroupResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertNetworkEndpointGroupRequest_descriptor; @@ -399,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (networkEndpointGroupResource_ != null) { output.writeMessage(525788839, getNetworkEndpointGroupResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -422,7 +345,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 525788839, getNetworkEndpointGroupResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -449,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -472,7 +395,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -602,17 +525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertNetworkEndpointGroupRequest.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 @@ -739,7 +655,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertNetworkEndpointGroupR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -754,19 +670,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertNetworkEndpointGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -88656582: + { + input.readMessage( + getNetworkEndpointGroupResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -88656582 + 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.compute.v1.InsertNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1366,7 +1319,18 @@ public InsertNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertNetworkEndpointGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkFirewallPolicyRequest.java index 2c813e0d080c..5c1dcfb38a65 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkFirewallPolicyRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -334571038: - { - com.google.cloud.compute.v1.FirewallPolicy.Builder subBuilder = null; - if (firewallPolicyResource_ != null) { - subBuilder = firewallPolicyResource_.toBuilder(); - } - firewallPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyResource_); - firewallPolicyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertNetworkFirewallPolicyRequest_descriptor; @@ -334,7 +264,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (firewallPolicyResource_ != null) { output.writeMessage(495049532, getFirewallPolicyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +284,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 495049532, getFirewallPolicyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -379,7 +309,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -400,7 +330,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +460,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertNetworkFirewallPolicyRequest.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 @@ -660,7 +583,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertNetworkFirewallPolicy requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -675,19 +598,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -334571038: + { + input.readMessage( + getFirewallPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -334571038 + 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.compute.v1.InsertNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1168,7 +1122,18 @@ public InsertNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkRequest.java index 04da596b8a3b..6cfcfe124c52 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNetworkRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertNetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 976844794: - { - com.google.cloud.compute.v1.Network.Builder subBuilder = null; - if (networkResource_ != null) { - subBuilder = networkResource_.toBuilder(); - } - networkResource_ = - input.readMessage( - com.google.cloud.compute.v1.Network.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkResource_); - networkResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertNetworkRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -352,7 +282,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -377,7 +307,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -398,7 +328,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -527,17 +457,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertNetworkRequest.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 @@ -655,7 +578,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertNetworkRequest other) requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -670,17 +593,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertNetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 976844794: + { + input.readMessage(getNetworkResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 976844794 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertNetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1157,7 +1112,18 @@ public InsertNetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertNetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNodeGroupRequest.java index 36d237236d15..2016a0a27b8a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNodeGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNodeGroupRequest.java @@ -54,88 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertNodeGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 575611752: - { - initialNodeCount_ = input.readInt32(); - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -252392102: - { - com.google.cloud.compute.v1.NodeGroup.Builder subBuilder = null; - if (nodeGroupResource_ != null) { - subBuilder = nodeGroupResource_.toBuilder(); - } - nodeGroupResource_ = - input.readMessage( - com.google.cloud.compute.v1.NodeGroup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(nodeGroupResource_); - nodeGroupResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertNodeGroupRequest_descriptor; @@ -423,7 +341,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (nodeGroupResource_ != null) { output.writeMessage(505321899, getNodeGroupResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -449,7 +367,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 505321899, getNodeGroupResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -476,7 +394,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -501,7 +419,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -630,17 +548,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertNodeGroupRequest.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 @@ -771,7 +682,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertNodeGroupRequest othe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -786,18 +697,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertNodeGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 575611752: + { + initialNodeCount_ = input.readInt32(); + + break; + } // case 575611752 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -252392102: + { + input.readMessage( + getNodeGroupResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -252392102 + 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.compute.v1.InsertNodeGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1443,7 +1398,18 @@ public InsertNodeGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertNodeGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNodeTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNodeTemplateRequest.java index b2fef38bf38a..4d05cada874a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNodeTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertNodeTemplateRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertNodeTemplateRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1018915250: - { - com.google.cloud.compute.v1.NodeTemplate.Builder subBuilder = null; - if (nodeTemplateResource_ != null) { - subBuilder = nodeTemplateResource_.toBuilder(); - } - nodeTemplateResource_ = - input.readMessage( - com.google.cloud.compute.v1.NodeTemplate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(nodeTemplateResource_); - nodeTemplateResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertNodeTemplateRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertNodeTemplateRequest.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 @@ -734,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertNodeTemplateRequest o requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +665,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertNodeTemplateRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1018915250: + { + input.readMessage( + getNodeTemplateResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1018915250 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertNodeTemplateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1354,7 +1308,18 @@ public InsertNodeTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertNodeTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPacketMirroringRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPacketMirroringRequest.java index 8cf45f287355..5d941d02e318 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPacketMirroringRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPacketMirroringRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertPacketMirroringRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -346951414: - { - com.google.cloud.compute.v1.PacketMirroring.Builder subBuilder = null; - if (packetMirroringResource_ != null) { - subBuilder = packetMirroringResource_.toBuilder(); - } - packetMirroringResource_ = - input.readMessage( - com.google.cloud.compute.v1.PacketMirroring.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(packetMirroringResource_); - packetMirroringResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertPacketMirroringRequest_descriptor; @@ -398,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (packetMirroringResource_ != null) { output.writeMessage(493501985, getPacketMirroringResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +344,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 493501985, getPacketMirroringResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -470,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -600,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertPacketMirroringRequest.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 @@ -735,7 +651,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertPacketMirroringReques requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -750,18 +666,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertPacketMirroringRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -346951414: + { + input.readMessage( + getPacketMirroringResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -346951414 + 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.compute.v1.InsertPacketMirroringRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1356,7 +1310,18 @@ public InsertPacketMirroringRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertPacketMirroringRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPublicAdvertisedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPublicAdvertisedPrefixeRequest.java index cf040d2a035c..e05cc50f6eff 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPublicAdvertisedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPublicAdvertisedPrefixeRequest.java @@ -55,77 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertPublicAdvertisedPrefixeRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1868913786: - { - com.google.cloud.compute.v1.PublicAdvertisedPrefix.Builder subBuilder = null; - if (publicAdvertisedPrefixResource_ != null) { - subBuilder = publicAdvertisedPrefixResource_.toBuilder(); - } - publicAdvertisedPrefixResource_ = - input.readMessage( - com.google.cloud.compute.v1.PublicAdvertisedPrefix.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(publicAdvertisedPrefixResource_); - publicAdvertisedPrefixResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertPublicAdvertisedPrefixeRequest_descriptor; @@ -337,7 +266,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (publicAdvertisedPrefixResource_ != null) { output.writeMessage(233614223, getPublicAdvertisedPrefixResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -357,7 +286,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 233614223, getPublicAdvertisedPrefixResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -384,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -405,7 +334,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -535,17 +464,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest.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 @@ -666,7 +588,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -681,19 +603,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertPublicAdvertisedPrefixeRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1868913786: + { + input.readMessage( + getPublicAdvertisedPrefixResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1868913786 + 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.compute.v1.InsertPublicAdvertisedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1179,7 +1133,18 @@ public InsertPublicAdvertisedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertPublicAdvertisedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPublicDelegatedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPublicDelegatedPrefixeRequest.java index 64839f845365..3f5356f6996e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPublicDelegatedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertPublicDelegatedPrefixeRequest.java @@ -56,84 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertPublicDelegatedPrefixeRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 380756010: - { - com.google.cloud.compute.v1.PublicDelegatedPrefix.Builder subBuilder = null; - if (publicDelegatedPrefixResource_ != null) { - subBuilder = publicDelegatedPrefixResource_.toBuilder(); - } - publicDelegatedPrefixResource_ = - input.readMessage( - com.google.cloud.compute.v1.PublicDelegatedPrefix.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(publicDelegatedPrefixResource_); - publicDelegatedPrefixResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertPublicDelegatedPrefixeRequest_descriptor; @@ -401,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +346,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +374,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -475,7 +397,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -605,17 +527,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest.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 @@ -743,7 +658,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -758,19 +673,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertPublicDelegatedPrefixeRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 380756010: + { + input.readMessage( + getPublicDelegatedPrefixResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 380756010 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertPublicDelegatedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1372,7 +1324,18 @@ public InsertPublicDelegatedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertPublicDelegatedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionAutoscalerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionAutoscalerRequest.java index 68c1a3a01e38..1122248f2771 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionAutoscalerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionAutoscalerRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionAutoscalerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1660928946: - { - com.google.cloud.compute.v1.Autoscaler.Builder subBuilder = null; - if (autoscalerResource_ != null) { - subBuilder = autoscalerResource_.toBuilder(); - } - autoscalerResource_ = - input.readMessage( - com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalerResource_); - autoscalerResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionAutoscalerRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionAutoscalerRequest.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 @@ -734,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionAutoscalerReque requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +665,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionAutoscalerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1660928946: + { + input.readMessage( + getAutoscalerResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1660928946 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertRegionAutoscalerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1354,7 +1308,18 @@ public InsertRegionAutoscalerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionAutoscalerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionBackendServiceRequest.java index e002a4549c00..a9489bbe1d0f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionBackendServiceRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1514273510: - { - com.google.cloud.compute.v1.BackendService.Builder subBuilder = null; - if (backendServiceResource_ != null) { - subBuilder = backendServiceResource_.toBuilder(); - } - backendServiceResource_ = - input.readMessage( - com.google.cloud.compute.v1.BackendService.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backendServiceResource_); - backendServiceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionBackendServiceRequest_descriptor; @@ -398,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backendServiceResource_ != null) { output.writeMessage(347586723, getBackendServiceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +344,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 347586723, getBackendServiceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -470,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -600,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionBackendServiceRequest.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 @@ -737,7 +653,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionBackendServiceR requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,19 +668,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1514273510: + { + input.readMessage( + getBackendServiceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1514273510 + 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.compute.v1.InsertRegionBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1360,7 +1313,18 @@ public InsertRegionBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionCommitmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionCommitmentRequest.java index 922cdd1387ef..c7557a530696 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionCommitmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionCommitmentRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionCommitmentRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1953927106: - { - com.google.cloud.compute.v1.Commitment.Builder subBuilder = null; - if (commitmentResource_ != null) { - subBuilder = commitmentResource_.toBuilder(); - } - commitmentResource_ = - input.readMessage( - com.google.cloud.compute.v1.Commitment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(commitmentResource_); - commitmentResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionCommitmentRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (commitmentResource_ != null) { output.writeMessage(244240888, getCommitmentResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 244240888, getCommitmentResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionCommitmentRequest.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 @@ -734,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionCommitmentReque requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +665,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionCommitmentRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1953927106: + { + input.readMessage( + getCommitmentResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1953927106 + 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.compute.v1.InsertRegionCommitmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1354,7 +1308,18 @@ public InsertRegionCommitmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionCommitmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionDiskRequest.java index f7d272a28d5e..46bd3902c2c3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionDiskRequest.java @@ -55,89 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionDiskRequest( - 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 207045506: - { - com.google.cloud.compute.v1.Disk.Builder subBuilder = null; - if (diskResource_ != null) { - subBuilder = diskResource_.toBuilder(); - } - diskResource_ = - input.readMessage(com.google.cloud.compute.v1.Disk.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diskResource_); - diskResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 403546554: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - sourceImage_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionDiskRequest_descriptor; @@ -471,7 +388,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -495,7 +412,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -525,7 +442,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceImage()) { if (!getSourceImage().equals(other.getSourceImage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -552,7 +469,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_IMAGE_FIELD_NUMBER; hash = (53 * hash) + getSourceImage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -681,17 +598,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionDiskRequest.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 @@ -827,7 +737,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionDiskRequest oth sourceImage_ = other.sourceImage_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -842,18 +752,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionDiskRequest 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 207045506: + { + input.readMessage(getDiskResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 207045506 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 403546554: + { + sourceImage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 403546554 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertRegionDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1566,7 +1519,18 @@ public InsertRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckRequest.java index 988b7a2fce83..eed9c98db5c4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionHealthCheckRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1615400258: - { - com.google.cloud.compute.v1.HealthCheck.Builder subBuilder = null; - if (healthCheckResource_ != null) { - subBuilder = healthCheckResource_.toBuilder(); - } - healthCheckResource_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(healthCheckResource_); - healthCheckResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionHealthCheckRequest_descriptor; @@ -398,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +344,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -470,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -600,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionHealthCheckRequest.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 @@ -735,7 +651,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionHealthCheckRequ requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -750,18 +666,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionHealthCheckRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1615400258: + { + input.readMessage( + getHealthCheckResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1615400258 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertRegionHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1355,7 +1309,18 @@ public InsertRegionHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckServiceRequest.java index a898c93cd47f..7ea9d560d8f1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionHealthCheckServiceRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionHealthCheckServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -476024942: - { - com.google.cloud.compute.v1.HealthCheckService.Builder subBuilder = null; - if (healthCheckServiceResource_ != null) { - subBuilder = healthCheckServiceResource_.toBuilder(); - } - healthCheckServiceResource_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheckService.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(healthCheckServiceResource_); - healthCheckServiceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionHealthCheckServiceRequest_descriptor; @@ -400,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (healthCheckServiceResource_ != null) { output.writeMessage(477367794, getHealthCheckServiceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +346,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 477367794, getHealthCheckServiceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -450,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -473,7 +396,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -605,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest.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 @@ -743,7 +659,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -758,19 +674,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionHealthCheckServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -476024942: + { + input.readMessage( + getHealthCheckServiceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -476024942 + 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.compute.v1.InsertRegionHealthCheckServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1370,7 +1323,18 @@ public InsertRegionHealthCheckServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionHealthCheckServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionInstanceGroupManagerRequest.java index e93afa32c728..d40cccdadec8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionInstanceGroupManagerRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2088511570: - { - com.google.cloud.compute.v1.InstanceGroupManager.Builder subBuilder = null; - if (instanceGroupManagerResource_ != null) { - subBuilder = instanceGroupManagerResource_.toBuilder(); - } - instanceGroupManagerResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManager.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagerResource_); - instanceGroupManagerResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionInstanceGroupManagerRequest_descriptor; @@ -400,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupManagerResource_ != null) { output.writeMessage(261063946, getInstanceGroupManagerResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +346,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 261063946, getInstanceGroupManagerResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -450,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -473,7 +396,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -605,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InsertRegionInstanceGroupManagerRequest.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 @@ -745,7 +661,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -760,19 +676,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionInstanceGroupManagerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2088511570: + { + input.readMessage( + getInstanceGroupManagerResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 2088511570 + 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.compute.v1.InsertRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1373,7 +1326,18 @@ public InsertRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNetworkEndpointGroupRequest.java index f500171e9bd7..fbd6da0bbabb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNetworkEndpointGroupRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionNetworkEndpointGroupRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -88656582: - { - com.google.cloud.compute.v1.NetworkEndpointGroup.Builder subBuilder = null; - if (networkEndpointGroupResource_ != null) { - subBuilder = networkEndpointGroupResource_.toBuilder(); - } - networkEndpointGroupResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkEndpointGroupResource_); - networkEndpointGroupResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionNetworkEndpointGroupRequest_descriptor; @@ -400,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (networkEndpointGroupResource_ != null) { output.writeMessage(525788839, getNetworkEndpointGroupResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +346,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 525788839, getNetworkEndpointGroupResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -450,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -473,7 +396,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -605,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest.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 @@ -745,7 +661,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -760,19 +676,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionNetworkEndpointGroupRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -88656582: + { + input.readMessage( + getNetworkEndpointGroupResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -88656582 + 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.compute.v1.InsertRegionNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1373,7 +1326,18 @@ public InsertRegionNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionNetworkEndpointGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNetworkFirewallPolicyRequest.java index 18052af8123a..9a10516b7be8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNetworkFirewallPolicyRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -334571038: - { - com.google.cloud.compute.v1.FirewallPolicy.Builder subBuilder = null; - if (firewallPolicyResource_ != null) { - subBuilder = firewallPolicyResource_.toBuilder(); - } - firewallPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyResource_); - firewallPolicyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionNetworkFirewallPolicyRequest_descriptor; @@ -399,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (firewallPolicyResource_ != null) { output.writeMessage(495049532, getFirewallPolicyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -422,7 +345,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 495049532, getFirewallPolicyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -448,7 +371,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -471,7 +394,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -603,17 +526,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest.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 @@ -743,7 +659,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -758,19 +674,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -334571038: + { + input.readMessage( + getFirewallPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -334571038 + 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.compute.v1.InsertRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1367,7 +1320,18 @@ public InsertRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNotificationEndpointRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNotificationEndpointRequest.java index 9b7221a4ac77..49caeee9cbfc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNotificationEndpointRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionNotificationEndpointRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionNotificationEndpointRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1587287774: - { - com.google.cloud.compute.v1.NotificationEndpoint.Builder subBuilder = null; - if (notificationEndpointResource_ != null) { - subBuilder = notificationEndpointResource_.toBuilder(); - } - notificationEndpointResource_ = - input.readMessage( - com.google.cloud.compute.v1.NotificationEndpoint.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(notificationEndpointResource_); - notificationEndpointResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionNotificationEndpointRequest_descriptor; @@ -400,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (notificationEndpointResource_ != null) { output.writeMessage(338459940, getNotificationEndpointResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +346,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 338459940, getNotificationEndpointResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -450,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -473,7 +396,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -605,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InsertRegionNotificationEndpointRequest.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 @@ -745,7 +661,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -760,19 +676,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionNotificationEndpointRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1587287774: + { + input.readMessage( + getNotificationEndpointResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1587287774 + 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.compute.v1.InsertRegionNotificationEndpointRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1373,7 +1326,18 @@ public InsertRegionNotificationEndpointRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionNotificationEndpointRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSecurityPolicyRequest.java index 19222a8f5985..dd2a35b1fd69 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSecurityPolicyRequest.java @@ -55,89 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionSecurityPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1729276898: - { - com.google.cloud.compute.v1.SecurityPolicy.Builder subBuilder = null; - if (securityPolicyResource_ != null) { - subBuilder = securityPolicyResource_.toBuilder(); - } - securityPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityPolicyResource_); - securityPolicyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1941957032: - { - bitField0_ |= 0x00000002; - validateOnly_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionSecurityPolicyRequest_descriptor; @@ -440,7 +357,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(242744629, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -466,7 +383,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(242744629, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -496,7 +413,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValidateOnly()) { if (getValidateOnly() != other.getValidateOnly()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -523,7 +440,7 @@ public int hashCode() { hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -653,17 +570,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionSecurityPolicyRequest.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 @@ -799,7 +709,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionSecurityPolicyR if (other.hasValidateOnly()) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -814,19 +724,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionSecurityPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1729276898: + { + input.readMessage( + getSecurityPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1729276898 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1941957032: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 1941957032 + 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.compute.v1.InsertRegionSecurityPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1489,7 +1442,18 @@ public InsertRegionSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSslCertificateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSslCertificateRequest.java index 660a9ee12bb1..5dbe5ae88eb6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSslCertificateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSslCertificateRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionSslCertificateRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1445679178: - { - com.google.cloud.compute.v1.SslCertificate.Builder subBuilder = null; - if (sslCertificateResource_ != null) { - subBuilder = sslCertificateResource_.toBuilder(); - } - sslCertificateResource_ = - input.readMessage( - com.google.cloud.compute.v1.SslCertificate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sslCertificateResource_); - sslCertificateResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionSslCertificateRequest_descriptor; @@ -398,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +344,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSslCertificateResource()) { if (!getSslCertificateResource().equals(other.getSslCertificateResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -470,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + SSL_CERTIFICATE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSslCertificateResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -600,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionSslCertificateRequest.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 @@ -737,7 +653,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionSslCertificateR if (other.hasSslCertificateResource()) { mergeSslCertificateResource(other.getSslCertificateResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,19 +668,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionSslCertificateRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1445679178: + { + input.readMessage( + getSslCertificateResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1445679178 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertRegionSslCertificateRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1360,7 +1313,18 @@ public InsertRegionSslCertificateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionSslCertificateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSslPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSslPolicyRequest.java index e915a41cfe21..b8d4fd8a6afe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSslPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionSslPolicyRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionSslPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2095832510: - { - com.google.cloud.compute.v1.SslPolicy.Builder subBuilder = null; - if (sslPolicyResource_ != null) { - subBuilder = sslPolicyResource_.toBuilder(); - } - sslPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.SslPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sslPolicyResource_); - sslPolicyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionSslPolicyRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sslPolicyResource_ != null) { output.writeMessage(274891848, getSslPolicyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 274891848, getSslPolicyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSslPolicyResource()) { if (!getSslPolicyResource().equals(other.getSslPolicyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + SSL_POLICY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSslPolicyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionSslPolicyRequest.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 @@ -734,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionSslPolicyReques if (other.hasSslPolicyResource()) { mergeSslPolicyResource(other.getSslPolicyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +665,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionSslPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2095832510: + { + input.readMessage( + getSslPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -2095832510 + 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.compute.v1.InsertRegionSslPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1354,7 +1308,18 @@ public InsertRegionSslPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionSslPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpProxyRequest.java index 11a5f23d5633..4b9564ee2778 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpProxyRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionTargetHttpProxyRequest( - 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 197573954: - { - com.google.cloud.compute.v1.TargetHttpProxy.Builder subBuilder = null; - if (targetHttpProxyResource_ != null) { - subBuilder = targetHttpProxyResource_.toBuilder(); - } - targetHttpProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetHttpProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetHttpProxyResource_); - targetHttpProxyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionTargetHttpProxyRequest_descriptor; @@ -399,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -422,7 +345,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -448,7 +371,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetHttpProxyResource()) { if (!getTargetHttpProxyResource().equals(other.getTargetHttpProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -471,7 +394,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_HTTP_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -601,17 +524,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest.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 @@ -738,7 +654,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionTargetHttpProxy if (other.hasTargetHttpProxyResource()) { mergeTargetHttpProxyResource(other.getTargetHttpProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -753,19 +669,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionTargetHttpProxyRequest 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 197573954: + { + input.readMessage( + getTargetHttpProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 197573954 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertRegionTargetHttpProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1362,7 +1315,18 @@ public InsertRegionTargetHttpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionTargetHttpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpsProxyRequest.java index 2382759a4fca..39a222a59e5c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetHttpsProxyRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -825707510: - { - com.google.cloud.compute.v1.TargetHttpsProxy.Builder subBuilder = null; - if (targetHttpsProxyResource_ != null) { - subBuilder = targetHttpsProxyResource_.toBuilder(); - } - targetHttpsProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetHttpsProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetHttpsProxyResource_); - targetHttpsProxyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionTargetHttpsProxyRequest_descriptor; @@ -400,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetHttpsProxyResource_ != null) { output.writeMessage(433657473, getTargetHttpsProxyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -423,7 +346,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 433657473, getTargetHttpsProxyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -449,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetHttpsProxyResource()) { if (!getTargetHttpsProxyResource().equals(other.getTargetHttpsProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -472,7 +395,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_HTTPS_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -602,17 +525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest.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 @@ -740,7 +656,7 @@ public Builder mergeFrom( if (other.hasTargetHttpsProxyResource()) { mergeTargetHttpsProxyResource(other.getTargetHttpsProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -755,19 +671,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -825707510: + { + input.readMessage( + getTargetHttpsProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -825707510 + 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.compute.v1.InsertRegionTargetHttpsProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1366,7 +1319,18 @@ public InsertRegionTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetTcpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetTcpProxyRequest.java index a373a53c1836..c10e2c68a370 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetTcpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionTargetTcpProxyRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionTargetTcpProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1167311450: - { - com.google.cloud.compute.v1.TargetTcpProxy.Builder subBuilder = null; - if (targetTcpProxyResource_ != null) { - subBuilder = targetTcpProxyResource_.toBuilder(); - } - targetTcpProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetTcpProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetTcpProxyResource_); - targetTcpProxyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionTargetTcpProxyRequest_descriptor; @@ -398,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +344,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetTcpProxyResource()) { if (!getTargetTcpProxyResource().equals(other.getTargetTcpProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -470,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_TCP_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetTcpProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -600,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionTargetTcpProxyRequest.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 @@ -737,7 +653,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionTargetTcpProxyR if (other.hasTargetTcpProxyResource()) { mergeTargetTcpProxyResource(other.getTargetTcpProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,19 +668,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionTargetTcpProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1167311450: + { + input.readMessage( + getTargetTcpProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1167311450 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertRegionTargetTcpProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1360,7 +1313,18 @@ public InsertRegionTargetTcpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionTargetTcpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionUrlMapRequest.java index 7c306bedf566..d84103ca3639 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRegionUrlMapRequest.java @@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRegionUrlMapRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1349403402: - { - com.google.cloud.compute.v1.UrlMap.Builder subBuilder = null; - if (urlMapResource_ != null) { - subBuilder = urlMapResource_.toBuilder(); - } - urlMapResource_ = - input.readMessage(com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapResource_); - urlMapResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRegionUrlMapRequest_descriptor; @@ -396,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -418,7 +342,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +368,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMapResource()) { if (!getUrlMapResource().equals(other.getUrlMapResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -467,7 +391,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -597,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRegionUrlMapRequest.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 @@ -732,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRegionUrlMapRequest o if (other.hasUrlMapResource()) { mergeUrlMapResource(other.getUrlMapResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -747,18 +664,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRegionUrlMapRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1349403402: + { + input.readMessage(getUrlMapResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1349403402 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertRegionUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1351,7 +1305,18 @@ public InsertRegionUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRegionUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertReservationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertReservationRequest.java index 5110fc82142f..a6c2e9d05b72 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertReservationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertReservationRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertReservationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2014725878: - { - com.google.cloud.compute.v1.Reservation.Builder subBuilder = null; - if (reservationResource_ != null) { - subBuilder = reservationResource_.toBuilder(); - } - reservationResource_ = - input.readMessage( - com.google.cloud.compute.v1.Reservation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reservationResource_); - reservationResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertReservationRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (reservationResource_ != null) { output.writeMessage(285030177, getReservationResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 285030177, getReservationResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (!getReservationResource().equals(other.getReservationResource())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -598,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertReservationRequest.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 @@ -733,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertReservationRequest ot zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,18 +664,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertReservationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2014725878: + { + input.readMessage( + getReservationResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -2014725878 + 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.compute.v1.InsertReservationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1353,7 +1307,18 @@ public InsertReservationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertReservationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertResourcePolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertResourcePolicyRequest.java index 20ffb08e663c..576693de4956 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertResourcePolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertResourcePolicyRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertResourcePolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 614609490: - { - com.google.cloud.compute.v1.ResourcePolicy.Builder subBuilder = null; - if (resourcePolicyResource_ != null) { - subBuilder = resourcePolicyResource_.toBuilder(); - } - resourcePolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resourcePolicyResource_); - resourcePolicyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertResourcePolicyRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResourcePolicyResource()) { if (!getResourcePolicyResource().equals(other.getResourcePolicyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_POLICY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResourcePolicyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertResourcePolicyRequest.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 @@ -734,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertResourcePolicyRequest if (other.hasResourcePolicyResource()) { mergeResourcePolicyResource(other.getResourcePolicyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +665,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertResourcePolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 614609490: + { + input.readMessage( + getResourcePolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 614609490 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertResourcePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1355,7 +1309,18 @@ public InsertResourcePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertResourcePolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRouteRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRouteRequest.java index f6d12c4575b8..a5bab94199c5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRouteRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRouteRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRouteRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1803430434: - { - com.google.cloud.compute.v1.Route.Builder subBuilder = null; - if (routeResource_ != null) { - subBuilder = routeResource_.toBuilder(); - } - routeResource_ = - input.readMessage(com.google.cloud.compute.v1.Route.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(routeResource_); - routeResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRouteRequest_descriptor; @@ -332,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -351,7 +282,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -376,7 +307,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRouteResource()) { if (!getRouteResource().equals(other.getRouteResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +328,7 @@ public int hashCode() { hash = (37 * hash) + ROUTE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getRouteResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -526,17 +457,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRouteRequest.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 +577,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRouteRequest other) { if (other.hasRouteResource()) { mergeRouteResource(other.getRouteResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -668,17 +592,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRouteRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1803430434: + { + input.readMessage(getRouteResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1803430434 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertRouteRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1155,7 +1111,18 @@ public InsertRouteRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRouteRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRouterRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRouterRequest.java index cb3da9eaf690..1eca7e6c02ea 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRouterRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertRouterRequest.java @@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertRouterRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1241776674: - { - com.google.cloud.compute.v1.Router.Builder subBuilder = null; - if (routerResource_ != null) { - subBuilder = routerResource_.toBuilder(); - } - routerResource_ = - input.readMessage(com.google.cloud.compute.v1.Router.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(routerResource_); - routerResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertRouterRequest_descriptor; @@ -396,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -418,7 +342,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +368,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRouterResource()) { if (!getRouterResource().equals(other.getRouterResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -467,7 +391,7 @@ public int hashCode() { hash = (37 * hash) + ROUTER_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getRouterResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +520,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertRouterRequest.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 @@ -731,7 +648,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertRouterRequest other) if (other.hasRouterResource()) { mergeRouterResource(other.getRouterResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -746,17 +663,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertRouterRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1241776674: + { + input.readMessage(getRouterResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1241776674 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertRouterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1349,7 +1304,18 @@ public InsertRouterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertRouterRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSecurityPolicyRequest.java index cb66abba8404..c5e8bfd70acb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSecurityPolicyRequest.java @@ -53,82 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertSecurityPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1729276898: - { - com.google.cloud.compute.v1.SecurityPolicy.Builder subBuilder = null; - if (securityPolicyResource_ != null) { - subBuilder = securityPolicyResource_.toBuilder(); - } - securityPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityPolicyResource_); - securityPolicyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1941957032: - { - bitField0_ |= 0x00000002; - validateOnly_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertSecurityPolicyRequest_descriptor; @@ -375,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(242744629, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -398,7 +322,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(242744629, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -427,7 +351,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValidateOnly()) { if (getValidateOnly() != other.getValidateOnly()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -452,7 +376,7 @@ public int hashCode() { hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -582,17 +506,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertSecurityPolicyRequest.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 @@ -719,7 +636,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertSecurityPolicyRequest if (other.hasValidateOnly()) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -734,18 +651,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertSecurityPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1729276898: + { + input.readMessage( + getSecurityPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1729276898 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1941957032: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 1941957032 + 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.compute.v1.InsertSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1291,7 +1246,18 @@ public InsertSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertServiceAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertServiceAttachmentRequest.java index 53007eceaedd..8d09ee9215eb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertServiceAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertServiceAttachmentRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertServiceAttachmentRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -511125246: - { - com.google.cloud.compute.v1.ServiceAttachment.Builder subBuilder = null; - if (serviceAttachmentResource_ != null) { - subBuilder = serviceAttachmentResource_.toBuilder(); - } - serviceAttachmentResource_ = - input.readMessage( - com.google.cloud.compute.v1.ServiceAttachment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceAttachmentResource_); - serviceAttachmentResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertServiceAttachmentRequest_descriptor; @@ -399,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (serviceAttachmentResource_ != null) { output.writeMessage(472980256, getServiceAttachmentResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -422,7 +345,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 472980256, getServiceAttachmentResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -449,7 +372,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServiceAttachmentResource().equals(other.getServiceAttachmentResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -472,7 +395,7 @@ public int hashCode() { hash = (37 * hash) + SERVICE_ATTACHMENT_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getServiceAttachmentResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -602,17 +525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertServiceAttachmentRequest.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 @@ -737,7 +653,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertServiceAttachmentRequ if (other.hasServiceAttachmentResource()) { mergeServiceAttachmentResource(other.getServiceAttachmentResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,18 +668,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertServiceAttachmentRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -511125246: + { + input.readMessage( + getServiceAttachmentResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -511125246 + 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.compute.v1.InsertServiceAttachmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1361,7 +1315,18 @@ public InsertServiceAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertServiceAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSnapshotRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSnapshotRequest.java index b22ff15cdc2a..6037544a821c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSnapshotRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSnapshotRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertSnapshotRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -444407478: - { - com.google.cloud.compute.v1.Snapshot.Builder subBuilder = null; - if (snapshotResource_ != null) { - subBuilder = snapshotResource_.toBuilder(); - } - snapshotResource_ = - input.readMessage( - com.google.cloud.compute.v1.Snapshot.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(snapshotResource_); - snapshotResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertSnapshotRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (snapshotResource_ != null) { output.writeMessage(481319977, getSnapshotResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +283,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 481319977, getSnapshotResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSnapshotResource()) { if (!getSnapshotResource().equals(other.getSnapshotResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -399,7 +329,7 @@ public int hashCode() { hash = (37 * hash) + SNAPSHOT_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSnapshotResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -528,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertSnapshotRequest.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 @@ -656,7 +579,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertSnapshotRequest other if (other.hasSnapshotResource()) { mergeSnapshotResource(other.getSnapshotResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -671,18 +594,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertSnapshotRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -444407478: + { + input.readMessage( + getSnapshotResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -444407478 + 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.compute.v1.InsertSnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1160,7 +1115,18 @@ public InsertSnapshotRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertSnapshotRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSslCertificateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSslCertificateRequest.java index 637249685b4c..6c71f429a608 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSslCertificateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSslCertificateRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertSslCertificateRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1445679178: - { - com.google.cloud.compute.v1.SslCertificate.Builder subBuilder = null; - if (sslCertificateResource_ != null) { - subBuilder = sslCertificateResource_.toBuilder(); - } - sslCertificateResource_ = - input.readMessage( - com.google.cloud.compute.v1.SslCertificate.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sslCertificateResource_); - sslCertificateResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertSslCertificateRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +283,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSslCertificateResource()) { if (!getSslCertificateResource().equals(other.getSslCertificateResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -399,7 +329,7 @@ public int hashCode() { hash = (37 * hash) + SSL_CERTIFICATE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSslCertificateResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -529,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertSslCertificateRequest.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 @@ -657,7 +580,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertSslCertificateRequest if (other.hasSslCertificateResource()) { mergeSslCertificateResource(other.getSslCertificateResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -672,18 +595,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertSslCertificateRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1445679178: + { + input.readMessage( + getSslCertificateResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1445679178 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertSslCertificateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1162,7 +1117,18 @@ public InsertSslCertificateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertSslCertificateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSslPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSslPolicyRequest.java index 6554e5c99833..76a4f5ba79e4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSslPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSslPolicyRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertSslPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2095832510: - { - com.google.cloud.compute.v1.SslPolicy.Builder subBuilder = null; - if (sslPolicyResource_ != null) { - subBuilder = sslPolicyResource_.toBuilder(); - } - sslPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.SslPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sslPolicyResource_); - sslPolicyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertSslPolicyRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sslPolicyResource_ != null) { output.writeMessage(274891848, getSslPolicyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +283,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 274891848, getSslPolicyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSslPolicyResource()) { if (!getSslPolicyResource().equals(other.getSslPolicyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -399,7 +329,7 @@ public int hashCode() { hash = (37 * hash) + SSL_POLICY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSslPolicyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -528,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertSslPolicyRequest.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 @@ -656,7 +579,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertSslPolicyRequest othe if (other.hasSslPolicyResource()) { mergeSslPolicyResource(other.getSslPolicyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -671,18 +594,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertSslPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2095832510: + { + input.readMessage( + getSslPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -2095832510 + 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.compute.v1.InsertSslPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1160,7 +1115,18 @@ public InsertSslPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertSslPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSubnetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSubnetworkRequest.java index 31a0d861fee3..764d87f31659 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSubnetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertSubnetworkRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertSubnetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 337865210: - { - com.google.cloud.compute.v1.Subnetwork.Builder subBuilder = null; - if (subnetworkResource_ != null) { - subBuilder = subnetworkResource_.toBuilder(); - } - subnetworkResource_ = - input.readMessage( - com.google.cloud.compute.v1.Subnetwork.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(subnetworkResource_); - subnetworkResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertSubnetworkRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSubnetworkResource()) { if (!getSubnetworkResource().equals(other.getSubnetworkResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + SUBNETWORK_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSubnetworkResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -598,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertSubnetworkRequest.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 @@ -733,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertSubnetworkRequest oth if (other.hasSubnetworkResource()) { mergeSubnetworkResource(other.getSubnetworkResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,18 +664,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertSubnetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 337865210: + { + input.readMessage( + getSubnetworkResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 337865210 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertSubnetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1353,7 +1307,18 @@ public InsertSubnetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertSubnetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetGrpcProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetGrpcProxyRequest.java index 78d70c62010c..9797047be04c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetGrpcProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetGrpcProxyRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertTargetGrpcProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1663587694: - { - com.google.cloud.compute.v1.TargetGrpcProxy.Builder subBuilder = null; - if (targetGrpcProxyResource_ != null) { - subBuilder = targetGrpcProxyResource_.toBuilder(); - } - targetGrpcProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetGrpcProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetGrpcProxyResource_); - targetGrpcProxyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertTargetGrpcProxyRequest_descriptor; @@ -334,7 +264,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetGrpcProxyResource_ != null) { output.writeMessage(328922450, getTargetGrpcProxyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +284,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 328922450, getTargetGrpcProxyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -379,7 +309,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetGrpcProxyResource()) { if (!getTargetGrpcProxyResource().equals(other.getTargetGrpcProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -400,7 +330,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_GRPC_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetGrpcProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +460,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertTargetGrpcProxyRequest.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 @@ -658,7 +581,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertTargetGrpcProxyReques if (other.hasTargetGrpcProxyResource()) { mergeTargetGrpcProxyResource(other.getTargetGrpcProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -673,18 +596,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertTargetGrpcProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1663587694: + { + input.readMessage( + getTargetGrpcProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1663587694 + 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.compute.v1.InsertTargetGrpcProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1163,7 +1118,18 @@ public InsertTargetGrpcProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertTargetGrpcProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpProxyRequest.java index f28918fffbbe..4a9d4e19b589 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpProxyRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertTargetHttpProxyRequest( - 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 197573954: - { - com.google.cloud.compute.v1.TargetHttpProxy.Builder subBuilder = null; - if (targetHttpProxyResource_ != null) { - subBuilder = targetHttpProxyResource_.toBuilder(); - } - targetHttpProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetHttpProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetHttpProxyResource_); - targetHttpProxyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertTargetHttpProxyRequest_descriptor; @@ -334,7 +264,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +284,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -379,7 +309,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetHttpProxyResource()) { if (!getTargetHttpProxyResource().equals(other.getTargetHttpProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -400,7 +330,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_HTTP_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +460,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertTargetHttpProxyRequest.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 @@ -658,7 +581,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertTargetHttpProxyReques if (other.hasTargetHttpProxyResource()) { mergeTargetHttpProxyResource(other.getTargetHttpProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -673,18 +596,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertTargetHttpProxyRequest 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 197573954: + { + input.readMessage( + getTargetHttpProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 197573954 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertTargetHttpProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1163,7 +1118,18 @@ public InsertTargetHttpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertTargetHttpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpsProxyRequest.java index 6860755c82f2..69d18a968a3d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetHttpsProxyRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -825707510: - { - com.google.cloud.compute.v1.TargetHttpsProxy.Builder subBuilder = null; - if (targetHttpsProxyResource_ != null) { - subBuilder = targetHttpsProxyResource_.toBuilder(); - } - targetHttpsProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetHttpsProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetHttpsProxyResource_); - targetHttpsProxyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertTargetHttpsProxyRequest_descriptor; @@ -334,7 +264,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetHttpsProxyResource_ != null) { output.writeMessage(433657473, getTargetHttpsProxyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +284,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 433657473, getTargetHttpsProxyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -379,7 +309,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetHttpsProxyResource()) { if (!getTargetHttpsProxyResource().equals(other.getTargetHttpsProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -400,7 +330,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_HTTPS_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +460,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertTargetHttpsProxyRequest.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 @@ -658,7 +581,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertTargetHttpsProxyReque if (other.hasTargetHttpsProxyResource()) { mergeTargetHttpsProxyResource(other.getTargetHttpsProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -673,18 +596,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -825707510: + { + input.readMessage( + getTargetHttpsProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -825707510 + 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.compute.v1.InsertTargetHttpsProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1165,7 +1120,18 @@ public InsertTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetInstanceRequest.java index 708b2c658d5d..253f8c982339 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetInstanceRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertTargetInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -851342766: - { - com.google.cloud.compute.v1.TargetInstance.Builder subBuilder = null; - if (targetInstanceResource_ != null) { - subBuilder = targetInstanceResource_.toBuilder(); - } - targetInstanceResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetInstance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetInstanceResource_); - targetInstanceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertTargetInstanceRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetInstanceResource_ != null) { output.writeMessage(430453066, getTargetInstanceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 430453066, getTargetInstanceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTargetInstanceResource().equals(other.getTargetInstanceResource())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertTargetInstanceRequest.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 @@ -734,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertTargetInstanceRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +665,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertTargetInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -851342766: + { + input.readMessage( + getTargetInstanceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -851342766 + 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.compute.v1.InsertTargetInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1355,7 +1309,18 @@ public InsertTargetInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertTargetInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetPoolRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetPoolRequest.java index f325aa11a0e5..6a9d503ff2f2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetPoolRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetPoolRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertTargetPoolRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 810251546: - { - com.google.cloud.compute.v1.TargetPool.Builder subBuilder = null; - if (targetPoolResource_ != null) { - subBuilder = targetPoolResource_.toBuilder(); - } - targetPoolResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetPool.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetPoolResource_); - targetPoolResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertTargetPoolRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetPoolResource()) { if (!getTargetPoolResource().equals(other.getTargetPoolResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_POOL_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetPoolResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -598,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertTargetPoolRequest.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 @@ -733,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertTargetPoolRequest oth if (other.hasTargetPoolResource()) { mergeTargetPoolResource(other.getTargetPoolResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,18 +664,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertTargetPoolRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 810251546: + { + input.readMessage( + getTargetPoolResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 810251546 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertTargetPoolRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1353,7 +1307,18 @@ public InsertTargetPoolRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertTargetPoolRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetSslProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetSslProxyRequest.java index 7d54d897ac05..e3857b8d4aa9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetSslProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetSslProxyRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertTargetSslProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1136129538: - { - com.google.cloud.compute.v1.TargetSslProxy.Builder subBuilder = null; - if (targetSslProxyResource_ != null) { - subBuilder = targetSslProxyResource_.toBuilder(); - } - targetSslProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetSslProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetSslProxyResource_); - targetSslProxyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertTargetSslProxyRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +283,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetSslProxyResource()) { if (!getTargetSslProxyResource().equals(other.getTargetSslProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -399,7 +329,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_SSL_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetSslProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -529,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertTargetSslProxyRequest.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 @@ -657,7 +580,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertTargetSslProxyRequest if (other.hasTargetSslProxyResource()) { mergeTargetSslProxyResource(other.getTargetSslProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -672,18 +595,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertTargetSslProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1136129538: + { + input.readMessage( + getTargetSslProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1136129538 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertTargetSslProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1162,7 +1117,18 @@ public InsertTargetSslProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertTargetSslProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetTcpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetTcpProxyRequest.java index 431b737719dd..1facda9fb991 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetTcpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetTcpProxyRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertTargetTcpProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1167311450: - { - com.google.cloud.compute.v1.TargetTcpProxy.Builder subBuilder = null; - if (targetTcpProxyResource_ != null) { - subBuilder = targetTcpProxyResource_.toBuilder(); - } - targetTcpProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetTcpProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetTcpProxyResource_); - targetTcpProxyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertTargetTcpProxyRequest_descriptor; @@ -333,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -353,7 +283,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetTcpProxyResource()) { if (!getTargetTcpProxyResource().equals(other.getTargetTcpProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -399,7 +329,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_TCP_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetTcpProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -529,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertTargetTcpProxyRequest.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 @@ -657,7 +580,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertTargetTcpProxyRequest if (other.hasTargetTcpProxyResource()) { mergeTargetTcpProxyResource(other.getTargetTcpProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -672,18 +595,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertTargetTcpProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1167311450: + { + input.readMessage( + getTargetTcpProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1167311450 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertTargetTcpProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1162,7 +1117,18 @@ public InsertTargetTcpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertTargetTcpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetVpnGatewayRequest.java index ea86b6181a3d..64cc1407b99b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertTargetVpnGatewayRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertTargetVpnGatewayRequest( - 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 3984402: - { - com.google.cloud.compute.v1.TargetVpnGateway.Builder subBuilder = null; - if (targetVpnGatewayResource_ != null) { - subBuilder = targetVpnGatewayResource_.toBuilder(); - } - targetVpnGatewayResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetVpnGateway.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetVpnGatewayResource_); - targetVpnGatewayResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertTargetVpnGatewayRequest_descriptor; @@ -398,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +344,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetVpnGatewayResource()) { if (!getTargetVpnGatewayResource().equals(other.getTargetVpnGatewayResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -470,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_VPN_GATEWAY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetVpnGatewayResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -600,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertTargetVpnGatewayRequest.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 @@ -735,7 +651,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertTargetVpnGatewayReque if (other.hasTargetVpnGatewayResource()) { mergeTargetVpnGatewayResource(other.getTargetVpnGatewayResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -750,18 +666,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertTargetVpnGatewayRequest 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 3984402: + { + input.readMessage( + getTargetVpnGatewayResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 3984402 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertTargetVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1358,7 +1312,18 @@ public InsertTargetVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertTargetVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertUrlMapRequest.java index 7d03d5bfa067..83110567186a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertUrlMapRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertUrlMapRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1349403402: - { - com.google.cloud.compute.v1.UrlMap.Builder subBuilder = null; - if (urlMapResource_ != null) { - subBuilder = urlMapResource_.toBuilder(); - } - urlMapResource_ = - input.readMessage(com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapResource_); - urlMapResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertUrlMapRequest_descriptor; @@ -332,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -351,7 +282,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -376,7 +307,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMapResource()) { if (!getUrlMapResource().equals(other.getUrlMapResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +328,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -526,17 +457,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertUrlMapRequest.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 @@ -654,7 +578,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertUrlMapRequest other) if (other.hasUrlMapResource()) { mergeUrlMapResource(other.getUrlMapResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -669,17 +593,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertUrlMapRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1349403402: + { + input.readMessage(getUrlMapResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1349403402 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1156,7 +1112,18 @@ public InsertUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertVpnGatewayRequest.java index 63396af305ca..f03876dfa00c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertVpnGatewayRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertVpnGatewayRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1461509282: - { - com.google.cloud.compute.v1.VpnGateway.Builder subBuilder = null; - if (vpnGatewayResource_ != null) { - subBuilder = vpnGatewayResource_.toBuilder(); - } - vpnGatewayResource_ = - input.readMessage( - com.google.cloud.compute.v1.VpnGateway.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(vpnGatewayResource_); - vpnGatewayResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertVpnGatewayRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVpnGatewayResource()) { if (!getVpnGatewayResource().equals(other.getVpnGatewayResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + VPN_GATEWAY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getVpnGatewayResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -598,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertVpnGatewayRequest.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 @@ -733,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertVpnGatewayRequest oth if (other.hasVpnGatewayResource()) { mergeVpnGatewayResource(other.getVpnGatewayResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,18 +664,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertVpnGatewayRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1461509282: + { + input.readMessage( + getVpnGatewayResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1461509282 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1353,7 +1307,18 @@ public InsertVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertVpnTunnelRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertVpnTunnelRequest.java index 5a537f7d5159..a324aeb6d1da 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertVpnTunnelRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InsertVpnTunnelRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InsertVpnTunnelRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 694715858: - { - com.google.cloud.compute.v1.VpnTunnel.Builder subBuilder = null; - if (vpnTunnelResource_ != null) { - subBuilder = vpnTunnelResource_.toBuilder(); - } - vpnTunnelResource_ = - input.readMessage( - com.google.cloud.compute.v1.VpnTunnel.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(vpnTunnelResource_); - vpnTunnelResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InsertVpnTunnelRequest_descriptor; @@ -397,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +343,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVpnTunnelResource()) { if (!getVpnTunnelResource().equals(other.getVpnTunnelResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { hash = (37 * hash) + VPN_TUNNEL_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getVpnTunnelResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -598,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InsertVpnTunnelRequest.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 @@ -733,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InsertVpnTunnelRequest othe if (other.hasVpnTunnelResource()) { mergeVpnTunnelResource(other.getVpnTunnelResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,18 +664,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InsertVpnTunnelRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 694715858: + { + input.readMessage( + getVpnTunnelResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 694715858 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.InsertVpnTunnelRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1353,7 +1307,18 @@ public InsertVpnTunnelRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InsertVpnTunnelRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Instance.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Instance.java index 997aaf87bbd6..f6819cb66ddb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Instance.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Instance.java @@ -76,499 +76,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Instance( - 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; - int mutable_bitField1_ = 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 26840: - { - bitField0_ |= 0x00000400; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00100000; - name_ = s; - break; - } - case 28418250: - { - com.google.cloud.compute.v1.Tags.Builder subBuilder = null; - if (((bitField1_ & 0x00000008) != 0)) { - subBuilder = tags_.toBuilder(); - } - tags_ = - input.readMessage(com.google.cloud.compute.v1.Tags.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tags_); - tags_ = subBuilder.buildPartial(); - } - bitField1_ |= 0x00000008; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField1_ |= 0x00000010; - zone_ = s; - break; - } - case 102903210: - { - com.google.cloud.compute.v1.ShieldedInstanceConfig.Builder subBuilder = null; - if (((bitField0_ & 0x10000000) != 0)) { - subBuilder = shieldedInstanceConfig_.toBuilder(); - } - shieldedInstanceConfig_ = - input.readMessage( - com.google.cloud.compute.v1.ShieldedInstanceConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shieldedInstanceConfig_); - shieldedInstanceConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x10000000; - break; - } - case 174158330: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x40000000; - sourceMachineImage_ = s; - break; - } - case 177763082: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x20000000) != 0)) { - resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x20000000; - } - resourcePolicies_.add(s); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - creationTimestamp_ = s; - break; - } - case 386216050: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00800000; - privateIpv6GoogleAccess_ = s; - break; - } - case 421881946: - { - if (!((mutable_bitField0_ & 0x01000000) != 0)) { - networkInterfaces_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x01000000; - } - networkInterfaces_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkInterface.parser(), extensionRegistry)); - break; - } - case 626510898: - { - com.google.cloud.compute.v1.InstanceParams.Builder subBuilder = null; - if (((bitField0_ & 0x00400000) != 0)) { - subBuilder = params_.toBuilder(); - } - params_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(params_); - params_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00400000; - break; - } - case 694933882: - { - com.google.cloud.compute.v1.Metadata.Builder subBuilder = null; - if (((bitField0_ & 0x00040000) != 0)) { - subBuilder = metadata_.toBuilder(); - } - metadata_ = - input.readMessage( - com.google.cloud.compute.v1.Metadata.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metadata_); - metadata_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00040000; - break; - } - case 764752818: - { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - disks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - disks_.add( - input.readMessage( - com.google.cloud.compute.v1.AttachedDisk.parser(), extensionRegistry)); - break; - } - case 989545152: - { - bitField1_ |= 0x00000001; - startRestricted_ = input.readBool(); - break; - } - case 1262805466: - { - com.google.cloud.compute.v1.ReservationAffinity.Builder subBuilder = null; - if (((bitField0_ & 0x01000000) != 0)) { - subBuilder = reservationAffinity_.toBuilder(); - } - reservationAffinity_ = - input.readMessage( - com.google.cloud.compute.v1.ReservationAffinity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reservationAffinity_); - reservationAffinity_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x01000000; - break; - } - case 1309575354: - { - com.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x20000000) != 0)) { - subBuilder = shieldedInstanceIntegrityPolicy_.toBuilder(); - } - shieldedInstanceIntegrityPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shieldedInstanceIntegrityPolicy_); - shieldedInstanceIntegrityPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x20000000; - break; - } - case 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - labelFingerprint_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField1_ |= 0x00000002; - status_ = s; - break; - } - case 1542712602: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x80000000) != 0)) { - subBuilder = sourceMachineImageEncryptionKey_.toBuilder(); - } - sourceMachineImageEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceMachineImageEncryptionKey_); - sourceMachineImageEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x80000000; - break; - } - case 1821688210: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - machineType_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - fingerprint_ = s; - break; - } - case 1887531794: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - keyRevocationActionType_ = s; - break; - } - case 1896538522: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - hostname_ = s; - break; - } - case 1943302074: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; - minCpuPlatform_ = s; - break; - } - case 2071471002: - { - com.google.cloud.compute.v1.DisplayDevice.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = displayDevice_.toBuilder(); - } - displayDevice_ = - input.readMessage( - com.google.cloud.compute.v1.DisplayDevice.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(displayDevice_); - displayDevice_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case -2074668670: - { - if (!((mutable_bitField1_ & 0x00000002) != 0)) { - serviceAccounts_ = - new java.util.ArrayList(); - mutable_bitField1_ |= 0x00000002; - } - serviceAccounts_.add( - input.readMessage( - com.google.cloud.compute.v1.ServiceAccount.parser(), extensionRegistry)); - break; - } - case -1915542062: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField1_ |= 0x00000004; - statusMessage_ = s; - break; - } - case -1444764598: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - lastSuspendedTimestamp_ = s; - break; - } - case -1201460062: - { - com.google.cloud.compute.v1.Scheduling.Builder subBuilder = null; - if (((bitField0_ & 0x04000000) != 0)) { - subBuilder = scheduling_.toBuilder(); - } - scheduling_ = - input.readMessage( - com.google.cloud.compute.v1.Scheduling.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(scheduling_); - scheduling_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x04000000; - break; - } - case -1108320494: - { - com.google.cloud.compute.v1.NetworkPerformanceConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00200000) != 0)) { - subBuilder = networkPerformanceConfig_.toBuilder(); - } - networkPerformanceConfig_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkPerformanceConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkPerformanceConfig_); - networkPerformanceConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00200000; - break; - } - case -1017799278: - { - com.google.cloud.compute.v1.AdvancedMachineFeatures.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = advancedMachineFeatures_.toBuilder(); - } - advancedMachineFeatures_ = - input.readMessage( - com.google.cloud.compute.v1.AdvancedMachineFeatures.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(advancedMachineFeatures_); - advancedMachineFeatures_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1012684462: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - cpuPlatform_ = s; - break; - } - case -992383214: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - lastStopTimestamp_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - description_ = s; - break; - } - case -744321406: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - lastStartTimestamp_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x08000000; - selfLink_ = s; - break; - } - case -630849712: - { - bitField0_ |= 0x00000020; - deletionProtection_ = input.readBool(); - break; - } - case -586206342: - { - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - guestAccelerators_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; - } - guestAccelerators_.add( - input.readMessage( - com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry)); - break; - } - case -553116704: - { - bitField0_ |= 0x00000002; - canIpForward_ = input.readBool(); - break; - } - case -447253160: - { - bitField0_ |= 0x02000000; - satisfiesPzs_ = input.readBool(); - break; - } - case -369865814: - { - com.google.cloud.compute.v1.ConfidentialInstanceConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = confidentialInstanceConfig_.toBuilder(); - } - confidentialInstanceConfig_ = - input.readMessage( - com.google.cloud.compute.v1.ConfidentialInstanceConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(confidentialInstanceConfig_); - confidentialInstanceConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00010000) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00010000; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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_ & 0x20000000) != 0)) { - resourcePolicies_ = resourcePolicies_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x01000000) != 0)) { - networkInterfaces_ = java.util.Collections.unmodifiableList(networkInterfaces_); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - disks_ = java.util.Collections.unmodifiableList(disks_); - } - if (((mutable_bitField1_ & 0x00000002) != 0)) { - serviceAccounts_ = java.util.Collections.unmodifiableList(serviceAccounts_); - } - if (((mutable_bitField0_ & 0x00000400) != 0)) { - guestAccelerators_ = java.util.Collections.unmodifiableList(guestAccelerators_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Instance_descriptor; @@ -3909,7 +3416,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4091,7 +3598,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4265,7 +3772,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4448,7 +3955,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4653,10 +4160,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000040); if (disksBuilder_ == null) { disks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); } else { + disks_ = null; disksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000080); if (displayDeviceBuilder_ == null) { displayDevice_ = null; } else { @@ -4667,10 +4175,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000200); if (guestAcceleratorsBuilder_ == null) { guestAccelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); } else { + guestAccelerators_ = null; guestAcceleratorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000400); hostname_ = ""; bitField0_ = (bitField0_ & ~0x00000800); id_ = 0L; @@ -4702,10 +4211,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00800000); if (networkInterfacesBuilder_ == null) { networkInterfaces_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x01000000); } else { + networkInterfaces_ = null; networkInterfacesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x01000000); if (networkPerformanceConfigBuilder_ == null) { networkPerformanceConfig_ = null; } else { @@ -4740,10 +4250,11 @@ public Builder clear() { bitField1_ = (bitField1_ & ~0x00000001); if (serviceAccountsBuilder_ == null) { serviceAccounts_ = java.util.Collections.emptyList(); - bitField1_ = (bitField1_ & ~0x00000002); } else { + serviceAccounts_ = null; serviceAccountsBuilder_.clear(); } + bitField1_ = (bitField1_ & ~0x00000002); if (shieldedInstanceConfigBuilder_ == null) { shieldedInstanceConfig_ = null; } else { @@ -5368,7 +4879,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Instance other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5383,17 +4894,332 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Instance 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00001000; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case 26989658 + case 28418250: + { + input.readMessage(getTagsFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000200; + break; + } // case 28418250 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000400; + break; + } // case 29957474 + case 102903210: + { + input.readMessage( + getShieldedInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField1_ |= 0x00000004; + break; + } // case 102903210 + case 174158330: + { + sourceMachineImage_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000010; + break; + } // case 174158330 + case 177763082: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 177763082 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 244202930 + case 386216050: + { + privateIpv6GoogleAccess_ = input.readStringRequireUtf8(); + bitField0_ |= 0x08000000; + break; + } // case 386216050 + case 421881946: + { + com.google.cloud.compute.v1.NetworkInterface m = + input.readMessage( + com.google.cloud.compute.v1.NetworkInterface.parser(), extensionRegistry); + if (networkInterfacesBuilder_ == null) { + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.add(m); + } else { + networkInterfacesBuilder_.addMessage(m); + } + break; + } // case 421881946 + case 626510898: + { + input.readMessage(getParamsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 626510898 + case 694933882: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case 694933882 + case 764752818: + { + com.google.cloud.compute.v1.AttachedDisk m = + input.readMessage( + com.google.cloud.compute.v1.AttachedDisk.parser(), extensionRegistry); + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(m); + } else { + disksBuilder_.addMessage(m); + } + break; + } // case 764752818 + case 989545152: + { + startRestricted_ = input.readBool(); + bitField1_ |= 0x00000040; + break; + } // case 989545152 + case 1262805466: + { + input.readMessage( + getReservationAffinityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x10000000; + break; + } // case 1262805466 + case 1309575354: + { + input.readMessage( + getShieldedInstanceIntegrityPolicyFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000008; + break; + } // case 1309575354 + case 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 1424998602 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000080; + break; + } // case 1450082194 + case 1542712602: + { + input.readMessage( + getSourceMachineImageEncryptionKeyFieldBuilder().getBuilder(), + extensionRegistry); + bitField1_ |= 0x00000020; + break; + } // case 1542712602 + case 1821688210: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00100000; + break; + } // case 1821688210 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1877428002 + case 1887531794: + { + keyRevocationActionType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 1887531794 + case 1896538522: + { + hostname_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1896538522 + case 1943302074: + { + minCpuPlatform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 1943302074 + case 2071471002: + { + input.readMessage(getDisplayDeviceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 2071471002 + case -2074668670: + { + com.google.cloud.compute.v1.ServiceAccount m = + input.readMessage( + com.google.cloud.compute.v1.ServiceAccount.parser(), extensionRegistry); + if (serviceAccountsBuilder_ == null) { + ensureServiceAccountsIsMutable(); + serviceAccounts_.add(m); + } else { + serviceAccountsBuilder_.addMessage(m); + } + break; + } // case -2074668670 + case -1915542062: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000100; + break; + } // case -1915542062 + case -1444764598: + { + lastSuspendedTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case -1444764598 + case -1201460062: + { + input.readMessage(getSchedulingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x80000000; + break; + } // case -1201460062 + case -1108320494: + { + input.readMessage( + getNetworkPerformanceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x02000000; + break; + } // case -1108320494 + case -1017799278: + { + input.readMessage( + getAdvancedMachineFeaturesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -1017799278 + case -1012684462: + { + cpuPlatform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -1012684462 + case -992383214: + { + lastStopTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case -992383214 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -911466526 + case -744321406: + { + lastStartTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case -744321406 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000001; + break; + } // case -645248918 + case -630849712: + { + deletionProtection_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -630849712 + case -586206342: + { + com.google.cloud.compute.v1.AcceleratorConfig m = + input.readMessage( + com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry); + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.add(m); + } else { + guestAcceleratorsBuilder_.addMessage(m); + } + break; + } // case -586206342 + case -553116704: + { + canIpForward_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -553116704 + case -447253160: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x40000000; + break; + } // case -447253160 + case -369865814: + { + input.readMessage( + getConfidentialInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -369865814 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.Instance) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -12146,7 +11972,18 @@ public Instance parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Instance(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceAggregatedList.java index 656fb1c39a64..806ca5180a07 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.InstancesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceAggregatedList_descriptor; @@ -704,7 +591,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -748,7 +635,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -786,7 +673,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -825,7 +712,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1153,7 +1040,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceAggregatedList othe if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1168,18 +1055,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.InstancesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InstanceAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2228,7 +2176,18 @@ public InstanceAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceConsumptionData.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceConsumptionData.java index af2879bfc9ff..c8bef7c14e80 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceConsumptionData.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceConsumptionData.java @@ -51,70 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceConsumptionData( - 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 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - instance_ = s; - break; - } - case 1170839186: - { - com.google.cloud.compute.v1.InstanceConsumptionInfo.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = consumptionInfo_.toBuilder(); - } - consumptionInfo_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceConsumptionInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(consumptionInfo_); - consumptionInfo_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceConsumptionData_descriptor; @@ -269,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(146354898, getConsumptionInfo()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -285,7 +221,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(146354898, getConsumptionInfo()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +245,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInstance()) { if (!getInstance().equals(other.getInstance())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +264,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getInstance().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -582,7 +518,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceConsumptionData oth instance_ = other.instance_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -597,18 +533,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceConsumptionData 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 146056362: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 146056362 + case 1170839186: + { + input.readMessage(getConsumptionInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1170839186 + 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.compute.v1.InstanceConsumptionData) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -964,7 +925,18 @@ public InstanceConsumptionData parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceConsumptionData(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceConsumptionInfo.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceConsumptionInfo.java index b7236f73197c..522b16a86c6f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceConsumptionInfo.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceConsumptionInfo.java @@ -49,70 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceConsumptionInfo( - 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 928009368: - { - bitField0_ |= 0x00000004; - memoryMb_ = input.readInt32(); - break; - } - case -1757113896: - { - bitField0_ |= 0x00000008; - minNodeCpus_ = input.readInt32(); - break; - } - case -1661066672: - { - bitField0_ |= 0x00000002; - localSsdGb_ = input.readInt32(); - break; - } - case -1148113264: - { - bitField0_ |= 0x00000001; - guestCpus_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceConsumptionInfo_descriptor; @@ -287,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(393356754, guestCpus_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -308,7 +244,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(393356754, guestCpus_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -340,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMinNodeCpus()) { if (getMinNodeCpus() != other.getMinNodeCpus()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -367,7 +303,7 @@ public int hashCode() { hash = (37 * hash) + MIN_NODE_CPUS_FIELD_NUMBER; hash = (53 * hash) + getMinNodeCpus(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -495,17 +431,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstanceConsumptionInfo.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 @@ -627,7 +556,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceConsumptionInfo oth if (other.hasMinNodeCpus()) { setMinNodeCpus(other.getMinNodeCpus()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -642,18 +571,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceConsumptionInfo 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 928009368: + { + memoryMb_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 928009368 + case -1757113896: + { + minNodeCpus_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case -1757113896 + case -1661066672: + { + localSsdGb_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case -1661066672 + case -1148113264: + { + guestCpus_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -1148113264 + 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.compute.v1.InstanceConsumptionInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -959,7 +925,18 @@ public InstanceConsumptionInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceConsumptionInfo(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroup.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroup.java index 343398ad7a81..74d0da9c5617 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroup.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroup.java @@ -62,142 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroup( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 28246024: - { - bitField0_ |= 0x00000200; - size_ = input.readInt32(); - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - region_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - network_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - fingerprint_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - subnetwork_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -874177438: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - namedPorts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - namedPorts_.add( - input.readMessage( - com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = 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_ & 0x00000040) != 0)) { - namedPorts_ = java.util.Collections.unmodifiableList(namedPorts_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroup_descriptor; @@ -1042,7 +906,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1092,7 +956,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1157,7 +1021,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1220,7 +1084,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1349,19 +1213,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstanceGroup.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) { - getNamedPortsFieldBuilder(); - } } @java.lang.Override @@ -1381,10 +1236,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000020); if (namedPortsBuilder_ == null) { namedPorts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + namedPorts_ = null; namedPortsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); network_ = ""; bitField0_ = (bitField0_ & ~0x00000080); region_ = ""; @@ -1616,7 +1472,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroup other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1631,17 +1487,116 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroup 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 28246024: + { + size_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 28246024 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 1111570338 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1862979954 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1877428002 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -1832345742 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -874177438: + { + com.google.cloud.compute.v1.NamedPort m = + input.readMessage( + com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry); + if (namedPortsBuilder_ == null) { + ensureNamedPortsIsMutable(); + namedPorts_.add(m); + } else { + namedPortsBuilder_.addMessage(m); + } + break; + } // case -874177438 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -645248918 + 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.compute.v1.InstanceGroup) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3362,7 +3317,18 @@ public InstanceGroup parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroup(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupAggregatedList.java index 7a4c5ede156b..61b05ac58ff4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.InstanceGroupsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupAggregatedList_descriptor; @@ -709,7 +596,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -753,7 +640,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -791,7 +678,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -830,7 +717,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1159,7 +1046,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupAggregatedList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1174,18 +1061,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.InstanceGroupsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InstanceGroupAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2236,7 +2184,18 @@ public InstanceGroupAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupList.java index cc50a627339c..1e7a0e9e83d2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceGroup.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InstanceGroup m = + input.readMessage( + com.google.cloud.compute.v1.InstanceGroup.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InstanceGroupList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public InstanceGroupList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManager.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManager.java index 97e13d3a365c..fb6a5b0ee655 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManager.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManager.java @@ -66,281 +66,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManager( - 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 26840: - { - bitField0_ |= 0x00000040; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - name_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 380308522: - { - com.google.cloud.compute.v1.StatefulPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00002000) != 0)) { - subBuilder = statefulPolicy_.toBuilder(); - } - statefulPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.StatefulPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(statefulPolicy_); - statefulPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00002000; - break; - } - case 503041912: - { - bitField0_ |= 0x00008000; - targetSize_ = input.readInt32(); - break; - } - case 648762026: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - instanceGroup_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - region_ = s; - break; - } - case 1299444954: - { - if (!((mutable_bitField0_ & 0x00100000) != 0)) { - versions_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.InstanceGroupManagerVersion>(); - mutable_bitField0_ |= 0x00100000; - } - versions_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagerVersion.parser(), - extensionRegistry)); - break; - } - case 1312367034: - { - com.google.cloud.compute.v1.InstanceGroupManagerActionsSummary.Builder subBuilder = - null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = currentActions_.toBuilder(); - } - currentActions_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagerActionsSummary.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(currentActions_); - currentActions_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 1406479170: - { - com.google.cloud.compute.v1.InstanceGroupManagerUpdatePolicy.Builder subBuilder = - null; - if (((bitField0_ & 0x00010000) != 0)) { - subBuilder = updatePolicy_.toBuilder(); - } - updatePolicy_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagerUpdatePolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updatePolicy_); - updatePolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00010000; - break; - } - case 1450082194: - { - com.google.cloud.compute.v1.InstanceGroupManagerStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00004000) != 0)) { - subBuilder = status_.toBuilder(); - } - status_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagerStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(status_); - status_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00004000; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - fingerprint_ = s; - break; - } - case -1820981470: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - instanceTemplate_ = s; - break; - } - case -1606386358: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00020000) != 0)) { - targetPools_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00020000; - } - targetPools_.add(s); - break; - } - case -1182115782: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - baseInstanceName_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - description_ = s; - break; - } - case -874177438: - { - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - namedPorts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00001000; - } - namedPorts_.add( - input.readMessage( - com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - selfLink_ = s; - break; - } - case -640574422: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - autoHealingPolicies_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.InstanceGroupManagerAutoHealingPolicy>(); - mutable_bitField0_ |= 0x00000001; - } - autoHealingPolicies_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagerAutoHealingPolicy.parser(), - extensionRegistry)); - break; - } - case -18498966: - { - com.google.cloud.compute.v1.DistributionPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = distributionPolicy_.toBuilder(); - } - distributionPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.DistributionPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(distributionPolicy_); - distributionPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - 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_ & 0x00100000) != 0)) { - versions_ = java.util.Collections.unmodifiableList(versions_); - } - if (((mutable_bitField0_ & 0x00020000) != 0)) { - targetPools_ = targetPools_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00001000) != 0)) { - namedPorts_ = java.util.Collections.unmodifiableList(namedPorts_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - autoHealingPolicies_ = java.util.Collections.unmodifiableList(autoHealingPolicies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManager_descriptor; @@ -1763,7 +1488,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(534558541, getDistributionPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1854,7 +1579,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 534558541, getDistributionPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1946,7 +1671,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2045,7 +1770,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2201,10 +1926,11 @@ public Builder clear() { super.clear(); if (autoHealingPoliciesBuilder_ == null) { autoHealingPolicies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + autoHealingPolicies_ = null; autoHealingPoliciesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); baseInstanceName_ = ""; bitField0_ = (bitField0_ & ~0x00000002); creationTimestamp_ = ""; @@ -2237,10 +1963,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000800); if (namedPortsBuilder_ == null) { namedPorts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); } else { + namedPorts_ = null; namedPortsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00001000); region_ = ""; bitField0_ = (bitField0_ & ~0x00002000); selfLink_ = ""; @@ -2269,10 +1996,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00080000); if (versionsBuilder_ == null) { versions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00100000); } else { + versions_ = null; versionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00100000); zone_ = ""; bitField0_ = (bitField0_ & ~0x00200000); return this; @@ -2646,7 +2374,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupManager other) zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2661,17 +2389,188 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManager 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 26989658 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 244202930 + case 380308522: + { + input.readMessage(getStatefulPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00008000; + break; + } // case 380308522 + case 503041912: + { + targetSize_ = input.readInt32(); + bitField0_ |= 0x00040000; + break; + } // case 503041912 + case 648762026: + { + instanceGroup_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 648762026 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 1111570338 + case 1299444954: + { + com.google.cloud.compute.v1.InstanceGroupManagerVersion m = + input.readMessage( + com.google.cloud.compute.v1.InstanceGroupManagerVersion.parser(), + extensionRegistry); + if (versionsBuilder_ == null) { + ensureVersionsIsMutable(); + versions_.add(m); + } else { + versionsBuilder_.addMessage(m); + } + break; + } // case 1299444954 + case 1312367034: + { + input.readMessage(getCurrentActionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 1312367034 + case 1406479170: + { + input.readMessage(getUpdatePolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 1406479170 + case 1450082194: + { + input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00010000; + break; + } // case 1450082194 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1877428002 + case -1820981470: + { + instanceTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -1820981470 + case -1606386358: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetPoolsIsMutable(); + targetPools_.add(s); + break; + } // case -1606386358 + case -1182115782: + { + baseInstanceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1182115782 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -911466526 + case -874177438: + { + com.google.cloud.compute.v1.NamedPort m = + input.readMessage( + com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry); + if (namedPortsBuilder_ == null) { + ensureNamedPortsIsMutable(); + namedPorts_.add(m); + } else { + namedPortsBuilder_.addMessage(m); + } + break; + } // case -874177438 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -645248918 + case -640574422: + { + com.google.cloud.compute.v1.InstanceGroupManagerAutoHealingPolicy m = + input.readMessage( + com.google.cloud.compute.v1.InstanceGroupManagerAutoHealingPolicy.parser(), + extensionRegistry); + if (autoHealingPoliciesBuilder_ == null) { + ensureAutoHealingPoliciesIsMutable(); + autoHealingPolicies_.add(m); + } else { + autoHealingPoliciesBuilder_.addMessage(m); + } + break; + } // case -640574422 + case -18498966: + { + input.readMessage( + getDistributionPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case -18498966 + 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.compute.v1.InstanceGroupManager) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6468,7 +6367,18 @@ public InstanceGroupManager parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManager(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerActionsSummary.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerActionsSummary.java index a7cd07a9c371..f1c367c733f7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerActionsSummary.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerActionsSummary.java @@ -50,124 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagerActionsSummary( - 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 27097536: - { - bitField0_ |= 0x00000010; - none_ = input.readInt32(); - break; - } - case 232911152: - { - bitField0_ |= 0x00000800; - suspending_ = input.readInt32(); - break; - } - case 840287136: - { - bitField0_ |= 0x00000400; - stopping_ = input.readInt32(); - break; - } - case 1608805712: - { - bitField0_ |= 0x00000100; - resuming_ = input.readInt32(); - break; - } - case 1678472648: - { - bitField0_ |= 0x00000002; - creating_ = input.readInt32(); - break; - } - case 1720359224: - { - bitField0_ |= 0x00000040; - refreshing_ = input.readInt32(); - break; - } - case 1944519168: - { - bitField0_ |= 0x00000200; - starting_ = input.readInt32(); - break; - } - case -2032198336: - { - bitField0_ |= 0x00000008; - deleting_ = input.readInt32(); - break; - } - case -1582510240: - { - bitField0_ |= 0x00000020; - recreating_ = input.readInt32(); - break; - } - case -1335633336: - { - bitField0_ |= 0x00000004; - creatingWithoutRetries_ = input.readInt32(); - break; - } - case -1316463720: - { - bitField0_ |= 0x00000080; - restarting_ = input.readInt32(); - break; - } - case -774780312: - { - bitField0_ |= 0x00000001; - abandoning_ = input.readInt32(); - break; - } - case -682064312: - { - bitField0_ |= 0x00001000; - verifying_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagerActionsSummary_descriptor; @@ -666,7 +548,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00001000) != 0)) { output.writeInt32(451612873, verifying_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -716,7 +598,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00001000) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(451612873, verifying_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -784,7 +666,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVerifying()) { if (getVerifying() != other.getVerifying()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -847,7 +729,7 @@ public int hashCode() { hash = (37 * hash) + VERIFYING_FIELD_NUMBER; hash = (53 * hash) + getVerifying(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -976,17 +858,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstanceGroupManagerActionsSummary.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 @@ -1191,7 +1066,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupManagerActions if (other.hasVerifying()) { setVerifying(other.getVerifying()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1206,19 +1081,109 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagerActionsSummary 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 27097536: + { + none_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 27097536 + case 232911152: + { + suspending_ = input.readInt32(); + bitField0_ |= 0x00000800; + break; + } // case 232911152 + case 840287136: + { + stopping_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 840287136 + case 1608805712: + { + resuming_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 1608805712 + case 1678472648: + { + creating_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 1678472648 + case 1720359224: + { + refreshing_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 1720359224 + case 1944519168: + { + starting_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case 1944519168 + case -2032198336: + { + deleting_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case -2032198336 + case -1582510240: + { + recreating_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case -1582510240 + case -1335633336: + { + creatingWithoutRetries_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case -1335633336 + case -1316463720: + { + restarting_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case -1316463720 + case -774780312: + { + abandoning_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -774780312 + case -682064312: + { + verifying_ = input.readInt32(); + bitField0_ |= 0x00001000; + break; + } // case -682064312 + 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.compute.v1.InstanceGroupManagerActionsSummary) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2129,7 +2094,18 @@ public InstanceGroupManagerActionsSummary parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagerActionsSummary(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAggregatedList.java index 2b863fe12afb..5a8357d63ac6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAggregatedList.java @@ -56,119 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagerAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.InstanceGroupManagersScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagerAggregatedList_descriptor; @@ -718,7 +605,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -763,7 +650,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -801,7 +688,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -840,7 +727,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1171,7 +1058,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupManagerAggrega if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1186,19 +1073,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagerAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.compute.v1.InstanceGroupManagersScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InstanceGroupManagerAggregatedList) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2262,7 +2210,18 @@ public InstanceGroupManagerAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagerAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAutoHealingPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAutoHealingPolicy.java index 2da7d76e0d5b..b5973d3b17c7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAutoHealingPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerAutoHealingPolicy.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagerAutoHealingPolicy( - 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 2105656016: - { - bitField0_ |= 0x00000002; - initialDelaySec_ = input.readInt32(); - break; - } - case -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - healthCheck_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagerAutoHealingPolicy_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 308876645, healthCheck_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(308876645, healthCheck_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -278,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInitialDelaySec()) { if (getInitialDelaySec() != other.getInitialDelaySec()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -297,7 +244,7 @@ public int hashCode() { hash = (37 * hash) + INITIAL_DELAY_SEC_FIELD_NUMBER; hash = (53 * hash) + getInitialDelaySec(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -428,17 +375,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagerAutoHealingPolicy.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 @@ -547,7 +487,7 @@ public Builder mergeFrom( if (other.hasInitialDelaySec()) { setInitialDelaySec(other.getInitialDelaySec()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -562,19 +502,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagerAutoHealingPolicy 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 2105656016: + { + initialDelaySec_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 2105656016 + case -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1823954134 + 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.compute.v1.InstanceGroupManagerAutoHealingPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -801,7 +765,18 @@ public InstanceGroupManagerAutoHealingPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagerAutoHealingPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerList.java index 513b3b80b9d5..115287f90ce1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerList.java @@ -56,106 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagerList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManager.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagerList_descriptor; @@ -575,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -602,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -639,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -674,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -826,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1005,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupManagerList ot if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1020,18 +921,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagerList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InstanceGroupManager m = + input.readMessage( + com.google.cloud.compute.v1.InstanceGroupManager.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InstanceGroupManagerList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2085,7 +2043,18 @@ public InstanceGroupManagerList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagerList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatus.java index 9fdb3496eba7..c1fb3924bcb6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatus.java @@ -51,95 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagerStatus( - 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 867286912: - { - bitField0_ |= 0x00000002; - isStable_ = input.readBool(); - break; - } - case 1955699298: - { - com.google.cloud.compute.v1.InstanceGroupManagerStatusStateful.Builder subBuilder = - null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = stateful_.toBuilder(); - } - stateful_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagerStatusStateful.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(stateful_); - stateful_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -1979877694: - { - com.google.cloud.compute.v1.InstanceGroupManagerStatusVersionTarget.Builder - subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = versionTarget_.toBuilder(); - } - versionTarget_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagerStatusVersionTarget.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(versionTarget_); - versionTarget_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case -156895558: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - autoscaler_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagerStatus_descriptor; @@ -393,7 +304,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517258967, autoscaler_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -415,7 +326,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517258967, autoscaler_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -447,7 +358,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVersionTarget()) { if (!getVersionTarget().equals(other.getVersionTarget())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -474,7 +385,7 @@ public int hashCode() { hash = (37 * hash) + VERSION_TARGET_FIELD_NUMBER; hash = (53 * hash) + getVersionTarget().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -756,7 +667,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupManagerStatus if (other.hasVersionTarget()) { mergeVersionTarget(other.getVersionTarget()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -771,18 +682,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagerStatus 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 867286912: + { + isStable_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 867286912 + case 1955699298: + { + input.readMessage(getStatefulFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 1955699298 + case -1979877694: + { + input.readMessage(getVersionTargetFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -1979877694 + case -156895558: + { + autoscaler_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -156895558 + 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.compute.v1.InstanceGroupManagerStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1433,7 +1381,18 @@ public InstanceGroupManagerStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagerStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusStateful.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusStateful.java index afc896cdaad3..8de179f211ad 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusStateful.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusStateful.java @@ -50,72 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagerStatusStateful( - 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 883793792: - { - bitField0_ |= 0x00000001; - hasStatefulConfig_ = input.readBool(); - break; - } - case -84847286: - { - com.google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs - .Builder - subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = perInstanceConfigs_.toBuilder(); - } - perInstanceConfigs_ = - input.readMessage( - com.google.cloud.compute.v1 - .InstanceGroupManagerStatusStatefulPerInstanceConfigs.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(perInstanceConfigs_); - perInstanceConfigs_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagerStatusStateful_descriptor; @@ -246,7 +180,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(526265001, getPerInstanceConfigs()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -263,7 +197,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 526265001, getPerInstanceConfigs()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -287,7 +221,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPerInstanceConfigs()) { if (!getPerInstanceConfigs().equals(other.getPerInstanceConfigs())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -306,7 +240,7 @@ public int hashCode() { hash = (37 * hash) + PER_INSTANCE_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + getPerInstanceConfigs().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -561,7 +495,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupManagerStatusS if (other.hasPerInstanceConfigs()) { mergePerInstanceConfigs(other.getPerInstanceConfigs()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -576,19 +510,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagerStatusStateful 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 883793792: + { + hasStatefulConfig_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 883793792 + case -84847286: + { + input.readMessage( + getPerInstanceConfigsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -84847286 + 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.compute.v1.InstanceGroupManagerStatusStateful) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -918,7 +877,18 @@ public InstanceGroupManagerStatusStateful parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagerStatusStateful(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusStatefulPerInstanceConfigs.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusStatefulPerInstanceConfigs.java index ad2177ad05a3..dd4ea28d048a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusStatefulPerInstanceConfigs.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusStatefulPerInstanceConfigs.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagerStatusStatefulPerInstanceConfigs( - 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 -162642872: - { - bitField0_ |= 0x00000001; - allEffective_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagerStatusStatefulPerInstanceConfigs_descriptor; @@ -165,7 +119,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(516540553, allEffective_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -177,7 +131,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(516540553, allEffective_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -199,7 +153,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAllEffective()) { if (getAllEffective() != other.getAllEffective()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -214,7 +168,7 @@ public int hashCode() { hash = (37 * hash) + ALL_EFFECTIVE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllEffective()); } - 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.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs.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 @@ -470,7 +417,7 @@ public Builder mergeFrom( if (other.hasAllEffective()) { setAllEffective(other.getAllEffective()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -485,20 +432,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs - 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 -162642872: + { + allEffective_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -162642872 + 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.compute.v1.InstanceGroupManagerStatusStatefulPerInstanceConfigs) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -610,8 +574,19 @@ public InstanceGroupManagerStatusStatefulPerInstanceConfigs parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagerStatusStatefulPerInstanceConfigs( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusVersionTarget.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusVersionTarget.java index 879860cabe9f..4d53dd3cb09c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusVersionTarget.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerStatusVersionTarget.java @@ -51,52 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagerStatusVersionTarget( - 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 -829294104: - { - bitField0_ |= 0x00000001; - isReached_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagerStatusVersionTarget_descriptor; @@ -163,7 +117,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(433209149, isReached_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -175,7 +129,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(433209149, isReached_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -195,7 +149,7 @@ public boolean equals(final java.lang.Object obj) { if (hasIsReached()) { if (getIsReached() != other.getIsReached()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -210,7 +164,7 @@ public int hashCode() { hash = (37 * hash) + IS_REACHED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsReached()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -341,17 +295,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagerStatusVersionTarget.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 @@ -451,7 +398,7 @@ public Builder mergeFrom( if (other.hasIsReached()) { setIsReached(other.getIsReached()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -466,19 +413,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagerStatusVersionTarget 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 -829294104: + { + isReached_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -829294104 + 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.compute.v1.InstanceGroupManagerStatusVersionTarget) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -585,7 +550,18 @@ public InstanceGroupManagerStatusVersionTarget parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagerStatusVersionTarget(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerUpdatePolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerUpdatePolicy.java index 586f62386c87..3b38e9bc66ab 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerUpdatePolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerUpdatePolicy.java @@ -56,113 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagerUpdatePolicy( - 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 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - type_ = s; - break; - } - case 528824426: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - mostDisruptiveAllowedAction_ = s; - break; - } - case -2130430814: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - minimalAction_ = s; - break; - } - case -1953923902: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - instanceRedistributionType_ = s; - break; - } - case -1874385766: - { - com.google.cloud.compute.v1.FixedOrPercent.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = maxSurge_.toBuilder(); - } - maxSurge_ = - input.readMessage( - com.google.cloud.compute.v1.FixedOrPercent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxSurge_); - maxSurge_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -1055445078: - { - com.google.cloud.compute.v1.FixedOrPercent.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = maxUnavailable_.toBuilder(); - } - maxUnavailable_ = - input.readMessage( - com.google.cloud.compute.v1.FixedOrPercent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maxUnavailable_); - maxUnavailable_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -247513742: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - replacementMethod_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagerUpdatePolicy_descriptor; @@ -1319,7 +1212,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 505931694, replacementMethod_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1355,7 +1248,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(505931694, replacementMethod_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1401,7 +1294,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1440,7 +1333,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1759,7 +1652,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupManagerUpdateP type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1774,18 +1667,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagerUpdatePolicy 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 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 28604882 + case 528824426: + { + mostDisruptiveAllowedAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 528824426 + case -2130430814: + { + minimalAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -2130430814 + case -1953923902: + { + instanceRedistributionType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1953923902 + case -1874385766: + { + input.readMessage(getMaxSurgeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1874385766 + case -1055445078: + { + input.readMessage(getMaxUnavailableFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -1055445078 + case -247513742: + { + replacementMethod_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -247513742 + 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.compute.v1.InstanceGroupManagerUpdatePolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2827,7 +2775,18 @@ public InstanceGroupManagerUpdatePolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagerUpdatePolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerVersion.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerVersion.java index d22bebb99536..01aa2f3489f5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerVersion.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagerVersion.java @@ -52,76 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagerVersion( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - name_ = s; - break; - } - case 503041914: - { - com.google.cloud.compute.v1.FixedOrPercent.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = targetSize_.toBuilder(); - } - targetSize_ = - input.readMessage( - com.google.cloud.compute.v1.FixedOrPercent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetSize_); - targetSize_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -1820981470: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - instanceTemplate_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagerVersion_descriptor; @@ -339,7 +269,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 309248228, instanceTemplate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -358,7 +288,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(309248228, instanceTemplate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -386,7 +316,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetSize()) { if (!getTargetSize().equals(other.getTargetSize())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -409,7 +339,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_SIZE_FIELD_NUMBER; hash = (53 * hash) + getTargetSize().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -675,7 +605,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupManagerVersion if (other.hasTargetSize()) { mergeTargetSize(other.getTargetSize()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -690,18 +620,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagerVersion 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26989658 + case 503041914: + { + input.readMessage(getTargetSizeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 503041914 + case -1820981470: + { + instanceTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1820981470 + 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.compute.v1.InstanceGroupManagerVersion) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1166,7 +1127,18 @@ public InstanceGroupManagerVersion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagerVersion(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersAbandonInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersAbandonInstancesRequest.java index 3829339e3e2e..a869b0229bb0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersAbandonInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersAbandonInstancesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersAbandonInstancesRequest( - 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 232780786: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.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)) { - instances_ = instances_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersAbandonInstancesRequest_descriptor; @@ -199,7 +146,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 29097598, instances_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -216,7 +163,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getInstancesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -234,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequest) obj; if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -249,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -381,17 +328,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequest.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 @@ -499,7 +439,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -514,19 +454,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersAbandonInstancesRequest 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 232780786: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstancesIsMutable(); + instances_.add(s); + break; + } // case 232780786 + 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.compute.v1.InstanceGroupManagersAbandonInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -736,7 +695,19 @@ public InstanceGroupManagersAbandonInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersAbandonInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersApplyUpdatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersApplyUpdatesRequest.java index 09e43cdbfb7f..8e429afc25fb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersApplyUpdatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersApplyUpdatesRequest.java @@ -56,79 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersApplyUpdatesRequest( - 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 232780786: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - instances_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - instances_.add(s); - break; - } - case 528824426: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - mostDisruptiveAllowedAction_ = s; - break; - } - case -2130430814: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - minimalAction_ = s; - break; - } - case -1065555200: - { - bitField0_ |= 0x00000001; - allInstances_ = 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 { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - instances_ = instances_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersApplyUpdatesRequest_descriptor; @@ -645,7 +572,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(403676512, allInstances_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -673,7 +600,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(403676512, allInstances_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -703,7 +630,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMostDisruptiveAllowedAction().equals(other.getMostDisruptiveAllowedAction())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -730,7 +657,7 @@ public int hashCode() { hash = (37 * hash) + MOST_DISRUPTIVE_ALLOWED_ACTION_FIELD_NUMBER; hash = (53 * hash) + getMostDisruptiveAllowedAction().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -862,17 +789,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequest.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 @@ -1011,7 +931,7 @@ public Builder mergeFrom( mostDisruptiveAllowedAction_ = other.mostDisruptiveAllowedAction_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1026,19 +946,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersApplyUpdatesRequest 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 232780786: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstancesIsMutable(); + instances_.add(s); + break; + } // case 232780786 + case 528824426: + { + mostDisruptiveAllowedAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 528824426 + case -2130430814: + { + minimalAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -2130430814 + case -1065555200: + { + allInstances_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1065555200 + 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.compute.v1.InstanceGroupManagersApplyUpdatesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1565,7 +1522,18 @@ public InstanceGroupManagersApplyUpdatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersApplyUpdatesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersCreateInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersCreateInstancesRequest.java index ca875ec71390..eed39a3590af 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersCreateInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersCreateInstancesRequest.java @@ -54,61 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersCreateInstancesRequest( - 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 232780786: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage( - com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry)); - 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)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersCreateInstancesRequest_descriptor; @@ -210,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { output.writeMessage(29097598, instances_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -222,7 +167,7 @@ public int getSerializedSize() { for (int i = 0; i < instances_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(29097598, instances_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -239,7 +184,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequest) obj; if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -254,7 +199,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -387,19 +332,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequest.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) { - getInstancesFieldBuilder(); - } } @java.lang.Override @@ -407,10 +343,11 @@ public Builder clear() { super.clear(); if (instancesBuilder_ == null) { instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instances_ = null; instancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -532,7 +469,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -547,19 +484,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersCreateInstancesRequest 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 232780786: + { + com.google.cloud.compute.v1.PerInstanceConfig m = + input.readMessage( + com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 232780786 + 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.compute.v1.InstanceGroupManagersCreateInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -952,7 +914,19 @@ public InstanceGroupManagersCreateInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersCreateInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersDeleteInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersDeleteInstancesRequest.java index 8290cf0fc27c..e81807a08d60 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersDeleteInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersDeleteInstancesRequest.java @@ -53,65 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersDeleteInstancesRequest( - 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 232780786: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add(s); - break; - } - case 325048584: - { - bitField0_ |= 0x00000001; - skipInstancesOnValidationError_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = instances_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersDeleteInstancesRequest_descriptor; @@ -242,7 +183,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(40631073, skipInstancesOnValidationError_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +205,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 40631073, skipInstancesOnValidationError_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -287,7 +228,7 @@ public boolean equals(final java.lang.Object obj) { if (getSkipInstancesOnValidationError() != other.getSkipInstancesOnValidationError()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -308,7 +249,7 @@ public int hashCode() { (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipInstancesOnValidationError()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -440,17 +381,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequest.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 @@ -569,7 +503,7 @@ public Builder mergeFrom( if (other.hasSkipInstancesOnValidationError()) { setSkipInstancesOnValidationError(other.getSkipInstancesOnValidationError()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -584,19 +518,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersDeleteInstancesRequest 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 232780786: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstancesIsMutable(); + instances_.add(s); + break; + } // case 232780786 + case 325048584: + { + skipInstancesOnValidationError_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 325048584 + 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.compute.v1.InstanceGroupManagersDeleteInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -873,7 +832,19 @@ public InstanceGroupManagersDeleteInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersDeleteInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersDeletePerInstanceConfigsReq.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersDeletePerInstanceConfigsReq.java index 6f6651e1c4f2..f540ff297423 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersDeletePerInstanceConfigsReq.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersDeletePerInstanceConfigsReq.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersDeletePerInstanceConfigsReq( - 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 836680258: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - names_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - names_.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)) { - names_ = names_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersDeletePerInstanceConfigsReq_descriptor; @@ -201,7 +148,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < names_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 104585032, names_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -218,7 +165,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getNamesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq) obj; if (!getNamesList().equals(other.getNamesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -251,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + NAMES_FIELD_NUMBER; hash = (53 * hash) + getNamesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -389,17 +336,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq.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 @@ -508,7 +448,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -523,20 +463,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq 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 836680258: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 836680258 + 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.compute.v1.InstanceGroupManagersDeletePerInstanceConfigsReq) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -747,7 +705,19 @@ public InstanceGroupManagersDeletePerInstanceConfigsReq parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersDeletePerInstanceConfigsReq(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListErrorsResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListErrorsResponse.java index e1c858582ad0..b2976b6f6895 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListErrorsResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListErrorsResponse.java @@ -54,70 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersListErrorsResponse( - 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 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - items_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.InstanceManagedByIgmError>(); - mutable_bitField0_ |= 0x00000001; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceManagedByIgmError.parser(), - extensionRegistry)); - 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)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersListErrorsResponse_descriptor; @@ -288,7 +224,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < items_.size(); i++) { output.writeMessage(100526016, items_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -303,7 +239,7 @@ public int getSerializedSize() { for (int i = 0; i < items_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(100526016, items_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -324,7 +260,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNextPageToken()) { if (!getNextPageToken().equals(other.getNextPageToken())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -343,7 +279,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; } @@ -474,19 +410,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersListErrorsResponse.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) { - getItemsFieldBuilder(); - } } @java.lang.Override @@ -494,10 +421,11 @@ public Builder clear() { super.clear(); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -630,7 +558,7 @@ public Builder mergeFrom( nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,19 +573,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersListErrorsResponse 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 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InstanceManagedByIgmError m = + input.readMessage( + com.google.cloud.compute.v1.InstanceManagedByIgmError.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + 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.compute.v1.InstanceGroupManagersListErrorsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1175,7 +1135,18 @@ public InstanceGroupManagersListErrorsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersListErrorsResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListManagedInstancesResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListManagedInstancesResponse.java index a4176120f9d4..2f5e96b427f0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListManagedInstancesResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListManagedInstancesResponse.java @@ -54,68 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersListManagedInstancesResponse( - 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 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - nextPageToken_ = s; - break; - } - case -1605210382: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - managedInstances_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - managedInstances_.add( - input.readMessage( - com.google.cloud.compute.v1.ManagedInstance.parser(), extensionRegistry)); - 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)) { - managedInstances_ = java.util.Collections.unmodifiableList(managedInstances_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersListManagedInstancesResponse_descriptor; @@ -287,7 +225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < managedInstances_.size(); i++) { output.writeMessage(336219614, managedInstances_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +242,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 336219614, managedInstances_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -326,7 +264,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNextPageToken()) { if (!getNextPageToken().equals(other.getNextPageToken())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -345,7 +283,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; } @@ -482,19 +420,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersListManagedInstancesResponse.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) { - getManagedInstancesFieldBuilder(); - } } @java.lang.Override @@ -502,10 +431,11 @@ public Builder clear() { super.clear(); if (managedInstancesBuilder_ == null) { managedInstances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + managedInstances_ = null; managedInstancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -642,7 +572,7 @@ public Builder mergeFrom( nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -657,20 +587,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersListManagedInstancesResponse 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 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 638380202 + case -1605210382: + { + com.google.cloud.compute.v1.ManagedInstance m = + input.readMessage( + com.google.cloud.compute.v1.ManagedInstance.parser(), extensionRegistry); + if (managedInstancesBuilder_ == null) { + ensureManagedInstancesIsMutable(); + managedInstances_.add(m); + } else { + managedInstancesBuilder_.addMessage(m); + } + break; + } // case -1605210382 + 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.compute.v1.InstanceGroupManagersListManagedInstancesResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1192,8 +1152,19 @@ public InstanceGroupManagersListManagedInstancesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersListManagedInstancesResponse( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListPerInstanceConfigsResp.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListPerInstanceConfigsResp.java index 7a826703273a..c624e9f8bc13 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListPerInstanceConfigsResp.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersListPerInstanceConfigsResp.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersListPerInstanceConfigsResp( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry)); - 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)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersListPerInstanceConfigsResp_descriptor; @@ -350,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < items_.size(); i++) { output.writeMessage(100526016, items_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -368,7 +291,7 @@ public int getSerializedSize() { for (int i = 0; i < items_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(100526016, items_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -394,7 +317,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -417,7 +340,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -575,10 +498,11 @@ public Builder clear() { super.clear(); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; bitField0_ = (bitField0_ & ~0x00000002); if (warningBuilder_ == null) { @@ -731,7 +655,7 @@ public Builder mergeFrom( if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -746,20 +670,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersListPerInstanceConfigsResp 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.PerInstanceConfig m = + input.readMessage( + com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + 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.compute.v1.InstanceGroupManagersListPerInstanceConfigsResp) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1457,7 +1417,19 @@ public InstanceGroupManagersListPerInstanceConfigsResp parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersListPerInstanceConfigsResp(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersPatchPerInstanceConfigsReq.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersPatchPerInstanceConfigsReq.java index 9e48d5f33f18..399c5d52b4df 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersPatchPerInstanceConfigsReq.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersPatchPerInstanceConfigsReq.java @@ -54,61 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersPatchPerInstanceConfigsReq( - 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 -84847286: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - perInstanceConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - perInstanceConfigs_.add( - input.readMessage( - com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry)); - 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)) { - perInstanceConfigs_ = java.util.Collections.unmodifiableList(perInstanceConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersPatchPerInstanceConfigsReq_descriptor; @@ -217,7 +162,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < perInstanceConfigs_.size(); i++) { output.writeMessage(526265001, perInstanceConfigs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -231,7 +176,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 526265001, perInstanceConfigs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -249,7 +194,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq) obj; if (!getPerInstanceConfigsList().equals(other.getPerInstanceConfigsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -264,7 +209,7 @@ public int hashCode() { hash = (37 * hash) + PER_INSTANCE_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + getPerInstanceConfigsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -402,19 +347,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq.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) { - getPerInstanceConfigsFieldBuilder(); - } } @java.lang.Override @@ -422,10 +358,11 @@ public Builder clear() { super.clear(); if (perInstanceConfigsBuilder_ == null) { perInstanceConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + perInstanceConfigs_ = null; perInstanceConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -548,7 +485,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -563,20 +500,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq 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 -84847286: + { + com.google.cloud.compute.v1.PerInstanceConfig m = + input.readMessage( + com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry); + if (perInstanceConfigsBuilder_ == null) { + ensurePerInstanceConfigsIsMutable(); + perInstanceConfigs_.add(m); + } else { + perInstanceConfigsBuilder_.addMessage(m); + } + break; + } // case -84847286 + 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.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -998,7 +959,19 @@ public InstanceGroupManagersPatchPerInstanceConfigsReq parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersPatchPerInstanceConfigsReq(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersRecreateInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersRecreateInstancesRequest.java index 1495cced9a03..a48361438e37 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersRecreateInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersRecreateInstancesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersRecreateInstancesRequest( - 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 232780786: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.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)) { - instances_ = instances_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersRecreateInstancesRequest_descriptor; @@ -200,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 29097598, instances_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -217,7 +164,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getInstancesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -235,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequest) obj; if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -250,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -382,17 +329,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequest.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 @@ -501,7 +441,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -516,20 +456,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequest 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 232780786: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstancesIsMutable(); + instances_.add(s); + break; + } // case 232780786 + 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.compute.v1.InstanceGroupManagersRecreateInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -739,7 +697,19 @@ public InstanceGroupManagersRecreateInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersRecreateInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersScopedList.java index 9d14bcb80821..9649b2f5c7a9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersScopedList.java @@ -52,78 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1712580738: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instanceGroupManagers_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instanceGroupManagers_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManager.parser(), - extensionRegistry)); - 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)) { - instanceGroupManagers_ = java.util.Collections.unmodifiableList(instanceGroupManagers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersScopedList_descriptor; @@ -287,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instanceGroupManagers_.size(); i++) { output.writeMessage(214072592, instanceGroupManagers_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +232,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 214072592, instanceGroupManagers_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -325,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -344,7 +272,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -494,10 +422,11 @@ public Builder clear() { super.clear(); if (instanceGroupManagersBuilder_ == null) { instanceGroupManagers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instanceGroupManagers_ = null; instanceGroupManagersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -631,7 +560,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupManagersScoped if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,18 +575,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 1712580738: + { + com.google.cloud.compute.v1.InstanceGroupManager m = + input.readMessage( + com.google.cloud.compute.v1.InstanceGroupManager.parser(), + extensionRegistry); + if (instanceGroupManagersBuilder_ == null) { + ensureInstanceGroupManagersIsMutable(); + instanceGroupManagers_.add(m); + } else { + instanceGroupManagersBuilder_.addMessage(m); + } + break; + } // case 1712580738 + 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.compute.v1.InstanceGroupManagersScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1280,7 +1242,18 @@ public InstanceGroupManagersScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersSetInstanceTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersSetInstanceTemplateRequest.java index 67a349d05aea..3375db21aadf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersSetInstanceTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersSetInstanceTemplateRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersSetInstanceTemplateRequest( - 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 -1820981470: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - instanceTemplate_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersSetInstanceTemplateRequest_descriptor; @@ -198,7 +151,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 309248228, instanceTemplate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -211,7 +164,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(309248228, instanceTemplate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -232,7 +185,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInstanceTemplate()) { if (!getInstanceTemplate().equals(other.getInstanceTemplate())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -247,7 +200,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCE_TEMPLATE_FIELD_NUMBER; hash = (53 * hash) + getInstanceTemplate().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -384,17 +337,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersSetInstanceTemplateRequest.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 @@ -499,7 +445,7 @@ public Builder mergeFrom( instanceTemplate_ = other.instanceTemplate_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -514,20 +460,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersSetInstanceTemplateRequest 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 -1820981470: + { + instanceTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1820981470 + 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.compute.v1.InstanceGroupManagersSetInstanceTemplateRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -690,7 +653,19 @@ public InstanceGroupManagersSetInstanceTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersSetInstanceTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersSetTargetPoolsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersSetTargetPoolsRequest.java index 4e37ce7c5b95..80cc4133b5d9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersSetTargetPoolsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersSetTargetPoolsRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersSetTargetPoolsRequest( - 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 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - fingerprint_ = s; - break; - } - case -1606386358: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - targetPools_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - targetPools_.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_ & 0x00000002) != 0)) { - targetPools_ = targetPools_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersSetTargetPoolsRequest_descriptor; @@ -275,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < targetPools_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 336072617, targetPools_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -295,7 +235,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getTargetPoolsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -316,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFingerprint().equals(other.getFingerprint())) return false; } if (!getTargetPoolsList().equals(other.getTargetPoolsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -335,7 +275,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_POOLS_FIELD_NUMBER; hash = (53 * hash) + getTargetPoolsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -466,17 +406,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersSetTargetPoolsRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,19 +544,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersSetTargetPoolsRequest 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 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1877428002 + case -1606386358: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetPoolsIsMutable(); + targetPools_.add(s); + break; + } // case -1606386358 + 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.compute.v1.InstanceGroupManagersSetTargetPoolsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -952,7 +910,19 @@ public InstanceGroupManagersSetTargetPoolsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersSetTargetPoolsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersUpdatePerInstanceConfigsReq.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersUpdatePerInstanceConfigsReq.java index 3532658f8da6..b93062c2479b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersUpdatePerInstanceConfigsReq.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupManagersUpdatePerInstanceConfigsReq.java @@ -54,61 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupManagersUpdatePerInstanceConfigsReq( - 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 -84847286: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - perInstanceConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - perInstanceConfigs_.add( - input.readMessage( - com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry)); - 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)) { - perInstanceConfigs_ = java.util.Collections.unmodifiableList(perInstanceConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupManagersUpdatePerInstanceConfigsReq_descriptor; @@ -217,7 +162,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < perInstanceConfigs_.size(); i++) { output.writeMessage(526265001, perInstanceConfigs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -231,7 +176,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 526265001, perInstanceConfigs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -249,7 +194,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReq) obj; if (!getPerInstanceConfigsList().equals(other.getPerInstanceConfigsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -264,7 +209,7 @@ public int hashCode() { hash = (37 * hash) + PER_INSTANCE_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + getPerInstanceConfigsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -402,19 +347,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReq.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) { - getPerInstanceConfigsFieldBuilder(); - } } @java.lang.Override @@ -422,10 +358,11 @@ public Builder clear() { super.clear(); if (perInstanceConfigsBuilder_ == null) { perInstanceConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + perInstanceConfigs_ = null; perInstanceConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -548,7 +485,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -563,20 +500,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReq 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 -84847286: + { + com.google.cloud.compute.v1.PerInstanceConfig m = + input.readMessage( + com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry); + if (perInstanceConfigsBuilder_ == null) { + ensurePerInstanceConfigsIsMutable(); + perInstanceConfigs_.add(m); + } else { + perInstanceConfigsBuilder_.addMessage(m); + } + break; + } // case -84847286 + 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.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReq) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -998,7 +959,19 @@ public InstanceGroupManagersUpdatePerInstanceConfigsReq parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupManagersUpdatePerInstanceConfigsReq(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsAddInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsAddInstancesRequest.java index 5430d66bf09a..f254b70d7b98 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsAddInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsAddInstancesRequest.java @@ -52,61 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupsAddInstancesRequest( - 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 232780786: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceReference.parser(), extensionRegistry)); - 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)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupsAddInstancesRequest_descriptor; @@ -208,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { output.writeMessage(29097598, instances_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -220,7 +165,7 @@ public int getSerializedSize() { for (int i = 0; i < instances_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(29097598, instances_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -237,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstanceGroupsAddInstancesRequest) obj; if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -252,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -381,19 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstanceGroupsAddInstancesRequest.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) { - getInstancesFieldBuilder(); - } } @java.lang.Override @@ -401,10 +337,11 @@ public Builder clear() { super.clear(); if (instancesBuilder_ == null) { instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instances_ = null; instancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -521,7 +458,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupsAddInstancesR } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -536,19 +473,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupsAddInstancesRequest 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 232780786: + { + com.google.cloud.compute.v1.InstanceReference m = + input.readMessage( + com.google.cloud.compute.v1.InstanceReference.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 232780786 + 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.compute.v1.InstanceGroupsAddInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -938,7 +900,18 @@ public InstanceGroupsAddInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupsAddInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsListInstances.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsListInstances.java index fa7f34da4096..ef8ba49a501c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsListInstances.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsListInstances.java @@ -55,106 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupsListInstances( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceWithNamedPorts.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupsListInstances_descriptor; @@ -574,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -601,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -638,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -673,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -825,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1004,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupsListInstances if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1019,18 +920,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupsListInstances 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InstanceWithNamedPorts m = + input.readMessage( + com.google.cloud.compute.v1.InstanceWithNamedPorts.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InstanceGroupsListInstances) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2087,7 +2045,18 @@ public InstanceGroupsListInstances parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupsListInstances(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsListInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsListInstancesRequest.java index 5fcbaeacd76b..3250b91dbbfe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsListInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsListInstancesRequest.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupsListInstancesRequest( - 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 737788730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - instanceState_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupsListInstancesRequest_descriptor; @@ -358,7 +311,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 92223591, instanceState_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -370,7 +323,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(92223591, instanceState_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -390,7 +343,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInstanceState()) { if (!getInstanceState().equals(other.getInstanceState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -405,7 +358,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCE_STATE_FIELD_NUMBER; hash = (53 * hash) + getInstanceState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -534,17 +487,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstanceGroupsListInstancesRequest.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 @@ -643,7 +589,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupsListInstances instanceState_ = other.instanceState_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -658,19 +604,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupsListInstancesRequest 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 737788730: + { + instanceState_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 737788730 + 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.compute.v1.InstanceGroupsListInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -836,7 +800,18 @@ public InstanceGroupsListInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupsListInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsRemoveInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsRemoveInstancesRequest.java index 59081175bf3a..9691be3bc14e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsRemoveInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsRemoveInstancesRequest.java @@ -53,61 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupsRemoveInstancesRequest( - 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 232780786: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceReference.parser(), extensionRegistry)); - 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)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupsRemoveInstancesRequest_descriptor; @@ -209,7 +154,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { output.writeMessage(29097598, instances_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -221,7 +166,7 @@ public int getSerializedSize() { for (int i = 0; i < instances_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(29097598, instances_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -238,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequest) obj; if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -253,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -382,19 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequest.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) { - getInstancesFieldBuilder(); - } } @java.lang.Override @@ -402,10 +338,11 @@ public Builder clear() { super.clear(); if (instancesBuilder_ == null) { instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instances_ = null; instancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -523,7 +460,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,19 +475,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequest 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 232780786: + { + com.google.cloud.compute.v1.InstanceReference m = + input.readMessage( + com.google.cloud.compute.v1.InstanceReference.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 232780786 + 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.compute.v1.InstanceGroupsRemoveInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -941,7 +903,18 @@ public InstanceGroupsRemoveInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupsRemoveInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsScopedList.java index 96866a189c03..a7f8dfab85ee 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupsScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1363212814: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instanceGroups_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instanceGroups_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceGroup.parser(), extensionRegistry)); - 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)) { - instanceGroups_ = java.util.Collections.unmodifiableList(instanceGroups_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupsScopedList_descriptor; @@ -273,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instanceGroups_.size(); i++) { output.writeMessage(366469310, instanceGroups_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +219,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 366469310, instanceGroups_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +240,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +259,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -479,10 +408,11 @@ public Builder clear() { super.clear(); if (instanceGroupsBuilder_ == null) { instanceGroups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instanceGroups_ = null; instanceGroupsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -616,7 +546,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupsScopedList ot if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -631,18 +561,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupsScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1363212814: + { + com.google.cloud.compute.v1.InstanceGroup m = + input.readMessage( + com.google.cloud.compute.v1.InstanceGroup.parser(), extensionRegistry); + if (instanceGroupsBuilder_ == null) { + ensureInstanceGroupsIsMutable(); + instanceGroups_.add(m); + } else { + instanceGroupsBuilder_.addMessage(m); + } + break; + } // case -1363212814 + 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.compute.v1.InstanceGroupsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1221,7 +1183,18 @@ public InstanceGroupsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsSetNamedPortsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsSetNamedPortsRequest.java index 959ad3120fa8..704305e78957 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsSetNamedPortsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceGroupsSetNamedPortsRequest.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceGroupsSetNamedPortsRequest( - 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 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - fingerprint_ = s; - break; - } - case -874177438: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - namedPorts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - namedPorts_.add( - input.readMessage( - com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry)); - 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_ & 0x00000002) != 0)) { - namedPorts_ = java.util.Collections.unmodifiableList(namedPorts_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceGroupsSetNamedPortsRequest_descriptor; @@ -283,7 +222,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < namedPorts_.size(); i++) { output.writeMessage(427598732, namedPorts_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -299,7 +238,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(427598732, namedPorts_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +259,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFingerprint().equals(other.getFingerprint())) return false; } if (!getNamedPortsList().equals(other.getNamedPortsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -339,7 +278,7 @@ public int hashCode() { hash = (37 * hash) + NAMED_PORTS_FIELD_NUMBER; hash = (53 * hash) + getNamedPortsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -468,19 +407,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstanceGroupsSetNamedPortsRequest.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) { - getNamedPortsFieldBuilder(); - } } @java.lang.Override @@ -490,10 +420,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (namedPortsBuilder_ == null) { namedPorts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + namedPorts_ = null; namedPortsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -621,7 +552,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceGroupsSetNamedPorts } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -636,19 +567,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceGroupsSetNamedPortsRequest 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 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1877428002 + case -874177438: + { + com.google.cloud.compute.v1.NamedPort m = + input.readMessage( + com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry); + if (namedPortsBuilder_ == null) { + ensureNamedPortsIsMutable(); + namedPorts_.add(m); + } else { + namedPortsBuilder_.addMessage(m); + } + break; + } // case -874177438 + 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.compute.v1.InstanceGroupsSetNamedPortsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1157,7 +1119,18 @@ public InstanceGroupsSetNamedPortsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceGroupsSetNamedPortsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceList.java index 130ccd249c8e..7e6519d0572b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Instance.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -823,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Instance m = + input.readMessage( + com.google.cloud.compute.v1.Instance.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InstanceList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2078,7 +2038,18 @@ public InstanceList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceListReferrers.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceListReferrers.java index eeb2827e0653..eeb3909865fc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceListReferrers.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceListReferrers.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceListReferrers( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Reference.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceListReferrers_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceListReferrers other if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,18 +921,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceListReferrers 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Reference m = + input.readMessage( + com.google.cloud.compute.v1.Reference.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InstanceListReferrers) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2081,7 +2040,18 @@ public InstanceListReferrers parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceListReferrers(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmError.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmError.java index 6b2d80020834..fe823e465349 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmError.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmError.java @@ -51,91 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceManagedByIgmError( - 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 441010354: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - timestamp_ = s; - break; - } - case 774279234: - { - com.google.cloud.compute.v1.InstanceManagedByIgmErrorManagedInstanceError.Builder - subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = error_.toBuilder(); - } - error_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceManagedByIgmErrorManagedInstanceError - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1957170918: - { - com.google.cloud.compute.v1.InstanceManagedByIgmErrorInstanceActionDetails.Builder - subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = instanceActionDetails_.toBuilder(); - } - instanceActionDetails_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceManagedByIgmErrorInstanceActionDetails - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceActionDetails_); - instanceActionDetails_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceManagedByIgmError_descriptor; @@ -359,7 +274,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(292224547, getInstanceActionDetails()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -379,7 +294,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 292224547, getInstanceActionDetails()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -407,7 +322,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTimestamp()) { if (!getTimestamp().equals(other.getTimestamp())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -430,7 +345,7 @@ public int hashCode() { hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getTimestamp().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -703,7 +618,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceManagedByIgmError o timestamp_ = other.timestamp_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -718,18 +633,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceManagedByIgmError 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 441010354: + { + timestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 441010354 + case 774279234: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 774279234 + case -1957170918: + { + input.readMessage( + getInstanceActionDetailsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1957170918 + 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.compute.v1.InstanceManagedByIgmError) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1320,7 +1267,18 @@ public InstanceManagedByIgmError parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceManagedByIgmError(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorInstanceActionDetails.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorInstanceActionDetails.java index 4aeb2b8c3711..ac7b23b9e45d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorInstanceActionDetails.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorInstanceActionDetails.java @@ -54,77 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceManagedByIgmErrorInstanceActionDetails( - 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 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - instance_ = s; - break; - } - case 1501295026: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - action_ = s; - break; - } - case -1482103102: - { - com.google.cloud.compute.v1.ManagedInstanceVersion.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = version_.toBuilder(); - } - version_ = - input.readMessage( - com.google.cloud.compute.v1.ManagedInstanceVersion.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(version_); - version_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceManagedByIgmErrorInstanceActionDetails_descriptor; @@ -749,7 +678,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(351608024, getVersion()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -767,7 +696,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(351608024, getVersion()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -796,7 +725,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVersion()) { if (!getVersion().equals(other.getVersion())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -819,7 +748,7 @@ public int hashCode() { hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1101,7 +1030,7 @@ public Builder mergeFrom( if (other.hasVersion()) { mergeVersion(other.getVersion()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1116,20 +1045,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceManagedByIgmErrorInstanceActionDetails 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 146056362: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 146056362 + case 1501295026: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1501295026 + case -1482103102: + { + input.readMessage(getVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -1482103102 + 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.compute.v1.InstanceManagedByIgmErrorInstanceActionDetails) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1605,7 +1563,19 @@ public InstanceManagedByIgmErrorInstanceActionDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceManagedByIgmErrorInstanceActionDetails(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorManagedInstanceError.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorManagedInstanceError.java index 508fb6a12964..64e20e028c48 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorManagedInstanceError.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceManagedByIgmErrorManagedInstanceError.java @@ -54,60 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceManagedByIgmErrorManagedInstanceError( - 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 24473450: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - code_ = s; - break; - } - case -950534086: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - message_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceManagedByIgmErrorManagedInstanceError_descriptor; @@ -273,7 +219,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 418054151, message_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +234,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(418054151, message_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +259,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMessage()) { if (!getMessage().equals(other.getMessage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -332,7 +278,7 @@ public int hashCode() { hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -464,17 +410,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstanceManagedByIgmErrorManagedInstanceError.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 @@ -590,7 +529,7 @@ public Builder mergeFrom( message_ = other.message_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -605,20 +544,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceManagedByIgmErrorManagedInstanceError 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 24473450: + { + code_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24473450 + case -950534086: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -950534086 + 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.compute.v1.InstanceManagedByIgmErrorManagedInstanceError) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -900,7 +862,19 @@ public InstanceManagedByIgmErrorManagedInstanceError parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceManagedByIgmErrorManagedInstanceError(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceMoveRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceMoveRequest.java index 72ef3e706dce..d3c6150826d0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceMoveRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceMoveRequest.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceMoveRequest( - 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 1054837226: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - destinationZone_ = s; - break; - } - case -1976812518: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - targetInstance_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceMoveRequest_descriptor; @@ -270,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 289769347, targetInstance_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -285,7 +231,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(289769347, targetInstance_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetInstance()) { if (!getTargetInstance().equals(other.getTargetInstance())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getTargetInstance().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -456,17 +402,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstanceMoveRequest.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 @@ -574,7 +513,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceMoveRequest other) targetInstance_ = other.targetInstance_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -589,17 +528,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceMoveRequest 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 1054837226: + { + destinationZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1054837226 + case -1976812518: + { + targetInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1976812518 + 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.compute.v1.InstanceMoveRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -877,7 +842,18 @@ public InstanceMoveRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceMoveRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceParams.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceParams.java index 1f61195678a8..694a1a67d8b7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceParams.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceParams.java @@ -50,64 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceParams( - 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 -1273597982: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourceManagerTags_ = - com.google.protobuf.MapField.newMapField( - ResourceManagerTagsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - resourceManagerTags__ = - input.readMessage( - ResourceManagerTagsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - resourceManagerTags_ - .getMutableMap() - .put(resourceManagerTags__.getKey(), resourceManagerTags__.getValue()); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceParams_descriptor; @@ -256,7 +198,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io internalGetResourceManagerTags(), ResourceManagerTagsDefaultEntryHolder.defaultEntry, 377671164); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -277,7 +219,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 377671164, resourceManagerTags__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -295,7 +237,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetResourceManagerTags().equals(other.internalGetResourceManagerTags())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -310,7 +252,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_MANAGER_TAGS_FIELD_NUMBER; hash = (53 * hash) + internalGetResourceManagerTags().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,17 +401,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.InstanceParams.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 @@ -556,7 +491,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.compute.v1.InstanceParams other) { if (other == com.google.cloud.compute.v1.InstanceParams.getDefaultInstance()) return this; internalGetMutableResourceManagerTags().mergeFrom(other.internalGetResourceManagerTags()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -571,17 +506,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceParams 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 -1273597982: + { + com.google.protobuf.MapEntry + resourceManagerTags__ = + input.readMessage( + ResourceManagerTagsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableResourceManagerTags() + .getMutableMap() + .put(resourceManagerTags__.getKey(), resourceManagerTags__.getValue()); + break; + } // case -1273597982 + 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.compute.v1.InstanceParams) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -784,7 +745,18 @@ public InstanceParams parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceParams(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java index 3f3b2cdb9e8f..a5c51aeab6de 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceProperties.java @@ -60,321 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceProperties( - 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 28418250: - { - com.google.cloud.compute.v1.Tags.Builder subBuilder = null; - if (((bitField0_ & 0x00002000) != 0)) { - subBuilder = tags_.toBuilder(); - } - tags_ = - input.readMessage(com.google.cloud.compute.v1.Tags.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tags_); - tags_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00002000; - break; - } - case 102903210: - { - com.google.cloud.compute.v1.ShieldedInstanceConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00001000) != 0)) { - subBuilder = shieldedInstanceConfig_.toBuilder(); - } - shieldedInstanceConfig_ = - input.readMessage( - com.google.cloud.compute.v1.ShieldedInstanceConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shieldedInstanceConfig_); - shieldedInstanceConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00001000; - break; - } - case 177763082: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00010000) != 0)) { - resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00010000; - } - resourcePolicies_.add(s); - break; - } - case 386216050: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - privateIpv6GoogleAccess_ = s; - break; - } - case 421881946: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - networkInterfaces_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - networkInterfaces_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkInterface.parser(), extensionRegistry)); - break; - } - case 694933882: - { - com.google.cloud.compute.v1.Metadata.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = metadata_.toBuilder(); - } - metadata_ = - input.readMessage( - com.google.cloud.compute.v1.Metadata.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metadata_); - metadata_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case 764752818: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - disks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - disks_.add( - input.readMessage( - com.google.cloud.compute.v1.AttachedDisk.parser(), extensionRegistry)); - break; - } - case 1262805466: - { - com.google.cloud.compute.v1.ReservationAffinity.Builder subBuilder = null; - if (((bitField0_ & 0x00000400) != 0)) { - subBuilder = reservationAffinity_.toBuilder(); - } - reservationAffinity_ = - input.readMessage( - com.google.cloud.compute.v1.ReservationAffinity.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reservationAffinity_); - reservationAffinity_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000400; - break; - } - case 1821688210: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - machineType_ = s; - break; - } - case 1887531794: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - keyRevocationActionType_ = s; - break; - } - case 1943302074: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - minCpuPlatform_ = s; - break; - } - case -2074668670: - { - if (!((mutable_bitField0_ & 0x00040000) != 0)) { - serviceAccounts_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00040000; - } - serviceAccounts_.add( - input.readMessage( - com.google.cloud.compute.v1.ServiceAccount.parser(), extensionRegistry)); - break; - } - case -1273597982: - { - if (!((mutable_bitField0_ & 0x00008000) != 0)) { - resourceManagerTags_ = - com.google.protobuf.MapField.newMapField( - ResourceManagerTagsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00008000; - } - com.google.protobuf.MapEntry - resourceManagerTags__ = - input.readMessage( - ResourceManagerTagsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - resourceManagerTags_ - .getMutableMap() - .put(resourceManagerTags__.getKey(), resourceManagerTags__.getValue()); - break; - } - case -1201460062: - { - com.google.cloud.compute.v1.Scheduling.Builder subBuilder = null; - if (((bitField0_ & 0x00000800) != 0)) { - subBuilder = scheduling_.toBuilder(); - } - scheduling_ = - input.readMessage( - com.google.cloud.compute.v1.Scheduling.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(scheduling_); - scheduling_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000800; - break; - } - case -1108320494: - { - com.google.cloud.compute.v1.NetworkPerformanceConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = networkPerformanceConfig_.toBuilder(); - } - networkPerformanceConfig_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkPerformanceConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkPerformanceConfig_); - networkPerformanceConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case -1017799278: - { - com.google.cloud.compute.v1.AdvancedMachineFeatures.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = advancedMachineFeatures_.toBuilder(); - } - advancedMachineFeatures_ = - input.readMessage( - com.google.cloud.compute.v1.AdvancedMachineFeatures.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(advancedMachineFeatures_); - advancedMachineFeatures_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - description_ = s; - break; - } - case -586206342: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - guestAccelerators_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - guestAccelerators_.add( - input.readMessage( - com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry)); - break; - } - case -553116704: - { - bitField0_ |= 0x00000002; - canIpForward_ = input.readBool(); - break; - } - case -369865814: - { - com.google.cloud.compute.v1.ConfidentialInstanceConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = confidentialInstanceConfig_.toBuilder(); - } - confidentialInstanceConfig_ = - input.readMessage( - com.google.cloud.compute.v1.ConfidentialInstanceConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(confidentialInstanceConfig_); - confidentialInstanceConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000080; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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_ & 0x00010000) != 0)) { - resourcePolicies_ = resourcePolicies_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000800) != 0)) { - networkInterfaces_ = java.util.Collections.unmodifiableList(networkInterfaces_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - disks_ = java.util.Collections.unmodifiableList(disks_); - } - if (((mutable_bitField0_ & 0x00040000) != 0)) { - serviceAccounts_ = java.util.Collections.unmodifiableList(serviceAccounts_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - guestAccelerators_ = java.util.Collections.unmodifiableList(guestAccelerators_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceProperties_descriptor; @@ -2182,7 +1867,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2295,7 +1980,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2376,7 +2061,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTags()) { if (!getTags().equals(other.getTags())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2471,7 +2156,7 @@ public int hashCode() { hash = (37 * hash) + TAGS_FIELD_NUMBER; hash = (53 * hash) + getTags().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2670,16 +2355,18 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000008); if (disksBuilder_ == null) { disks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + disks_ = null; disksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); if (guestAcceleratorsBuilder_ == null) { guestAccelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); } else { + guestAccelerators_ = null; guestAcceleratorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000020); keyRevocationActionType_ = ""; bitField0_ = (bitField0_ & ~0x00000040); internalGetMutableLabels().clear(); @@ -2695,10 +2382,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (networkInterfacesBuilder_ == null) { networkInterfaces_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + networkInterfaces_ = null; networkInterfacesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); if (networkPerformanceConfigBuilder_ == null) { networkPerformanceConfig_ = null; } else { @@ -2724,10 +2412,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00020000); if (serviceAccountsBuilder_ == null) { serviceAccounts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00040000); } else { + serviceAccounts_ = null; serviceAccountsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00040000); if (shieldedInstanceConfigBuilder_ == null) { shieldedInstanceConfig_ = null; } else { @@ -3124,7 +2813,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceProperties other) { if (other.hasTags()) { mergeTags(other.getTags()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3139,17 +2828,202 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceProperties 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 28418250: + { + input.readMessage(getTagsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00100000; + break; + } // case 28418250 + case 102903210: + { + input.readMessage( + getShieldedInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00080000; + break; + } // case 102903210 + case 177763082: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 177763082 + case 386216050: + { + privateIpv6GoogleAccess_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 386216050 + case 421881946: + { + com.google.cloud.compute.v1.NetworkInterface m = + input.readMessage( + com.google.cloud.compute.v1.NetworkInterface.parser(), extensionRegistry); + if (networkInterfacesBuilder_ == null) { + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.add(m); + } else { + networkInterfacesBuilder_.addMessage(m); + } + break; + } // case 421881946 + case 694933882: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 694933882 + case 764752818: + { + com.google.cloud.compute.v1.AttachedDisk m = + input.readMessage( + com.google.cloud.compute.v1.AttachedDisk.parser(), extensionRegistry); + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(m); + } else { + disksBuilder_.addMessage(m); + } + break; + } // case 764752818 + case 1262805466: + { + input.readMessage( + getReservationAffinityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case 1262805466 + case 1821688210: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 1821688210 + case 1887531794: + { + keyRevocationActionType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1887531794 + case 1943302074: + { + minCpuPlatform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1943302074 + case -2074668670: + { + com.google.cloud.compute.v1.ServiceAccount m = + input.readMessage( + com.google.cloud.compute.v1.ServiceAccount.parser(), extensionRegistry); + if (serviceAccountsBuilder_ == null) { + ensureServiceAccountsIsMutable(); + serviceAccounts_.add(m); + } else { + serviceAccountsBuilder_.addMessage(m); + } + break; + } // case -2074668670 + case -1273597982: + { + com.google.protobuf.MapEntry + resourceManagerTags__ = + input.readMessage( + ResourceManagerTagsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableResourceManagerTags() + .getMutableMap() + .put(resourceManagerTags__.getKey(), resourceManagerTags__.getValue()); + break; + } // case -1273597982 + case -1201460062: + { + input.readMessage(getSchedulingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00020000; + break; + } // case -1201460062 + case -1108320494: + { + input.readMessage( + getNetworkPerformanceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case -1108320494 + case -1017799278: + { + input.readMessage( + getAdvancedMachineFeaturesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -1017799278 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -586206342: + { + com.google.cloud.compute.v1.AcceleratorConfig m = + input.readMessage( + com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry); + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.add(m); + } else { + guestAcceleratorsBuilder_.addMessage(m); + } + break; + } // case -586206342 + case -553116704: + { + canIpForward_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -553116704 + case -369865814: + { + input.readMessage( + getConfidentialInstanceConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -369865814 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.InstanceProperties) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7410,7 +7284,18 @@ public InstanceProperties parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceProperties(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceReference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceReference.java index 060a91dbd760..58ca58067932 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceReference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceReference.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceReference( - 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 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - instance_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceReference_descriptor; @@ -195,7 +148,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 18257045, instance_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +160,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18257045, instance_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +180,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInstance()) { if (!getInstance().equals(other.getInstance())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +195,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getInstance().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -370,17 +323,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstanceReference.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 @@ -476,7 +422,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceReference other) { instance_ = other.instance_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -491,17 +437,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceReference 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 146056362: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 146056362 + 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.compute.v1.InstanceReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -659,7 +625,18 @@ public InstanceReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceReference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceTemplate.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceTemplate.java index dd19c984767f..3396cb1da26a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceTemplate.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceTemplate.java @@ -57,126 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceTemplate( - 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 26840: - { - bitField0_ |= 0x00000004; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 1082737250: - { - com.google.cloud.compute.v1.SourceInstanceParams.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = sourceInstanceParams_.toBuilder(); - } - sourceInstanceParams_ = - input.readMessage( - com.google.cloud.compute.v1.SourceInstanceParams.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceInstanceParams_); - sourceInstanceParams_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case 1181510042: - { - com.google.cloud.compute.v1.InstanceProperties.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = properties_.toBuilder(); - } - properties_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceProperties.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(properties_); - properties_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case -1124441654: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - sourceInstance_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceTemplate_descriptor; @@ -758,7 +638,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -797,7 +677,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -849,7 +729,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceInstanceParams()) { if (!getSourceInstanceParams().equals(other.getSourceInstanceParams())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -896,7 +776,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_INSTANCE_PARAMS_FIELD_NUMBER; hash = (53 * hash) + getSourceInstanceParams().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1232,7 +1112,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceTemplate other) { if (other.hasSourceInstanceParams()) { mergeSourceInstanceParams(other.getSourceInstanceParams()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1247,17 +1127,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceTemplate 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 1082737250: + { + input.readMessage( + getSourceInstanceParamsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 1082737250 + case 1181510042: + { + input.readMessage(getPropertiesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 1181510042 + case -1124441654: + { + sourceInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -1124441654 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -645248918 + 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.compute.v1.InstanceTemplate) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2478,7 +2427,18 @@ public InstanceTemplate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceTemplate(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceTemplateList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceTemplateList.java index 3fd85af88ca3..1c38236561ba 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceTemplateList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceTemplateList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceTemplateList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceTemplate.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceTemplateList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceTemplateList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,17 +921,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceTemplateList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InstanceTemplate m = + input.readMessage( + com.google.cloud.compute.v1.InstanceTemplate.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InstanceTemplateList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2081,7 +2041,18 @@ public InstanceTemplateList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceTemplateList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceWithNamedPorts.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceWithNamedPorts.java index 99b186349580..d27735a3b47e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceWithNamedPorts.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceWithNamedPorts.java @@ -53,74 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstanceWithNamedPorts( - 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 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - instance_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - status_ = s; - break; - } - case -874177438: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - namedPorts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - namedPorts_.add( - input.readMessage( - com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry)); - 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_ & 0x00000002) != 0)) { - namedPorts_ = java.util.Collections.unmodifiableList(namedPorts_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstanceWithNamedPorts_descriptor; @@ -695,7 +627,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < namedPorts_.size(); i++) { output.writeMessage(427598732, namedPorts_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -714,7 +646,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(427598732, namedPorts_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -739,7 +671,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -762,7 +694,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -890,19 +822,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstanceWithNamedPorts.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) { - getNamedPortsFieldBuilder(); - } } @java.lang.Override @@ -912,10 +835,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (namedPortsBuilder_ == null) { namedPorts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + namedPorts_ = null; namedPortsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); status_ = ""; bitField0_ = (bitField0_ & ~0x00000004); return this; @@ -1052,7 +976,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstanceWithNamedPorts othe status_ = other.status_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1067,18 +991,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstanceWithNamedPorts 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 146056362: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 146056362 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1450082194 + case -874177438: + { + com.google.cloud.compute.v1.NamedPort m = + input.readMessage( + com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry); + if (namedPortsBuilder_ == null) { + ensureNamedPortsIsMutable(); + namedPorts_.add(m); + } else { + namedPortsBuilder_.addMessage(m); + } + break; + } // case -874177438 + 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.compute.v1.InstanceWithNamedPorts) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1711,7 +1673,18 @@ public InstanceWithNamedPorts parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstanceWithNamedPorts(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesAddResourcePoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesAddResourcePoliciesRequest.java index a05accadd4d8..f93240506022 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesAddResourcePoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesAddResourcePoliciesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesAddResourcePoliciesRequest( - 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 177763082: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - resourcePolicies_.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)) { - resourcePolicies_ = resourcePolicies_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesAddResourcePoliciesRequest_descriptor; @@ -200,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 22220385, resourcePolicies_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -217,7 +164,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getResourcePoliciesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -234,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstancesAddResourcePoliciesRequest) obj; if (!getResourcePoliciesList().equals(other.getResourcePoliciesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -249,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_POLICIES_FIELD_NUMBER; hash = (53 * hash) + getResourcePoliciesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -378,17 +325,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstancesAddResourcePoliciesRequest.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 +432,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -507,19 +447,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesAddResourcePoliciesRequest 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 177763082: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 177763082 + 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.compute.v1.InstancesAddResourcePoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -727,7 +686,18 @@ public InstancesAddResourcePoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesAddResourcePoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetEffectiveFirewallsResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetEffectiveFirewallsResponse.java index c7cfa35d0e0a..284940daa252 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetEffectiveFirewallsResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetEffectiveFirewallsResponse.java @@ -54,79 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesGetEffectiveFirewallsResponse( - 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 -2117002342: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - firewalls_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - firewalls_.add( - input.readMessage( - com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry)); - break; - } - case -1007080942: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - firewallPolicys_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy>(); - mutable_bitField0_ |= 0x00000001; - } - firewallPolicys_.add( - input.readMessage( - com.google.cloud.compute.v1 - .InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.parser(), - extensionRegistry)); - 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_ & 0x00000002) != 0)) { - firewalls_ = java.util.Collections.unmodifiableList(firewalls_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - firewallPolicys_ = java.util.Collections.unmodifiableList(firewallPolicys_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesGetEffectiveFirewallsResponse_descriptor; @@ -320,7 +247,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < firewallPolicys_.size(); i++) { output.writeMessage(410985794, firewallPolicys_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +265,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 410985794, firewallPolicys_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -356,7 +283,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFirewallPolicysList().equals(other.getFirewallPolicysList())) return false; if (!getFirewallsList().equals(other.getFirewallsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -375,7 +302,7 @@ public int hashCode() { hash = (37 * hash) + FIREWALLS_FIELD_NUMBER; hash = (53 * hash) + getFirewallsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -506,20 +433,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponse.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) { - getFirewallPolicysFieldBuilder(); - getFirewallsFieldBuilder(); - } } @java.lang.Override @@ -527,16 +444,18 @@ public Builder clear() { super.clear(); if (firewallPolicysBuilder_ == null) { firewallPolicys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + firewallPolicys_ = null; firewallPolicysBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (firewallsBuilder_ == null) { firewalls_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + firewalls_ = null; firewallsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -692,7 +611,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -707,19 +626,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponse 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 -2117002342: + { + com.google.cloud.compute.v1.Firewall m = + input.readMessage( + com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry); + if (firewallsBuilder_ == null) { + ensureFirewallsIsMutable(); + firewalls_.add(m); + } else { + firewallsBuilder_.addMessage(m); + } + break; + } // case -2117002342 + case -1007080942: + { + com.google.cloud.compute.v1 + .InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy + m = + input.readMessage( + com.google.cloud.compute.v1 + .InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy + .parser(), + extensionRegistry); + if (firewallPolicysBuilder_ == null) { + ensureFirewallPolicysIsMutable(); + firewallPolicys_.add(m); + } else { + firewallPolicysBuilder_.addMessage(m); + } + break; + } // case -1007080942 + 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.compute.v1.InstancesGetEffectiveFirewallsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1555,7 +1517,18 @@ public InstancesGetEffectiveFirewallsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesGetEffectiveFirewallsResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java index e128723e0ae3..e802ce1c628a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java @@ -58,88 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - name_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - type_ = s; - break; - } - case 35790658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - displayName_ = s; - break; - } - case 870991802: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - rules_.add( - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry)); - break; - } - case -358554766: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - shortName_ = 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_ & 0x00000004) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy_descriptor; @@ -656,7 +574,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 492051566, shortName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -680,7 +598,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(492051566, shortName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -719,7 +637,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -750,7 +668,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -903,19 +821,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.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) { - getRulesFieldBuilder(); - } } @java.lang.Override @@ -927,10 +836,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); shortName_ = ""; bitField0_ = (bitField0_ & ~0x00000008); type_ = ""; @@ -1104,7 +1014,7 @@ public Builder mergeFrom( type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1119,21 +1029,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy - 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26989658 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 28604882 + case 35790658: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 35790658 + case 870991802: + { + com.google.cloud.compute.v1.FirewallPolicyRule m = + input.readMessage( + com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 870991802 + case -358554766: + { + shortName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -358554766 + 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.compute.v1 - .InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2016,8 +1973,19 @@ public InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy parsePartia com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicy( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesRemoveResourcePoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesRemoveResourcePoliciesRequest.java index 11b520d64f17..bf65304a8fb0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesRemoveResourcePoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesRemoveResourcePoliciesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesRemoveResourcePoliciesRequest( - 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 177763082: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - resourcePolicies_.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)) { - resourcePolicies_ = resourcePolicies_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesRemoveResourcePoliciesRequest_descriptor; @@ -200,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 22220385, resourcePolicies_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -217,7 +164,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getResourcePoliciesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -234,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequest) obj; if (!getResourcePoliciesList().equals(other.getResourcePoliciesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -249,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_POLICIES_FIELD_NUMBER; hash = (53 * hash) + getResourcePoliciesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -380,17 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequest.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 @@ -496,7 +436,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -511,19 +451,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequest 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 177763082: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 177763082 + 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.compute.v1.InstancesRemoveResourcePoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -731,7 +690,18 @@ public InstancesRemoveResourcePoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesRemoveResourcePoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesScopedList.java index 69b8decc680b..9f5b7f571bd2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesScopedList( - 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 232780786: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage( - com.google.cloud.compute.v1.Instance.parser(), extensionRegistry)); - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(50704284, getWarning()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +217,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(50704284, getWarning()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +238,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -327,7 +257,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -476,10 +406,11 @@ public Builder clear() { super.clear(); if (instancesBuilder_ == null) { instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instances_ = null; instancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -613,7 +544,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstancesScopedList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -628,17 +559,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesScopedList 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 232780786: + { + com.google.cloud.compute.v1.Instance m = + input.readMessage( + com.google.cloud.compute.v1.Instance.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 232780786 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + 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.compute.v1.InstancesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1210,7 +1174,18 @@ public InstancesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetLabelsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetLabelsRequest.java index 68798bd39d98..33c818a052df 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetLabelsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetLabelsRequest.java @@ -51,66 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesSetLabelsRequest( - 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 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - labelFingerprint_ = s; - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesSetLabelsRequest_descriptor; @@ -287,7 +227,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -310,7 +250,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -331,7 +271,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLabelFingerprint().equals(other.getLabelFingerprint())) return false; } if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -350,7 +290,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -499,17 +439,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.InstancesSetLabelsRequest.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 @@ -610,7 +543,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstancesSetLabelsRequest o onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -625,18 +558,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesSetLabelsRequest 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 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1424998602 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.InstancesSetLabelsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -896,7 +859,18 @@ public InstancesSetLabelsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesSetLabelsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMachineResourcesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMachineResourcesRequest.java index a9848ade4430..412f955c5228 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMachineResourcesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMachineResourcesRequest.java @@ -53,61 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesSetMachineResourcesRequest( - 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 -586206342: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - guestAccelerators_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - guestAccelerators_.add( - input.readMessage( - com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry)); - 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)) { - guestAccelerators_ = java.util.Collections.unmodifiableList(guestAccelerators_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesSetMachineResourcesRequest_descriptor; @@ -215,7 +160,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < guestAccelerators_.size(); i++) { output.writeMessage(463595119, guestAccelerators_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -229,7 +174,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 463595119, guestAccelerators_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -246,7 +191,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstancesSetMachineResourcesRequest) obj; if (!getGuestAcceleratorsList().equals(other.getGuestAcceleratorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -261,7 +206,7 @@ public int hashCode() { hash = (37 * hash) + GUEST_ACCELERATORS_FIELD_NUMBER; hash = (53 * hash) + getGuestAcceleratorsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -390,19 +335,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstancesSetMachineResourcesRequest.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) { - getGuestAcceleratorsFieldBuilder(); - } } @java.lang.Override @@ -410,10 +346,11 @@ public Builder clear() { super.clear(); if (guestAcceleratorsBuilder_ == null) { guestAccelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + guestAccelerators_ = null; guestAcceleratorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -531,7 +468,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -546,19 +483,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesSetMachineResourcesRequest 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 -586206342: + { + com.google.cloud.compute.v1.AcceleratorConfig m = + input.readMessage( + com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry); + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.add(m); + } else { + guestAcceleratorsBuilder_.addMessage(m); + } + break; + } // case -586206342 + 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.compute.v1.InstancesSetMachineResourcesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +939,18 @@ public InstancesSetMachineResourcesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesSetMachineResourcesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMachineTypeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMachineTypeRequest.java index fe9953537173..1803367b2033 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMachineTypeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMachineTypeRequest.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesSetMachineTypeRequest( - 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 1821688210: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - machineType_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesSetMachineTypeRequest_descriptor; @@ -196,7 +149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227711026, machineType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -208,7 +161,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227711026, machineType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -228,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMachineType()) { if (!getMachineType().equals(other.getMachineType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -243,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER; hash = (53 * hash) + getMachineType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -372,17 +325,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstancesSetMachineTypeRequest.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 @@ -479,7 +425,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstancesSetMachineTypeRequ machineType_ = other.machineType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -494,18 +440,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesSetMachineTypeRequest 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 1821688210: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1821688210 + 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.compute.v1.InstancesSetMachineTypeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -663,7 +628,18 @@ public InstancesSetMachineTypeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesSetMachineTypeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMinCpuPlatformRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMinCpuPlatformRequest.java index d29adc4f0ec7..59a9dae82ffb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMinCpuPlatformRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetMinCpuPlatformRequest.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesSetMinCpuPlatformRequest( - 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 1943302074: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - minCpuPlatform_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesSetMinCpuPlatformRequest_descriptor; @@ -196,7 +149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 242912759, minCpuPlatform_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -208,7 +161,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(242912759, minCpuPlatform_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -228,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMinCpuPlatform()) { if (!getMinCpuPlatform().equals(other.getMinCpuPlatform())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -243,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + MIN_CPU_PLATFORM_FIELD_NUMBER; hash = (53 * hash) + getMinCpuPlatform().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -372,17 +325,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstancesSetMinCpuPlatformRequest.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 @@ -481,7 +427,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstancesSetMinCpuPlatformR minCpuPlatform_ = other.minCpuPlatform_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -496,19 +442,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesSetMinCpuPlatformRequest 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 1943302074: + { + minCpuPlatform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1943302074 + 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.compute.v1.InstancesSetMinCpuPlatformRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -667,7 +631,18 @@ public InstancesSetMinCpuPlatformRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesSetMinCpuPlatformRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetServiceAccountRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetServiceAccountRequest.java index a833b627490b..319976b894f7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetServiceAccountRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesSetServiceAccountRequest.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesSetServiceAccountRequest( - 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 772955362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - email_ = s; - break; - } - case 1327785210: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - scopes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - scopes_.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_ & 0x00000002) != 0)) { - scopes_ = scopes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesSetServiceAccountRequest_descriptor; @@ -274,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < scopes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 165973151, scopes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -294,7 +234,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getScopesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -315,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEmail().equals(other.getEmail())) return false; } if (!getScopesList().equals(other.getScopesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -334,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + SCOPES_FIELD_NUMBER; hash = (53 * hash) + getScopesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -463,17 +403,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InstancesSetServiceAccountRequest.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 @@ -589,7 +522,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InstancesSetServiceAccountR } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -604,19 +537,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesSetServiceAccountRequest 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 772955362: + { + email_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 772955362 + case 1327785210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopesIsMutable(); + scopes_.add(s); + break; + } // case 1327785210 + 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.compute.v1.InstancesSetServiceAccountRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -943,7 +901,18 @@ public InstancesSetServiceAccountRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesSetServiceAccountRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesStartWithEncryptionKeyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesStartWithEncryptionKeyRequest.java index 7d35826f5977..ec1a5bfb316f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesStartWithEncryptionKeyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesStartWithEncryptionKeyRequest.java @@ -53,63 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InstancesStartWithEncryptionKeyRequest( - 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 764752818: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - disks_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.CustomerEncryptionKeyProtectedDisk>(); - mutable_bitField0_ |= 0x00000001; - } - disks_.add( - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKeyProtectedDisk.parser(), - extensionRegistry)); - 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)) { - disks_ = java.util.Collections.unmodifiableList(disks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InstancesStartWithEncryptionKeyRequest_descriptor; @@ -219,7 +162,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < disks_.size(); i++) { output.writeMessage(95594102, disks_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -231,7 +174,7 @@ public int getSerializedSize() { for (int i = 0; i < disks_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(95594102, disks_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -248,7 +191,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequest) obj; if (!getDisksList().equals(other.getDisksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -263,7 +206,7 @@ public int hashCode() { hash = (37 * hash) + DISKS_FIELD_NUMBER; hash = (53 * hash) + getDisksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -394,19 +337,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequest.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) { - getDisksFieldBuilder(); - } } @java.lang.Override @@ -414,10 +348,11 @@ public Builder clear() { super.clear(); if (disksBuilder_ == null) { disks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + disks_ = null; disksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -537,7 +472,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -552,19 +487,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequest 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 764752818: + { + com.google.cloud.compute.v1.CustomerEncryptionKeyProtectedDisk m = + input.readMessage( + com.google.cloud.compute.v1.CustomerEncryptionKeyProtectedDisk.parser(), + extensionRegistry); + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(m); + } else { + disksBuilder_.addMessage(m); + } + break; + } // case 764752818 + 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.compute.v1.InstancesStartWithEncryptionKeyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -988,7 +949,18 @@ public InstancesStartWithEncryptionKeyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InstancesStartWithEncryptionKeyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Int64RangeMatch.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Int64RangeMatch.java index b579d72faae3..f4d2b773efcc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Int64RangeMatch.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Int64RangeMatch.java @@ -50,58 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Int64RangeMatch( - 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 826668800: - { - bitField0_ |= 0x00000002; - rangeStart_ = input.readInt64(); - break; - } - case -1715448120: - { - bitField0_ |= 0x00000001; - rangeEnd_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Int64RangeMatch_descriptor; @@ -204,7 +152,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(322439897, rangeEnd_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +167,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(322439897, rangeEnd_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -243,7 +191,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRangeStart()) { if (getRangeStart() != other.getRangeStart()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -262,7 +210,7 @@ public int hashCode() { hash = (37 * hash) + RANGE_START_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRangeStart()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -391,17 +339,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Int64RangeMatch.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 @@ -504,7 +445,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Int64RangeMatch other) { if (other.hasRangeStart()) { setRangeStart(other.getRangeStart()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -519,17 +460,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Int64RangeMatch 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 826668800: + { + rangeStart_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 826668800 + case -1715448120: + { + rangeEnd_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case -1715448120 + 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.compute.v1.Int64RangeMatch) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -701,7 +668,18 @@ public Int64RangeMatch parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Int64RangeMatch(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Interconnect.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Interconnect.java index a94b8c82a173..a08646283325 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Interconnect.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Interconnect.java @@ -69,227 +69,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Interconnect( - 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 26840: - { - bitField0_ |= 0x00000040; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - name_ = s; - break; - } - case 29323874: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - customerName_ = s; - break; - } - case 112582658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - nocContactEmail_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 360411096: - { - bitField0_ |= 0x00010000; - requestedLinkCount_ = input.readInt32(); - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; - state_ = s; - break; - } - case 1318718842: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - circuitInfos_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - circuitInfos_.add( - input.readMessage( - com.google.cloud.compute.v1.InterconnectCircuitInfo.parser(), - extensionRegistry)); - break; - } - case 1608566778: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - operationalStatus_ = s; - break; - } - case 1661886154: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - peerIpAddress_ = s; - break; - } - case 2115872986: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - expectedOutages_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.InterconnectOutageNotification>(); - mutable_bitField0_ |= 0x00000020; - } - expectedOutages_.add( - input.readMessage( - com.google.cloud.compute.v1.InterconnectOutageNotification.parser(), - extensionRegistry)); - break; - } - case -1971520086: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - location_ = s; - break; - } - case -1007858776: - { - bitField0_ |= 0x00008000; - provisionedLinkCount_ = input.readInt32(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - description_ = s; - break; - } - case -891859974: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - interconnectAttachments_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000200; - } - interconnectAttachments_.add(s); - break; - } - case -750119662: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - googleIpAddress_ = s; - break; - } - case -729566584: - { - bitField0_ |= 0x00000001; - adminEnabled_ = input.readBool(); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; - selfLink_ = s; - break; - } - case -447253160: - { - bitField0_ |= 0x00020000; - satisfiesPzs_ = input.readBool(); - break; - } - case -173645222: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - interconnectType_ = s; - break; - } - case -109305094: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - linkType_ = s; - break; - } - case -15411542: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - googleReferenceId_ = 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_ & 0x00000002) != 0)) { - circuitInfos_ = java.util.Collections.unmodifiableList(circuitInfos_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - expectedOutages_ = java.util.Collections.unmodifiableList(expectedOutages_); - } - if (((mutable_bitField0_ & 0x00000200) != 0)) { - interconnectAttachments_ = interconnectAttachments_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Interconnect_descriptor; @@ -2401,7 +2180,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 534944469, googleReferenceId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2492,7 +2271,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(534944469, googleReferenceId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2591,7 +2370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasState()) { if (!getState().equals(other.getState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2694,7 +2473,7 @@ public int hashCode() { hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + getState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2823,20 +2602,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Interconnect.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) { - getCircuitInfosFieldBuilder(); - getExpectedOutagesFieldBuilder(); - } } @java.lang.Override @@ -2846,10 +2615,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (circuitInfosBuilder_ == null) { circuitInfos_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + circuitInfos_ = null; circuitInfosBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); creationTimestamp_ = ""; bitField0_ = (bitField0_ & ~0x00000004); customerName_ = ""; @@ -2858,10 +2628,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000010); if (expectedOutagesBuilder_ == null) { expectedOutages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); } else { + expectedOutages_ = null; expectedOutagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000020); googleIpAddress_ = ""; bitField0_ = (bitField0_ & ~0x00000040); googleReferenceId_ = ""; @@ -3232,7 +3003,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Interconnect other) { state_ = other.state_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3247,17 +3018,186 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Interconnect 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 26989658 + case 29323874: + { + customerName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 29323874 + case 112582658: + { + nocContactEmail_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 112582658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 244202930 + case 360411096: + { + requestedLinkCount_ = input.readInt32(); + bitField0_ |= 0x00080000; + break; + } // case 360411096 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 878060682 + case 1318718842: + { + com.google.cloud.compute.v1.InterconnectCircuitInfo m = + input.readMessage( + com.google.cloud.compute.v1.InterconnectCircuitInfo.parser(), + extensionRegistry); + if (circuitInfosBuilder_ == null) { + ensureCircuitInfosIsMutable(); + circuitInfos_.add(m); + } else { + circuitInfosBuilder_.addMessage(m); + } + break; + } // case 1318718842 + case 1608566778: + { + operationalStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 1608566778 + case 1661886154: + { + peerIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 1661886154 + case 2115872986: + { + com.google.cloud.compute.v1.InterconnectOutageNotification m = + input.readMessage( + com.google.cloud.compute.v1.InterconnectOutageNotification.parser(), + extensionRegistry); + if (expectedOutagesBuilder_ == null) { + ensureExpectedOutagesIsMutable(); + expectedOutages_.add(m); + } else { + expectedOutagesBuilder_.addMessage(m); + } + break; + } // case 2115872986 + case -1971520086: + { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case -1971520086 + case -1007858776: + { + provisionedLinkCount_ = input.readInt32(); + bitField0_ |= 0x00040000; + break; + } // case -1007858776 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -911466526 + case -891859974: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.add(s); + break; + } // case -891859974 + case -750119662: + { + googleIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -750119662 + case -729566584: + { + adminEnabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -729566584 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case -645248918 + case -447253160: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00100000; + break; + } // case -447253160 + case -173645222: + { + interconnectType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -173645222 + case -109305094: + { + linkType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case -109305094 + case -15411542: + { + googleReferenceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -15411542 + 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.compute.v1.Interconnect) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6407,7 +6347,18 @@ public Interconnect parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Interconnect(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachment.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachment.java index ebd4c5d20070..ec8105cfa62f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachment.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachment.java @@ -77,325 +77,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectAttachment( - 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; - int mutable_bitField1_ = 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 26840: - { - bitField0_ |= 0x00004000; - id_ = input.readUInt64(); - break; - } - case 867696: - { - bitField0_ |= 0x00020000; - mtu_ = input.readInt32(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; - name_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x40000000; - type_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - creationTimestamp_ = s; - break; - } - case 279360600: - { - bitField0_ |= 0x00000200; - dataplaneVersion_ = input.readInt32(); - break; - } - case 527271474: - { - com.google.cloud.compute.v1.InterconnectAttachmentPartnerMetadata.Builder subBuilder = - null; - if (((bitField0_ & 0x00400000) != 0)) { - subBuilder = partnerMetadata_.toBuilder(); - } - partnerMetadata_ = - input.readMessage( - com.google.cloud.compute.v1.InterconnectAttachmentPartnerMetadata.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(partnerMetadata_); - partnerMetadata_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00400000; - break; - } - case 565460178: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - candidateIpv6Subnets_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - candidateIpv6Subnets_.add(s); - break; - } - case 570316082: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - edgeAvailabilityDomain_ = s; - break; - } - case 783842330: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - encryption_ = s; - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x20000000; - state_ = s; - break; - } - case 959422688: - { - bitField0_ |= 0x80000000; - vlanTag8021Q_ = input.readInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x01000000; - region_ = s; - break; - } - case 1188870730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x02000000; - router_ = s; - break; - } - case 1453720970: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - bandwidth_ = s; - break; - } - case 1608566778: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; - operationalStatus_ = s; - break; - } - case 1796809842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - interconnect_ = s; - break; - } - case 1898164250: - { - com.google.cloud.compute.v1.InterconnectAttachmentPrivateInfo.Builder subBuilder = - null; - if (((bitField0_ & 0x00800000) != 0)) { - subBuilder = privateInterconnectInfo_.toBuilder(); - } - privateInterconnectInfo_ = - input.readMessage( - com.google.cloud.compute.v1.InterconnectAttachmentPrivateInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(privateInterconnectInfo_); - privateInterconnectInfo_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00800000; - break; - } - case 1902743506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - candidateSubnets_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - candidateSubnets_.add(s); - break; - } - case -1995825086: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - cloudRouterIpAddress_ = s; - break; - } - case -1973950582: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - customerRouterIpv6Address_ = s; - break; - } - case -1635161206: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - customerRouterIpAddress_ = s; - break; - } - case -1247012830: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - customerRouterIpv6InterfaceId_ = s; - break; - } - case -1033778774: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00040000) != 0)) { - ipsecInternalAddresses_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00040000; - } - ipsecInternalAddresses_.add(s); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - description_ = s; - break; - } - case -887696246: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x10000000; - stackType_ = s; - break; - } - case -789638104: - { - bitField0_ |= 0x00200000; - partnerAsn_ = input.readInt64(); - break; - } - case -777403582: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00100000; - pairingKey_ = s; - break; - } - case -729566584: - { - bitField0_ |= 0x00000001; - adminEnabled_ = input.readBool(); - break; - } - case -679588286: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - cloudRouterIpv6Address_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x08000000; - selfLink_ = s; - break; - } - case -447253160: - { - bitField0_ |= 0x04000000; - satisfiesPzs_ = input.readBool(); - break; - } - case -124705686: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - cloudRouterIpv6InterfaceId_ = s; - break; - } - case -15411542: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - googleReferenceId_ = 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_ & 0x00000004) != 0)) { - candidateIpv6Subnets_ = candidateIpv6Subnets_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - candidateSubnets_ = candidateSubnets_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00040000) != 0)) { - ipsecInternalAddresses_ = ipsecInternalAddresses_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectAttachment_descriptor; @@ -3990,7 +3671,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00002000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 534944469, googleReferenceId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4139,7 +3820,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(534944469, googleReferenceId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4291,7 +3972,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVlanTag8021Q()) { if (getVlanTag8021Q() != other.getVlanTag8021Q()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4442,7 +4123,7 @@ public int hashCode() { hash = (37 * hash) + VLAN_TAG8021Q_FIELD_NUMBER; hash = (53 * hash) + getVlanTag8021Q(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5072,7 +4753,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectAttachment othe if (other.hasVlanTag8021Q()) { setVlanTag8021Q(other.getVlanTag8021Q()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5087,18 +4768,245 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectAttachment 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00010000; + break; + } // case 26840 + case 867696: + { + mtu_ = input.readInt32(); + bitField0_ |= 0x00100000; + break; + } // case 867696 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case 26989658 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000002; + break; + } // case 28604882 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 244202930 + case 279360600: + { + dataplaneVersion_ = input.readInt32(); + bitField0_ |= 0x00000800; + break; + } // case 279360600 + case 527271474: + { + input.readMessage(getPartnerMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x02000000; + break; + } // case 527271474 + case 565460178: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCandidateIpv6SubnetsIsMutable(); + candidateIpv6Subnets_.add(s); + break; + } // case 565460178 + case 570316082: + { + edgeAvailabilityDomain_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 570316082 + case 783842330: + { + encryption_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 783842330 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField1_ |= 0x00000001; + break; + } // case 878060682 + case 959422688: + { + vlanTag8021Q_ = input.readInt32(); + bitField1_ |= 0x00000004; + break; + } // case 959422688 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x08000000; + break; + } // case 1111570338 + case 1188870730: + { + router_ = input.readStringRequireUtf8(); + bitField0_ |= 0x10000000; + break; + } // case 1188870730 + case 1453720970: + { + bandwidth_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1453720970 + case 1608566778: + { + operationalStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case 1608566778 + case 1796809842: + { + interconnect_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 1796809842 + case 1898164250: + { + input.readMessage( + getPrivateInterconnectInfoFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x04000000; + break; + } // case 1898164250 + case 1902743506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCandidateSubnetsIsMutable(); + candidateSubnets_.add(s); + break; + } // case 1902743506 + case -1995825086: + { + cloudRouterIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -1995825086 + case -1973950582: + { + customerRouterIpv6Address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -1973950582 + case -1635161206: + { + customerRouterIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -1635161206 + case -1247012830: + { + customerRouterIpv6InterfaceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -1247012830 + case -1033778774: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIpsecInternalAddressesIsMutable(); + ipsecInternalAddresses_.add(s); + break; + } // case -1033778774 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case -911466526 + case -887696246: + { + stackType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x80000000; + break; + } // case -887696246 + case -789638104: + { + partnerAsn_ = input.readInt64(); + bitField0_ |= 0x01000000; + break; + } // case -789638104 + case -777403582: + { + pairingKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case -777403582 + case -729566584: + { + adminEnabled_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -729566584 + case -679588286: + { + cloudRouterIpv6Address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -679588286 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x40000000; + break; + } // case -645248918 + case -447253160: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x20000000; + break; + } // case -447253160 + case -124705686: + { + cloudRouterIpv6InterfaceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -124705686 + case -15411542: + { + googleReferenceId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case -15411542 + 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.compute.v1.InterconnectAttachment) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9338,7 +9246,18 @@ public InterconnectAttachment parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectAttachment(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentAggregatedList.java index bc5c574286e2..a279b0414861 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentAggregatedList.java @@ -57,120 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectAttachmentAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.compute.v1.InterconnectAttachmentsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectAttachmentAggregatedList_descriptor; @@ -720,7 +606,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -765,7 +651,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -803,7 +689,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -842,7 +728,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1174,7 +1060,7 @@ public Builder mergeFrom( if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1189,19 +1075,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectAttachmentAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.compute.v1.InterconnectAttachmentsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InterconnectAttachmentAggregatedList) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2266,7 +2213,18 @@ public InterconnectAttachmentAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectAttachmentAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentList.java index c81157f21120..7eea03a663d0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentList.java @@ -56,106 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectAttachmentList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InterconnectAttachment.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectAttachmentList_descriptor; @@ -575,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -602,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -639,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -674,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -827,10 +727,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1006,7 +907,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectAttachmentList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1021,18 +922,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectAttachmentList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InterconnectAttachment m = + input.readMessage( + com.google.cloud.compute.v1.InterconnectAttachment.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InterconnectAttachmentList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2089,7 +2047,18 @@ public InterconnectAttachmentList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectAttachmentList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentPartnerMetadata.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentPartnerMetadata.java index 3ad85b8b6eb8..0df9b386493b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentPartnerMetadata.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentPartnerMetadata.java @@ -56,67 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectAttachmentPartnerMetadata( - 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 1293982994: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - partnerName_ = s; - break; - } - case -2141505310: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - portalUrl_ = s; - break; - } - case -175260446: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - interconnectName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectAttachmentPartnerMetadata_descriptor; @@ -348,7 +287,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 514963356, interconnectName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -367,7 +306,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(514963356, interconnectName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -395,7 +334,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPortalUrl()) { if (!getPortalUrl().equals(other.getPortalUrl())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -418,7 +357,7 @@ public int hashCode() { hash = (37 * hash) + PORTAL_URL_FIELD_NUMBER; hash = (53 * hash) + getPortalUrl().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -550,17 +489,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InterconnectAttachmentPartnerMetadata.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 @@ -682,7 +614,7 @@ public Builder mergeFrom( portalUrl_ = other.portalUrl_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -697,19 +629,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectAttachmentPartnerMetadata 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 1293982994: + { + partnerName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1293982994 + case -2141505310: + { + portalUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -2141505310 + case -175260446: + { + interconnectName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -175260446 + 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.compute.v1.InterconnectAttachmentPartnerMetadata) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1109,7 +1071,18 @@ public InterconnectAttachmentPartnerMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectAttachmentPartnerMetadata(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentPrivateInfo.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentPrivateInfo.java index ae3baadc0d7c..3e3ea59639df 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentPrivateInfo.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentPrivateInfo.java @@ -51,52 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectAttachmentPrivateInfo( - 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 -2120399360: - { - bitField0_ |= 0x00000001; - tag8021Q_ = input.readUInt32(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectAttachmentPrivateInfo_descriptor; @@ -163,7 +117,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeUInt32(271820992, tag8021Q_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -175,7 +129,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(271820992, tag8021Q_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -195,7 +149,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTag8021Q()) { if (getTag8021Q() != other.getTag8021Q()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -210,7 +164,7 @@ public int hashCode() { hash = (37 * hash) + TAG8021Q_FIELD_NUMBER; hash = (53 * hash) + getTag8021Q(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -340,17 +294,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InterconnectAttachmentPrivateInfo.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 @@ -447,7 +394,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectAttachmentPriva if (other.hasTag8021Q()) { setTag8021Q(other.getTag8021Q()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -462,19 +409,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectAttachmentPrivateInfo 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 -2120399360: + { + tag8021Q_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case -2120399360 + 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.compute.v1.InterconnectAttachmentPrivateInfo) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -580,7 +545,18 @@ public InterconnectAttachmentPrivateInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectAttachmentPrivateInfo(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentsScopedList.java index 295c1236aacf..3340d31e2ece 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectAttachmentsScopedList.java @@ -52,78 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectAttachmentsScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -891859974: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - interconnectAttachments_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - interconnectAttachments_.add( - input.readMessage( - com.google.cloud.compute.v1.InterconnectAttachment.parser(), - extensionRegistry)); - 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)) { - interconnectAttachments_ = java.util.Collections.unmodifiableList(interconnectAttachments_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectAttachmentsScopedList_descriptor; @@ -288,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < interconnectAttachments_.size(); i++) { output.writeMessage(425388415, interconnectAttachments_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -305,7 +233,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 425388415, interconnectAttachments_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -327,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -346,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -496,10 +424,11 @@ public Builder clear() { super.clear(); if (interconnectAttachmentsBuilder_ == null) { interconnectAttachments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + interconnectAttachments_ = null; interconnectAttachmentsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -636,7 +565,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectAttachmentsScop if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -651,19 +580,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectAttachmentsScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -891859974: + { + com.google.cloud.compute.v1.InterconnectAttachment m = + input.readMessage( + com.google.cloud.compute.v1.InterconnectAttachment.parser(), + extensionRegistry); + if (interconnectAttachmentsBuilder_ == null) { + ensureInterconnectAttachmentsIsMutable(); + interconnectAttachments_.add(m); + } else { + interconnectAttachmentsBuilder_.addMessage(m); + } + break; + } // case -891859974 + 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.compute.v1.InterconnectAttachmentsScopedList) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1289,7 +1250,18 @@ public InterconnectAttachmentsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectAttachmentsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectCircuitInfo.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectCircuitInfo.java index 358e46f94993..89494d00335f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectCircuitInfo.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectCircuitInfo.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectCircuitInfo( - 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 230174874: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - customerDemarcId_ = s; - break; - } - case 2096117690: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - googleCircuitId_ = s; - break; - } - case -709397134: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - googleDemarcId_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectCircuitInfo_descriptor; @@ -346,7 +285,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 448196270, googleDemarcId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -364,7 +303,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(448196270, googleDemarcId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +331,7 @@ public boolean equals(final java.lang.Object obj) { if (hasGoogleDemarcId()) { if (!getGoogleDemarcId().equals(other.getGoogleDemarcId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -415,7 +354,7 @@ public int hashCode() { hash = (37 * hash) + GOOGLE_DEMARC_ID_FIELD_NUMBER; hash = (53 * hash) + getGoogleDemarcId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -544,17 +483,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InterconnectCircuitInfo.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 @@ -673,7 +605,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectCircuitInfo oth googleDemarcId_ = other.googleDemarcId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -688,18 +620,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectCircuitInfo 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 230174874: + { + customerDemarcId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 230174874 + case 2096117690: + { + googleCircuitId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 2096117690 + case -709397134: + { + googleDemarcId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -709397134 + 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.compute.v1.InterconnectCircuitInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1097,7 +1060,18 @@ public InterconnectCircuitInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectCircuitInfo(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnostics.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnostics.java index 0956a7ed6b96..a26462ecfc68 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnostics.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnostics.java @@ -54,87 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectDiagnostics( - 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 823819722: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - links_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkStatus>(); - mutable_bitField0_ |= 0x00000002; - } - links_.add( - input.readMessage( - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkStatus.parser(), - extensionRegistry)); - break; - } - case -1634645982: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - macAddress_ = s; - break; - } - case -978233206: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - arpCaches_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry>(); - mutable_bitField0_ |= 0x00000001; - } - arpCaches_.add( - input.readMessage( - com.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry.parser(), - extensionRegistry)); - 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_ & 0x00000002) != 0)) { - links_ = java.util.Collections.unmodifiableList(links_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - arpCaches_ = java.util.Collections.unmodifiableList(arpCaches_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectDiagnostics_descriptor; @@ -392,7 +311,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < arpCaches_.size(); i++) { output.writeMessage(414591761, arpCaches_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -411,7 +330,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(414591761, arpCaches_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -433,7 +352,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMacAddress()) { if (!getMacAddress().equals(other.getMacAddress())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -456,7 +375,7 @@ public int hashCode() { hash = (37 * hash) + MAC_ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getMacAddress().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -585,20 +504,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InterconnectDiagnostics.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) { - getArpCachesFieldBuilder(); - getLinksFieldBuilder(); - } } @java.lang.Override @@ -606,16 +515,18 @@ public Builder clear() { super.clear(); if (arpCachesBuilder_ == null) { arpCaches_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + arpCaches_ = null; arpCachesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (linksBuilder_ == null) { links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + links_ = null; linksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); macAddress_ = ""; bitField0_ = (bitField0_ & ~0x00000004); return this; @@ -779,7 +690,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectDiagnostics oth macAddress_ = other.macAddress_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -794,18 +705,65 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectDiagnostics 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 823819722: + { + com.google.cloud.compute.v1.InterconnectDiagnosticsLinkStatus m = + input.readMessage( + com.google.cloud.compute.v1.InterconnectDiagnosticsLinkStatus.parser(), + extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.addMessage(m); + } + break; + } // case 823819722 + case -1634645982: + { + macAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1634645982 + case -978233206: + { + com.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry m = + input.readMessage( + com.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry.parser(), + extensionRegistry); + if (arpCachesBuilder_ == null) { + ensureArpCachesIsMutable(); + arpCaches_.add(m); + } else { + arpCachesBuilder_.addMessage(m); + } + break; + } // case -978233206 + 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.compute.v1.InterconnectDiagnostics) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1748,7 +1706,18 @@ public InterconnectDiagnostics parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectDiagnostics(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsARPEntry.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsARPEntry.java index 0357de4151b0..0c1565661145 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsARPEntry.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsARPEntry.java @@ -54,60 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectDiagnosticsARPEntry( - 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 -1634645982: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - macAddress_ = s; - break; - } - case -1044789534: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - ipAddress_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectDiagnosticsARPEntry_descriptor; @@ -272,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 406272220, ipAddress_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +233,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(406272220, ipAddress_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +257,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMacAddress()) { if (!getMacAddress().equals(other.getMacAddress())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +276,7 @@ public int hashCode() { hash = (37 * hash) + MAC_ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getMacAddress().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -460,17 +406,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry.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 @@ -578,7 +517,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectDiagnosticsARPE macAddress_ = other.macAddress_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -593,18 +532,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry 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 -1634645982: + { + macAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1634645982 + case -1044789534: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1044789534 + 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.compute.v1.InterconnectDiagnosticsARPEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -882,7 +846,18 @@ public InterconnectDiagnosticsARPEntry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectDiagnosticsARPEntry(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkLACPStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkLACPStatus.java index fab5e0233bec..f14dc9ae2f1c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkLACPStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkLACPStatus.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectDiagnosticsLinkLACPStatus( - 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 729683242: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - googleSystemId_ = s; - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - state_ = s; - break; - } - case -1544396558: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - neighborSystemId_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectDiagnosticsLinkLACPStatus_descriptor; @@ -509,7 +448,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 343821342, neighborSystemId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -528,7 +467,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(343821342, neighborSystemId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -556,7 +495,7 @@ public boolean equals(final java.lang.Object obj) { if (hasState()) { if (!getState().equals(other.getState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -579,7 +518,7 @@ public int hashCode() { hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + getState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -710,17 +649,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InterconnectDiagnosticsLinkLACPStatus.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 @@ -842,7 +774,7 @@ public Builder mergeFrom( state_ = other.state_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -857,19 +789,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkLACPStatus 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 729683242: + { + googleSystemId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 729683242 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 878060682 + case -1544396558: + { + neighborSystemId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1544396558 + 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.compute.v1.InterconnectDiagnosticsLinkLACPStatus) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1275,7 +1237,18 @@ public InterconnectDiagnosticsLinkLACPStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectDiagnosticsLinkLACPStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkOpticalPower.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkOpticalPower.java index a8aa1322509d..32d77dc81804 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkOpticalPower.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkOpticalPower.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectDiagnosticsLinkOpticalPower( - 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 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - state_ = s; - break; - } - case 895781773: - { - bitField0_ |= 0x00000002; - value_ = input.readFloat(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectDiagnosticsLinkOpticalPower_descriptor; @@ -467,7 +414,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeFloat(111972721, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -482,7 +429,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(111972721, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -507,7 +454,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getValue()) != java.lang.Float.floatToIntBits(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -526,7 +473,7 @@ public int hashCode() { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getValue()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -657,17 +604,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.InterconnectDiagnosticsLinkOpticalPower.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 @@ -778,7 +718,7 @@ public Builder mergeFrom( if (other.hasValue()) { setValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -793,19 +733,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkOpticalPower 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 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 878060682 + case 895781773: + { + value_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 895781773 + 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.compute.v1.InterconnectDiagnosticsLinkOpticalPower) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1038,7 +1002,18 @@ public InterconnectDiagnosticsLinkOpticalPower parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectDiagnosticsLinkOpticalPower(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkStatus.java index 5184a50fae27..6e2173cdd1f1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectDiagnosticsLinkStatus.java @@ -54,131 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectDiagnosticsLinkStatus( - 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 408674: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - googleDemarc_ = s; - break; - } - case 1801447818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - circuitId_ = s; - break; - } - case 1957738234: - { - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkOpticalPower.Builder - subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = receivingOpticalPower_.toBuilder(); - } - receivingOpticalPower_ = - input.readMessage( - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkOpticalPower.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(receivingOpticalPower_); - receivingOpticalPower_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case -1405283974: - { - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkLACPStatus.Builder subBuilder = - null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = lacpStatus_.toBuilder(); - } - lacpStatus_ = - input.readMessage( - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkLACPStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lacpStatus_); - lacpStatus_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -978233206: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - arpCaches_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry>(); - mutable_bitField0_ |= 0x00000001; - } - arpCaches_.add( - input.readMessage( - com.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry.parser(), - extensionRegistry)); - break; - } - case -619517718: - { - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkOpticalPower.Builder - subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = transmittingOpticalPower_.toBuilder(); - } - transmittingOpticalPower_ = - input.readMessage( - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkOpticalPower.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(transmittingOpticalPower_); - transmittingOpticalPower_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - 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)) { - arpCaches_ = java.util.Collections.unmodifiableList(arpCaches_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectDiagnosticsLinkStatus_descriptor; @@ -589,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(459431197, getTransmittingOpticalPower()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -621,7 +496,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 459431197, getTransmittingOpticalPower()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -658,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTransmittingOpticalPower()) { if (!getTransmittingOpticalPower().equals(other.getTransmittingOpticalPower())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -693,7 +568,7 @@ public int hashCode() { hash = (37 * hash) + TRANSMITTING_OPTICAL_POWER_FIELD_NUMBER; hash = (53 * hash) + getTransmittingOpticalPower().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -845,10 +720,11 @@ public Builder clear() { super.clear(); if (arpCachesBuilder_ == null) { arpCaches_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + arpCaches_ = null; arpCachesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); circuitId_ = ""; bitField0_ = (bitField0_ & ~0x00000002); googleDemarc_ = ""; @@ -1040,7 +916,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectDiagnosticsLink if (other.hasTransmittingOpticalPower()) { mergeTransmittingOpticalPower(other.getTransmittingOpticalPower()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1055,19 +931,77 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectDiagnosticsLinkStatus 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 408674: + { + googleDemarc_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 408674 + case 1801447818: + { + circuitId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1801447818 + case 1957738234: + { + input.readMessage( + getReceivingOpticalPowerFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 1957738234 + case -1405283974: + { + input.readMessage(getLacpStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -1405283974 + case -978233206: + { + com.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry m = + input.readMessage( + com.google.cloud.compute.v1.InterconnectDiagnosticsARPEntry.parser(), + extensionRegistry); + if (arpCachesBuilder_ == null) { + ensureArpCachesIsMutable(); + arpCaches_.add(m); + } else { + arpCachesBuilder_.addMessage(m); + } + break; + } // case -978233206 + case -619517718: + { + input.readMessage( + getTransmittingOpticalPowerFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case -619517718 + 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.compute.v1.InterconnectDiagnosticsLinkStatus) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2340,7 +2274,18 @@ public InterconnectDiagnosticsLinkStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectDiagnosticsLinkStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectList.java index 81296d474f12..b5daa6469e31 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Interconnect.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Interconnect m = + input.readMessage( + com.google.cloud.compute.v1.Interconnect.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InterconnectList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public InterconnectList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocation.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocation.java index 78a1111f592c..64583ec2494a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocation.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocation.java @@ -65,166 +65,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectLocation( - 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 26840: - { - bitField0_ |= 0x00000100; - id_ = input.readUInt64(); - break; - } - case 24431450: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - city_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - creationTimestamp_ = s; - break; - } - case 671865712: - { - bitField0_ |= 0x00004000; - supportsPzs_ = input.readBool(); - break; - } - case 698153002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - facilityProviderFacilityId_ = s; - break; - } - case 1067543970: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - continent_ = s; - break; - } - case 1267679362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - availabilityZone_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - status_ = s; - break; - } - case -1797413934: - { - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - regionInfos_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.InterconnectLocationRegionInfo>(); - mutable_bitField0_ |= 0x00001000; - } - regionInfos_.add( - input.readMessage( - com.google.cloud.compute.v1.InterconnectLocationRegionInfo.parser(), - extensionRegistry)); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - selfLink_ = s; - break; - } - case -591601758: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - address_ = s; - break; - } - case -28540822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - facilityProvider_ = s; - break; - } - case -2430542: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - peeringdbFacilityId_ = 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_ & 0x00001000) != 0)) { - regionInfos_ = java.util.Collections.unmodifiableList(regionInfos_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectLocation_descriptor; @@ -1620,7 +1460,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000800) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 536567094, peeringdbFacilityId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1684,7 +1524,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(536567094, peeringdbFacilityId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1762,7 +1602,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSupportsPzs()) { if (getSupportsPzs() != other.getSupportsPzs()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1837,7 +1677,7 @@ public int hashCode() { hash = (37 * hash) + SUPPORTS_PZS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSupportsPzs()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1966,19 +1806,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InterconnectLocation.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) { - getRegionInfosFieldBuilder(); - } } @java.lang.Override @@ -2010,10 +1841,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000800); if (regionInfosBuilder_ == null) { regionInfos_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); } else { + regionInfos_ = null; regionInfosBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00001000); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00002000); status_ = ""; @@ -2267,7 +2099,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectLocation other) if (other.hasSupportsPzs()) { setSupportsPzs(other.getSupportsPzs()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2282,17 +2114,135 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectLocation 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 26840 + case 24431450: + { + city_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 24431450 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 244202930 + case 671865712: + { + supportsPzs_ = input.readBool(); + bitField0_ |= 0x00008000; + break; + } // case 671865712 + case 698153002: + { + facilityProviderFacilityId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 698153002 + case 1067543970: + { + continent_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1067543970 + case 1267679362: + { + availabilityZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1267679362 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 1450082194 + case -1797413934: + { + com.google.cloud.compute.v1.InterconnectLocationRegionInfo m = + input.readMessage( + com.google.cloud.compute.v1.InterconnectLocationRegionInfo.parser(), + extensionRegistry); + if (regionInfosBuilder_ == null) { + ensureRegionInfosIsMutable(); + regionInfos_.add(m); + } else { + regionInfosBuilder_.addMessage(m); + } + break; + } // case -1797413934 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case -645248918 + case -591601758: + { + address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -591601758 + case -28540822: + { + facilityProvider_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -28540822 + case -2430542: + { + peeringdbFacilityId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -2430542 + 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.compute.v1.InterconnectLocation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4439,7 +4389,18 @@ public InterconnectLocation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectLocation(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocationList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocationList.java index bc6f07d743be..6798a249f73e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocationList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocationList.java @@ -56,106 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectLocationList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InterconnectLocation.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectLocationList_descriptor; @@ -575,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -602,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -639,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -674,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -826,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1005,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectLocationList ot if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1020,18 +921,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectLocationList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InterconnectLocation m = + input.readMessage( + com.google.cloud.compute.v1.InterconnectLocation.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.InterconnectLocationList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2085,7 +2043,18 @@ public InterconnectLocationList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectLocationList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocationRegionInfo.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocationRegionInfo.java index b0b06dab0afc..ba9cde7cc10d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocationRegionInfo.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectLocationRegionInfo.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectLocationRegionInfo( - 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 812143146: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - locationPresence_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - region_ = s; - break; - } - case -914616368: - { - bitField0_ |= 0x00000001; - expectedRttMs_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectLocationRegionInfo_descriptor; @@ -522,7 +462,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(422543866, expectedRttMs_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -541,7 +481,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(422543866, expectedRttMs_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -569,7 +509,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRegion()) { if (!getRegion().equals(other.getRegion())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -592,7 +532,7 @@ public int hashCode() { hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -722,17 +662,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InterconnectLocationRegionInfo.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 @@ -849,7 +782,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectLocationRegionI region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -864,18 +797,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectLocationRegionInfo 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 812143146: + { + locationPresence_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 812143146 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1111570338 + case -914616368: + { + expectedRttMs_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case -914616368 + 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.compute.v1.InterconnectLocationRegionInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1226,7 +1190,18 @@ public InterconnectLocationRegionInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectLocationRegionInfo(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectOutageNotification.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectOutageNotification.java index a8adf874456c..8a2a881732ae 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectOutageNotification.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectOutageNotification.java @@ -58,106 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectOutageNotification( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - name_ = s; - break; - } - case 299738192: - { - bitField0_ |= 0x00000020; - startTime_ = input.readInt64(); - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - state_ = s; - break; - } - case 919510408: - { - bitField0_ |= 0x00000002; - endTime_ = input.readInt64(); - break; - } - case 1417887962: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - source_ = s; - break; - } - case 1421736106: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - affectedCircuits_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - affectedCircuits_.add(s); - break; - } - case -1337854206: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - issueType_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - description_ = 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)) { - affectedCircuits_ = affectedCircuits_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectOutageNotification_descriptor; @@ -1256,7 +1156,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1294,7 +1194,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1339,7 +1239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasState()) { if (!getState().equals(other.getState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1382,7 +1282,7 @@ public int hashCode() { hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + getState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1512,17 +1412,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InterconnectOutageNotification.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 @@ -1698,7 +1591,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InterconnectOutageNotificat state_ = other.state_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1713,18 +1606,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectOutageNotification 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26989658 + case 299738192: + { + startTime_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case 299738192 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 878060682 + case 919510408: + { + endTime_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 919510408 + case 1417887962: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1417887962 + case 1421736106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAffectedCircuitsIsMutable(); + affectedCircuits_.add(s); + break; + } // case 1421736106 + case -1337854206: + { + issueType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -1337854206 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + 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.compute.v1.InterconnectOutageNotification) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2682,7 +2637,18 @@ public InterconnectOutageNotification parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectOutageNotification(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectsGetDiagnosticsResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectsGetDiagnosticsResponse.java index f9fbf160ba08..a2e3a8087b7a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectsGetDiagnosticsResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InterconnectsGetDiagnosticsResponse.java @@ -52,63 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InterconnectsGetDiagnosticsResponse( - 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 1114521834: - { - com.google.cloud.compute.v1.InterconnectDiagnostics.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = result_.toBuilder(); - } - result_ = - input.readMessage( - com.google.cloud.compute.v1.InterconnectDiagnostics.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(result_); - result_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InterconnectsGetDiagnosticsResponse_descriptor; @@ -172,7 +115,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(139315229, getResult()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -184,7 +127,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(139315229, getResult()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -204,7 +147,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResult()) { if (!getResult().equals(other.getResult())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -219,7 +162,7 @@ public int hashCode() { hash = (37 * hash) + RESULT_FIELD_NUMBER; hash = (53 * hash) + getResult().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -467,7 +410,7 @@ public Builder mergeFrom( if (other.hasResult()) { mergeResult(other.getResult()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -482,19 +425,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InterconnectsGetDiagnosticsResponse 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 1114521834: + { + input.readMessage(getResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1114521834 + 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.compute.v1.InterconnectsGetDiagnosticsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -668,7 +629,18 @@ public InterconnectsGetDiagnosticsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InterconnectsGetDiagnosticsResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InvalidateCacheUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InvalidateCacheUrlMapRequest.java index 4b3151964f18..e91e68aaae03 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InvalidateCacheUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InvalidateCacheUrlMapRequest.java @@ -54,84 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private InvalidateCacheUrlMapRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1792602774: - { - com.google.cloud.compute.v1.CacheInvalidationRule.Builder subBuilder = null; - if (cacheInvalidationRuleResource_ != null) { - subBuilder = cacheInvalidationRuleResource_.toBuilder(); - } - cacheInvalidationRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.CacheInvalidationRule.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cacheInvalidationRuleResource_); - cacheInvalidationRuleResource_ = subBuilder.buildPartial(); - } - - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_InvalidateCacheUrlMapRequest_descriptor; @@ -395,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -418,7 +340,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +368,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getUrlMap().equals(other.getUrlMap())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +391,7 @@ public int hashCode() { } hash = (37 * hash) + URL_MAP_FIELD_NUMBER; hash = (53 * hash) + getUrlMap().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.InvalidateCacheUrlMapRequest.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 @@ -734,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.InvalidateCacheUrlMapReques urlMap_ = other.urlMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +664,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.InvalidateCacheUrlMapRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1792602774: + { + input.readMessage( + getCacheInvalidationRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1792602774 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + 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.compute.v1.InvalidateCacheUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1350,7 +1303,18 @@ public InvalidateCacheUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InvalidateCacheUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Items.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Items.java index c26afb2aeff2..06252b3675fe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Items.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Items.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Items( - 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 848634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - key_ = s; - break; - } - case 895781770: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Items_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 111972721, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(111972721, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValue()) { if (!getValue().equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +274,7 @@ public int 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; } @@ -456,17 +402,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Items.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 @@ -572,7 +511,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Items other) { value_ = other.value_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -587,17 +526,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Items 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 848634: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 848634 + case 895781770: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 895781770 + 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.compute.v1.Items) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -875,7 +840,18 @@ public Items parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Items(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/License.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/License.java index 7f97d592d06e..e89430082317 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/License.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/License.java @@ -56,122 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private License( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 11737432: - { - bitField0_ |= 0x00000020; - licenseCode_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 34799144: - { - bitField0_ |= 0x00000200; - transferable_ = input.readBool(); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 1714342154: - { - com.google.cloud.compute.v1.LicenseResourceRequirements.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = resourceRequirements_.toBuilder(); - } - resourceRequirements_ = - input.readMessage( - com.google.cloud.compute.v1.LicenseResourceRequirements.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resourceRequirements_); - resourceRequirements_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case -1315666320: - { - bitField0_ |= 0x00000001; - chargesUseFee_ = input.readBool(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_License_descriptor; @@ -723,7 +607,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -765,7 +649,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -820,7 +704,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTransferable()) { if (getTransferable() != other.getTransferable()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -871,7 +755,7 @@ public int hashCode() { hash = (37 * hash) + TRANSFERABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTransferable()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1203,7 +1087,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.License other) { if (other.hasTransferable()) { setTransferable(other.getTransferable()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1218,17 +1102,92 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.License 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 11737432: + { + licenseCode_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 11737432 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26989658 + case 34799144: + { + transferable_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 34799144 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 1714342154: + { + input.readMessage( + getResourceRequirementsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 1714342154 + case -1315666320: + { + chargesUseFee_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1315666320 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -645248918 + 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.compute.v1.License) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2291,7 +2250,18 @@ public License parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new License(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseCode.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseCode.java index 1c6737f2a2d6..778d501beb98 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseCode.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseCode.java @@ -58,116 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LicenseCode( - 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 26840: - { - bitField0_ |= 0x00000004; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - name_ = s; - break; - } - case 34799144: - { - bitField0_ |= 0x00000080; - transferable_ = input.readBool(); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 348407442: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - licenseAlias_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - licenseAlias_.add( - input.readMessage( - com.google.cloud.compute.v1.LicenseCodeLicenseAlias.parser(), - extensionRegistry)); - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - state_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - selfLink_ = 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_ & 0x00000010) != 0)) { - licenseAlias_ = java.util.Collections.unmodifiableList(licenseAlias_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_LicenseCode_descriptor; @@ -960,7 +850,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -998,7 +888,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1046,7 +936,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTransferable()) { if (getTransferable() != other.getTransferable()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1093,7 +983,7 @@ public int hashCode() { hash = (37 * hash) + TRANSFERABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTransferable()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1222,19 +1112,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.LicenseCode.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) { - getLicenseAliasFieldBuilder(); - } } @java.lang.Override @@ -1250,10 +1131,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000008); if (licenseAliasBuilder_ == null) { licenseAlias_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + licenseAlias_ = null; licenseAliasBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); name_ = ""; bitField0_ = (bitField0_ & ~0x00000020); selfLink_ = ""; @@ -1445,7 +1327,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LicenseCode other) { if (other.hasTransferable()) { setTransferable(other.getTransferable()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1460,17 +1342,93 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LicenseCode 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 34799144: + { + transferable_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case 34799144 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 348407442: + { + com.google.cloud.compute.v1.LicenseCodeLicenseAlias m = + input.readMessage( + com.google.cloud.compute.v1.LicenseCodeLicenseAlias.parser(), + extensionRegistry); + if (licenseAliasBuilder_ == null) { + ensureLicenseAliasIsMutable(); + licenseAlias_.add(m); + } else { + licenseAliasBuilder_.addMessage(m); + } + break; + } // case 348407442 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 878060682 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -645248918 + 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.compute.v1.LicenseCode) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2745,7 +2703,18 @@ public LicenseCode parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LicenseCode(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseCodeLicenseAlias.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseCodeLicenseAlias.java index ae705a92a0fa..89e77b64b950 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseCodeLicenseAlias.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseCodeLicenseAlias.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LicenseCodeLicenseAlias( - 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 -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LicenseCodeLicenseAlias_descriptor; @@ -270,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -285,7 +231,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSelfLink()) { if (!getSelfLink().equals(other.getSelfLink())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; hash = (53 * hash) + getSelfLink().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -456,17 +402,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.LicenseCodeLicenseAlias.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 @@ -574,7 +513,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LicenseCodeLicenseAlias oth selfLink_ = other.selfLink_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -589,18 +528,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LicenseCodeLicenseAlias 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 -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -645248918 + 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.compute.v1.LicenseCodeLicenseAlias) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -878,7 +842,18 @@ public LicenseCodeLicenseAlias parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LicenseCodeLicenseAlias(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseResourceCommitment.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseResourceCommitment.java index f3d6d5f8f1c7..03c36906eda9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseResourceCommitment.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseResourceCommitment.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LicenseResourceCommitment( - 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 259858594: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - coresPerLicense_ = s; - break; - } - case 1334059530: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - license_ = s; - break; - } - case 1574077120: - { - bitField0_ |= 0x00000001; - amount_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LicenseResourceCommitment_descriptor; @@ -313,7 +253,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(196759640, amount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -331,7 +271,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(196759640, amount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLicense()) { if (!getLicense().equals(other.getLicense())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + LICENSE_FIELD_NUMBER; hash = (53 * hash) + getLicense().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -512,17 +452,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.LicenseResourceCommitment.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 @@ -639,7 +572,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LicenseResourceCommitment o license_ = other.license_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -654,18 +587,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LicenseResourceCommitment 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 259858594: + { + coresPerLicense_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 259858594 + case 1334059530: + { + license_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1334059530 + case 1574077120: + { + amount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 1574077120 + 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.compute.v1.LicenseResourceCommitment) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1010,7 +974,18 @@ public LicenseResourceCommitment parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LicenseResourceCommitment(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseResourceRequirements.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseResourceRequirements.java index 6e89e90b4eef..63c7bc88edb2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseResourceRequirements.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicenseResourceRequirements.java @@ -49,58 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LicenseResourceRequirements( - 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 -471248608: - { - bitField0_ |= 0x00000001; - minGuestCpuCount_ = input.readInt32(); - break; - } - case -256680144: - { - bitField0_ |= 0x00000002; - minMemoryMb_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LicenseResourceRequirements_descriptor; @@ -203,7 +151,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(504785894, minMemoryMb_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -218,7 +166,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(504785894, minMemoryMb_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -242,7 +190,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMinMemoryMb()) { if (getMinMemoryMb() != other.getMinMemoryMb()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -261,7 +209,7 @@ public int hashCode() { hash = (37 * hash) + MIN_MEMORY_MB_FIELD_NUMBER; hash = (53 * hash) + getMinMemoryMb(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -390,17 +338,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.LicenseResourceRequirements.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 @@ -504,7 +445,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LicenseResourceRequirements if (other.hasMinMemoryMb()) { setMinMemoryMb(other.getMinMemoryMb()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -519,18 +460,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LicenseResourceRequirements 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 -471248608: + { + minGuestCpuCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -471248608 + case -256680144: + { + minMemoryMb_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case -256680144 + 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.compute.v1.LicenseResourceRequirements) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -702,7 +668,18 @@ public LicenseResourceRequirements parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LicenseResourceRequirements(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicensesListResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicensesListResponse.java index 4050ff3de73e..374cf25971f2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicensesListResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LicensesListResponse.java @@ -54,97 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LicensesListResponse( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.License.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_LicensesListResponse_descriptor; @@ -497,7 +406,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -521,7 +430,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -554,7 +463,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -585,7 +494,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -736,10 +645,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); nextPageToken_ = ""; bitField0_ = (bitField0_ & ~0x00000004); selfLink_ = ""; @@ -904,7 +814,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LicensesListResponse other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -919,17 +829,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LicensesListResponse 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.License m = + input.readMessage( + com.google.cloud.compute.v1.License.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -645248918 + 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.compute.v1.LicensesListResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1861,7 +1822,18 @@ public LicensesListResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LicensesListResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAcceleratorTypesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAcceleratorTypesRequest.java index 06b7ad61eca1..9ec8e2248819 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAcceleratorTypesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAcceleratorTypesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAcceleratorTypesRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListAcceleratorTypesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListAcceleratorTypesRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListAcceleratorTypesRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListAcceleratorTypesRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListAcceleratorTypesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListAcceleratorTypesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAcceleratorTypesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAddressesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAddressesRequest.java index 7e185212e6c6..c47a2140d610 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAddressesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAddressesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAddressesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListAddressesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListAddressesRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListAddressesRequest other) if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,17 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListAddressesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListAddressesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1713,7 +1675,18 @@ public ListAddressesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAddressesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAssociationsFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAssociationsFirewallPolicyRequest.java index 8aff52576669..b6f670bb126f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAssociationsFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAssociationsFirewallPolicyRequest.java @@ -54,53 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAssociationsFirewallPolicyRequest( - 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 -556419102: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - targetResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListAssociationsFirewallPolicyRequest_descriptor; @@ -198,7 +151,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 467318524, targetResource_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -210,7 +163,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(467318524, targetResource_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -230,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetResource()) { if (!getTargetResource().equals(other.getTargetResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -245,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -377,17 +330,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListAssociationsFirewallPolicyRequest.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 @@ -487,7 +433,7 @@ public Builder mergeFrom( targetResource_ = other.targetResource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -502,19 +448,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListAssociationsFirewallPolicyRequest 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 -556419102: + { + targetResource_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -556419102 + 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.compute.v1.ListAssociationsFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -674,7 +638,18 @@ public ListAssociationsFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAssociationsFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAutoscalersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAutoscalersRequest.java index 10caaa9e31f8..0b4d6b26f2f2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAutoscalersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAutoscalersRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAutoscalersRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListAutoscalersRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListAutoscalersRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListAutoscalersRequest othe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListAutoscalersRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListAutoscalersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListAutoscalersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAutoscalersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAvailableFeaturesRegionSslPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAvailableFeaturesRegionSslPoliciesRequest.java index af3383bcca01..475dd7f4e1b7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAvailableFeaturesRegionSslPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAvailableFeaturesRegionSslPoliciesRequest.java @@ -58,93 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAvailableFeaturesRegionSslPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListAvailableFeaturesRegionSslPoliciesRequest_descriptor; @@ -553,7 +466,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -584,7 +497,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -623,7 +536,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -658,7 +571,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -791,17 +704,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest.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 @@ -960,7 +866,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -975,20 +881,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListAvailableFeaturesRegionSslPoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1736,7 +1695,19 @@ public ListAvailableFeaturesRegionSslPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAvailableFeaturesRegionSslPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAvailableFeaturesSslPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAvailableFeaturesSslPoliciesRequest.java index 6b6b50b4cf2d..31e1360d4be0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAvailableFeaturesSslPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListAvailableFeaturesSslPoliciesRequest.java @@ -57,86 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAvailableFeaturesSslPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListAvailableFeaturesSslPoliciesRequest_descriptor; @@ -492,7 +412,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -520,7 +440,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -557,7 +477,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -590,7 +510,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -722,17 +642,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListAvailableFeaturesSslPoliciesRequest.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 @@ -881,7 +794,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -896,19 +809,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListAvailableFeaturesSslPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListAvailableFeaturesSslPoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1548,7 +1509,18 @@ public ListAvailableFeaturesSslPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAvailableFeaturesSslPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListBackendBucketsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListBackendBucketsRequest.java index e072254e109e..e62cb61add7c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListBackendBucketsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListBackendBucketsRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListBackendBucketsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListBackendBucketsRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListBackendBucketsRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListBackendBucketsRequest o if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListBackendBucketsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListBackendBucketsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListBackendBucketsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListBackendBucketsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListBackendServicesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListBackendServicesRequest.java index ae9e61c8acbc..c34b698192ed 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListBackendServicesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListBackendServicesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListBackendServicesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListBackendServicesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListBackendServicesRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListBackendServicesRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListBackendServicesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListBackendServicesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListBackendServicesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListBackendServicesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListDiskTypesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListDiskTypesRequest.java index d2c6a0862078..eef81591f477 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListDiskTypesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListDiskTypesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListDiskTypesRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListDiskTypesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListDiskTypesRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListDiskTypesRequest other) zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,17 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListDiskTypesRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListDiskTypesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1713,7 +1675,18 @@ public ListDiskTypesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDiskTypesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListDisksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListDisksRequest.java index febcea021ddb..c82f0b6275ba 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListDisksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListDisksRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListDisksRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListDisksRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListDisksRequest.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 @@ -943,7 +849,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListDisksRequest other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -958,17 +864,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListDisksRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListDisksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1712,7 +1674,18 @@ public ListDisksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListDisksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListErrorsInstanceGroupManagersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListErrorsInstanceGroupManagersRequest.java index e185d2c967f0..0db57c5deac2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListErrorsInstanceGroupManagersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListErrorsInstanceGroupManagersRequest.java @@ -59,100 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListErrorsInstanceGroupManagersRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListErrorsInstanceGroupManagersRequest_descriptor; @@ -614,7 +520,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -650,7 +556,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -689,7 +595,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -726,7 +632,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -858,17 +764,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest.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 @@ -1031,7 +930,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1046,19 +945,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListErrorsInstanceGroupManagersRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListErrorsInstanceGroupManagersRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1915,7 +1874,18 @@ public ListErrorsInstanceGroupManagersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListErrorsInstanceGroupManagersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListErrorsRegionInstanceGroupManagersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListErrorsRegionInstanceGroupManagersRequest.java index 9951ccc11b77..c5ecb6e27af4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListErrorsRegionInstanceGroupManagersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListErrorsRegionInstanceGroupManagersRequest.java @@ -59,100 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListErrorsRegionInstanceGroupManagersRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListErrorsRegionInstanceGroupManagersRequest_descriptor; @@ -614,7 +520,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -650,7 +556,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -690,7 +596,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -727,7 +633,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -860,17 +766,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest.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 @@ -1035,7 +934,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1050,19 +949,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListErrorsRegionInstanceGroupManagersRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListErrorsRegionInstanceGroupManagersRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1921,7 +1880,19 @@ public ListErrorsRegionInstanceGroupManagersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListErrorsRegionInstanceGroupManagersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListExternalVpnGatewaysRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListExternalVpnGatewaysRequest.java index f748578fb54f..8c9fbdbefaec 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListExternalVpnGatewaysRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListExternalVpnGatewaysRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListExternalVpnGatewaysRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListExternalVpnGatewaysRequest_descriptor; @@ -491,7 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -519,7 +439,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -556,7 +476,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -589,7 +509,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -719,17 +639,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListExternalVpnGatewaysRequest.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 @@ -873,7 +786,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListExternalVpnGatewaysRequ if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -888,18 +801,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListExternalVpnGatewaysRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListExternalVpnGatewaysRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1537,7 +1499,18 @@ public ListExternalVpnGatewaysRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListExternalVpnGatewaysRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListFirewallPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListFirewallPoliciesRequest.java index 6b7c58392860..6d123b75b314 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListFirewallPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListFirewallPoliciesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFirewallPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -617249150: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - parentId_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListFirewallPoliciesRequest_descriptor; @@ -505,7 +425,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -533,7 +453,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -573,7 +493,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -608,7 +528,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -738,17 +658,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListFirewallPoliciesRequest.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 @@ -896,7 +809,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListFirewallPoliciesRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -911,18 +824,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListFirewallPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -617249150: + { + parentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -617249150 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.ListFirewallPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1574,7 +1536,18 @@ public ListFirewallPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFirewallPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListFirewallsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListFirewallsRequest.java index 23f1b0cc20d1..9bffc74dfab0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListFirewallsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListFirewallsRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListFirewallsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListFirewallsRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListFirewallsRequest.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 @@ -871,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListFirewallsRequest other) if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -886,17 +799,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListFirewallsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListFirewallsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1534,7 +1497,18 @@ public ListFirewallsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListFirewallsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListForwardingRulesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListForwardingRulesRequest.java index e5cc96b6fc12..70f607686d00 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListForwardingRulesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListForwardingRulesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListForwardingRulesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListForwardingRulesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListForwardingRulesRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListForwardingRulesRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListForwardingRulesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListForwardingRulesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListForwardingRulesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListForwardingRulesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalAddressesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalAddressesRequest.java index 4296727cfd48..5a261414887e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalAddressesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalAddressesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGlobalAddressesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListGlobalAddressesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListGlobalAddressesRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListGlobalAddressesRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListGlobalAddressesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListGlobalAddressesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListGlobalAddressesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGlobalAddressesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalForwardingRulesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalForwardingRulesRequest.java index 51263f03b159..f39bc3c64a81 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalForwardingRulesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalForwardingRulesRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGlobalForwardingRulesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListGlobalForwardingRulesRequest_descriptor; @@ -491,7 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -519,7 +439,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -556,7 +476,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -589,7 +509,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -719,17 +639,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListGlobalForwardingRulesRequest.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 @@ -875,7 +788,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListGlobalForwardingRulesRe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -890,18 +803,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListGlobalForwardingRulesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListGlobalForwardingRulesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1540,7 +1502,18 @@ public ListGlobalForwardingRulesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGlobalForwardingRulesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalNetworkEndpointGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalNetworkEndpointGroupsRequest.java index b21629781f70..acc0551f6fde 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalNetworkEndpointGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalNetworkEndpointGroupsRequest.java @@ -57,86 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGlobalNetworkEndpointGroupsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListGlobalNetworkEndpointGroupsRequest_descriptor; @@ -492,7 +412,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -520,7 +440,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -557,7 +477,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -590,7 +510,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -722,17 +642,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest.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 @@ -881,7 +794,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -896,19 +809,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListGlobalNetworkEndpointGroupsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListGlobalNetworkEndpointGroupsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1548,7 +1509,18 @@ public ListGlobalNetworkEndpointGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGlobalNetworkEndpointGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalOperationsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalOperationsRequest.java index 1844fd8b1ab0..119e55f55b0b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalOperationsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalOperationsRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGlobalOperationsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListGlobalOperationsRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListGlobalOperationsRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListGlobalOperationsRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListGlobalOperationsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListGlobalOperationsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListGlobalOperationsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGlobalOperationsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalOrganizationOperationsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalOrganizationOperationsRequest.java index 075b052859ae..b8c484a8d266 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalOrganizationOperationsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalOrganizationOperationsRequest.java @@ -57,86 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGlobalOrganizationOperationsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -617249150: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - parentId_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000020; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListGlobalOrganizationOperationsRequest_descriptor; @@ -507,7 +427,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -535,7 +455,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -575,7 +495,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -610,7 +530,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -742,17 +662,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest.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 @@ -905,7 +818,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -920,19 +833,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListGlobalOrganizationOperationsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -617249150: + { + parentId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -617249150 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -157380176 + 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.compute.v1.ListGlobalOrganizationOperationsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1586,7 +1547,18 @@ public ListGlobalOrganizationOperationsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGlobalOrganizationOperationsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalPublicDelegatedPrefixesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalPublicDelegatedPrefixesRequest.java index b6f1c9e377e2..a01007c13063 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalPublicDelegatedPrefixesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListGlobalPublicDelegatedPrefixesRequest.java @@ -57,86 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListGlobalPublicDelegatedPrefixesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListGlobalPublicDelegatedPrefixesRequest_descriptor; @@ -492,7 +412,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -520,7 +440,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -557,7 +477,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -590,7 +510,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -722,17 +642,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest.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 @@ -881,7 +794,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -896,19 +809,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListGlobalPublicDelegatedPrefixesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListGlobalPublicDelegatedPrefixesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1548,7 +1509,18 @@ public ListGlobalPublicDelegatedPrefixesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListGlobalPublicDelegatedPrefixesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListHealthChecksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListHealthChecksRequest.java index 7e54cefac84d..c831fc2256ed 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListHealthChecksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListHealthChecksRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListHealthChecksRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListHealthChecksRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListHealthChecksRequest.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 @@ -871,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListHealthChecksRequest oth if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -886,18 +799,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListHealthChecksRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListHealthChecksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1535,7 +1497,18 @@ public ListHealthChecksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListHealthChecksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListImagesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListImagesRequest.java index 3edc9092a0b6..9017caf6e6df 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListImagesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListImagesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListImagesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListImagesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListImagesRequest.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 @@ -870,7 +783,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListImagesRequest other) { if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -885,17 +798,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListImagesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListImagesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1533,7 +1496,18 @@ public ListImagesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListImagesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceGroupManagersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceGroupManagersRequest.java index 436e77f4c21c..40db4241c4ca 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceGroupManagersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceGroupManagersRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInstanceGroupManagersRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListInstanceGroupManagersRequest_descriptor; @@ -551,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -582,7 +495,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,7 +568,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -785,17 +698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListInstanceGroupManagersRequest.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 @@ -948,7 +854,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListInstanceGroupManagersRe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -963,18 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListInstanceGroupManagersRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListInstanceGroupManagersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1719,7 +1680,18 @@ public ListInstanceGroupManagersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstanceGroupManagersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceGroupsRequest.java index 997216cb3c0e..bdcffbbc9c45 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceGroupsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInstanceGroupsRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListInstanceGroupsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListInstanceGroupsRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListInstanceGroupsRequest o zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListInstanceGroupsRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListInstanceGroupsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListInstanceGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstanceGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceTemplatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceTemplatesRequest.java index 0aa99d3c9043..2de72a3132d6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceTemplatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstanceTemplatesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInstanceTemplatesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListInstanceTemplatesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListInstanceTemplatesRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListInstanceTemplatesReques if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListInstanceTemplatesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListInstanceTemplatesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListInstanceTemplatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstanceTemplatesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesInstanceGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesInstanceGroupsRequest.java index 49d5d1b056fd..94bd42581f40 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesInstanceGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesInstanceGroupsRequest.java @@ -58,118 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInstancesInstanceGroupsRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 648762026: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroup_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -484925190: - { - com.google.cloud.compute.v1.InstanceGroupsListInstancesRequest.Builder subBuilder = - null; - if (instanceGroupsListInstancesRequestResource_ != null) { - subBuilder = instanceGroupsListInstancesRequestResource_.toBuilder(); - } - instanceGroupsListInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupsListInstancesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupsListInstancesRequestResource_); - instanceGroupsListInstancesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListInstancesInstanceGroupsRequest_descriptor; @@ -689,7 +577,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -728,7 +616,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -773,7 +661,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -814,7 +702,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -944,17 +832,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest.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 @@ -1131,7 +1012,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListInstancesInstanceGroups zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1146,19 +1027,87 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListInstancesInstanceGroupsRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 648762026: + { + instanceGroup_ = input.readStringRequireUtf8(); + + break; + } // case 648762026 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -484925190: + { + input.readMessage( + getInstanceGroupsListInstancesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -484925190 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListInstancesInstanceGroupsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2222,7 +2171,18 @@ public ListInstancesInstanceGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstancesInstanceGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesRegionInstanceGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesRegionInstanceGroupsRequest.java index 15f864d663b7..d9ba7041e31f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesRegionInstanceGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesRegionInstanceGroupsRequest.java @@ -59,118 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInstancesRegionInstanceGroupsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 385918626: - { - com.google.cloud.compute.v1.RegionInstanceGroupsListInstancesRequest.Builder - subBuilder = null; - if (regionInstanceGroupsListInstancesRequestResource_ != null) { - subBuilder = regionInstanceGroupsListInstancesRequestResource_.toBuilder(); - } - regionInstanceGroupsListInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupsListInstancesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupsListInstancesRequestResource_); - regionInstanceGroupsListInstancesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 648762026: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroup_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListInstancesRegionInstanceGroupsRequest_descriptor; @@ -691,7 +579,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -730,7 +618,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -775,7 +663,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -816,7 +704,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -948,17 +836,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest.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 @@ -1138,7 +1019,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1153,19 +1034,87 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListInstancesRegionInstanceGroupsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 385918626: + { + input.readMessage( + getRegionInstanceGroupsListInstancesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 385918626 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 648762026: + { + instanceGroup_ = input.readStringRequireUtf8(); + + break; + } // case 648762026 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListInstancesRegionInstanceGroupsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2235,7 +2184,18 @@ public ListInstancesRegionInstanceGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstancesRegionInstanceGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesRequest.java index 2fdb9e27d433..59b340b223b9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInstancesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInstancesRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListInstancesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListInstancesRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListInstancesRequest other) zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,17 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListInstancesRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListInstancesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1713,7 +1675,18 @@ public ListInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectAttachmentsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectAttachmentsRequest.java index 89d211d6385b..00de7fd5a3a8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectAttachmentsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectAttachmentsRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInterconnectAttachmentsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListInterconnectAttachmentsRequest_descriptor; @@ -551,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -582,7 +495,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,7 +568,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -785,17 +698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListInterconnectAttachmentsRequest.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 @@ -948,7 +854,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListInterconnectAttachments if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -963,19 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListInterconnectAttachmentsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListInterconnectAttachmentsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1721,7 +1681,18 @@ public ListInterconnectAttachmentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInterconnectAttachmentsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectLocationsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectLocationsRequest.java index 737e1f666d55..917a16bfb827 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectLocationsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectLocationsRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInterconnectLocationsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListInterconnectLocationsRequest_descriptor; @@ -491,7 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -519,7 +439,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -556,7 +476,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -589,7 +509,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -719,17 +639,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListInterconnectLocationsRequest.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 @@ -875,7 +788,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListInterconnectLocationsRe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -890,18 +803,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListInterconnectLocationsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListInterconnectLocationsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1540,7 +1502,18 @@ public ListInterconnectLocationsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInterconnectLocationsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectsRequest.java index b60406d2ef86..291ca7bfe46d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListInterconnectsRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListInterconnectsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListInterconnectsRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListInterconnectsRequest.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 @@ -871,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListInterconnectsRequest ot if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -886,18 +799,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListInterconnectsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListInterconnectsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1535,7 +1497,18 @@ public ListInterconnectsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListInterconnectsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListLicensesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListLicensesRequest.java index f0bb8c8eb061..a906706845a1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListLicensesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListLicensesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListLicensesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListLicensesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListLicensesRequest.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 @@ -871,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListLicensesRequest other) if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -886,17 +799,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListLicensesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListLicensesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1534,7 +1497,18 @@ public ListLicensesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListLicensesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListMachineImagesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListMachineImagesRequest.java index 2e285f2b4843..ba29205ca875 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListMachineImagesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListMachineImagesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListMachineImagesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListMachineImagesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListMachineImagesRequest.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 @@ -871,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListMachineImagesRequest ot if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -886,18 +799,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListMachineImagesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListMachineImagesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1535,7 +1497,18 @@ public ListMachineImagesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListMachineImagesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListMachineTypesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListMachineTypesRequest.java index b5fa040665dc..a383b8876b46 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListMachineTypesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListMachineTypesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListMachineTypesRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListMachineTypesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListMachineTypesRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListMachineTypesRequest oth zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListMachineTypesRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListMachineTypesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListMachineTypesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListMachineTypesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListManagedInstancesInstanceGroupManagersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListManagedInstancesInstanceGroupManagersRequest.java index 70cb63923095..2c2cfd85dddd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListManagedInstancesInstanceGroupManagersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListManagedInstancesInstanceGroupManagersRequest.java @@ -59,100 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListManagedInstancesInstanceGroupManagersRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListManagedInstancesInstanceGroupManagersRequest_descriptor; @@ -615,7 +521,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -651,7 +557,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -691,7 +597,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -728,7 +634,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -866,17 +772,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest.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 @@ -1042,7 +941,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1057,20 +956,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListManagedInstancesInstanceGroupManagersRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListManagedInstancesInstanceGroupManagersRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1930,7 +1888,19 @@ public ListManagedInstancesInstanceGroupManagersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListManagedInstancesInstanceGroupManagersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListManagedInstancesRegionInstanceGroupManagersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListManagedInstancesRegionInstanceGroupManagersRequest.java index 39b89387eadf..903a2c9a43e7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListManagedInstancesRegionInstanceGroupManagersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListManagedInstancesRegionInstanceGroupManagersRequest.java @@ -60,100 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListManagedInstancesRegionInstanceGroupManagersRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListManagedInstancesRegionInstanceGroupManagersRequest_descriptor; @@ -617,7 +523,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -653,7 +559,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -694,7 +600,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -731,7 +637,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -872,17 +778,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest.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 @@ -1052,7 +951,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1067,20 +966,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest - 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListManagedInstancesRegionInstanceGroupManagersRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1942,8 +1900,19 @@ public ListManagedInstancesRegionInstanceGroupManagersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListManagedInstancesRegionInstanceGroupManagersRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointGroupsRequest.java index 5aa460a50b43..1bcd5c816725 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointGroupsRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListNetworkEndpointGroupsRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListNetworkEndpointGroupsRequest_descriptor; @@ -551,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -582,7 +495,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,7 +568,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -785,17 +698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest.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 @@ -948,7 +854,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListNetworkEndpointGroupsRe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -963,18 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListNetworkEndpointGroupsRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListNetworkEndpointGroupsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1719,7 +1680,18 @@ public ListNetworkEndpointGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListNetworkEndpointGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest.java index 8973e2f066ff..65d1e8b9052f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest.java @@ -59,93 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest_descriptor; @@ -557,7 +470,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -590,7 +503,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -630,7 +543,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -665,7 +578,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -806,17 +719,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest.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 @@ -979,7 +885,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -994,20 +900,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest - 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1763,8 +1722,19 @@ public ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsNetworkEndpointGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsNetworkEndpointGroupsRequest.java index 7eaa6bdcf7d2..fba4e17269da 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsNetworkEndpointGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkEndpointsNetworkEndpointGroupsRequest.java @@ -59,119 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListNetworkEndpointsNetworkEndpointGroupsRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 475947122: - { - com.google.cloud.compute.v1.NetworkEndpointGroupsListEndpointsRequest.Builder - subBuilder = null; - if (networkEndpointGroupsListEndpointsRequestResource_ != null) { - subBuilder = networkEndpointGroupsListEndpointsRequestResource_.toBuilder(); - } - networkEndpointGroupsListEndpointsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroupsListEndpointsRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkEndpointGroupsListEndpointsRequestResource_); - networkEndpointGroupsListEndpointsRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -823710670: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEndpointGroup_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListNetworkEndpointsNetworkEndpointGroupsRequest_descriptor; @@ -695,7 +582,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -736,7 +623,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -782,7 +669,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -823,7 +710,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -961,17 +848,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest.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 @@ -1154,7 +1034,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1169,20 +1049,87 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 475947122: + { + input.readMessage( + getNetworkEndpointGroupsListEndpointsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 475947122 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -823710670: + { + networkEndpointGroup_ = input.readStringRequireUtf8(); + + break; + } // case -823710670 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListNetworkEndpointsNetworkEndpointGroupsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2260,7 +2207,19 @@ public ListNetworkEndpointsNetworkEndpointGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListNetworkEndpointsNetworkEndpointGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkFirewallPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkFirewallPoliciesRequest.java index cac5adee7ae3..a776b10d7963 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkFirewallPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworkFirewallPoliciesRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListNetworkFirewallPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListNetworkFirewallPoliciesRequest_descriptor; @@ -491,7 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -519,7 +439,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -556,7 +476,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -589,7 +509,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -719,17 +639,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest.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 @@ -875,7 +788,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListNetworkFirewallPolicies if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -890,19 +803,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListNetworkFirewallPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListNetworkFirewallPoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1542,7 +1503,18 @@ public ListNetworkFirewallPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListNetworkFirewallPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworksRequest.java index 0e87570b8790..86b05c64b92e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNetworksRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListNetworksRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListNetworksRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListNetworksRequest.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 @@ -871,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListNetworksRequest other) if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -886,17 +799,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListNetworksRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListNetworksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1534,7 +1497,18 @@ public ListNetworksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListNetworksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeGroupsRequest.java index f6e269d145b0..69e6539aca72 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeGroupsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListNodeGroupsRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListNodeGroupsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListNodeGroupsRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListNodeGroupsRequest other zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListNodeGroupsRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListNodeGroupsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListNodeGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListNodeGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeTemplatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeTemplatesRequest.java index a304deed45d4..ed5b45a8a3d6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeTemplatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeTemplatesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListNodeTemplatesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListNodeTemplatesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListNodeTemplatesRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListNodeTemplatesRequest ot if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListNodeTemplatesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListNodeTemplatesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListNodeTemplatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListNodeTemplatesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeTypesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeTypesRequest.java index 7f2e97d0d1bc..52c936e0d62d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeTypesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodeTypesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListNodeTypesRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListNodeTypesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListNodeTypesRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListNodeTypesRequest other) zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,17 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListNodeTypesRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListNodeTypesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1713,7 +1675,18 @@ public ListNodeTypesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListNodeTypesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodesNodeGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodesNodeGroupsRequest.java index ce00d5a2a156..180c9e76a0e9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodesNodeGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListNodesNodeGroupsRequest.java @@ -57,100 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListNodesNodeGroupsRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -535302126: - { - java.lang.String s = input.readStringRequireUtf8(); - - nodeGroup_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListNodesNodeGroupsRequest_descriptor; @@ -610,7 +516,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -644,7 +550,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -683,7 +589,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -720,7 +626,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -850,17 +756,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListNodesNodeGroupsRequest.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 @@ -1018,7 +917,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListNodesNodeGroupsRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1033,18 +932,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListNodesNodeGroupsRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -535302126: + { + nodeGroup_ = input.readStringRequireUtf8(); + + break; + } // case -535302126 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListNodesNodeGroupsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1894,7 +1854,18 @@ public ListNodesNodeGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListNodesNodeGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPacketMirroringsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPacketMirroringsRequest.java index d31b9b1fba35..957e918bb055 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPacketMirroringsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPacketMirroringsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPacketMirroringsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListPacketMirroringsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListPacketMirroringsRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListPacketMirroringsRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListPacketMirroringsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListPacketMirroringsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListPacketMirroringsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPacketMirroringsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPeeringRoutesNetworksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPeeringRoutesNetworksRequest.java index bd4290b0d6bd..b9233a057594 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPeeringRoutesNetworksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPeeringRoutesNetworksRequest.java @@ -60,114 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPeeringRoutesNetworksRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000004; - maxResults_ = input.readUInt32(); - break; - } - case 889207802: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - direction_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = s; - break; - } - case 1996570962: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - peeringName_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000080; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListPeeringRoutesNetworksRequest_descriptor; @@ -938,7 +830,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000080) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -978,7 +870,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1028,7 +920,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1075,7 +967,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1205,17 +1097,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest.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 @@ -1401,7 +1286,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListPeeringRoutesNetworksRe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1416,18 +1301,91 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListPeeringRoutesNetworksRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 437723352 + case 889207802: + { + direction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 889207802 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 1862979954 + case 1996570962: + { + peeringName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1996570962 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case -157380176 + 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.compute.v1.ListPeeringRoutesNetworksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2538,7 +2496,18 @@ public ListPeeringRoutesNetworksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPeeringRoutesNetworksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPerInstanceConfigsInstanceGroupManagersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPerInstanceConfigsInstanceGroupManagersRequest.java index c5af1ca120b1..c9eb8f078d22 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPerInstanceConfigsInstanceGroupManagersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPerInstanceConfigsInstanceGroupManagersRequest.java @@ -59,100 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPerInstanceConfigsInstanceGroupManagersRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListPerInstanceConfigsInstanceGroupManagersRequest_descriptor; @@ -615,7 +521,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -651,7 +557,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -692,7 +598,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -729,7 +635,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -868,17 +774,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest.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 @@ -1045,7 +944,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1060,20 +959,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListPerInstanceConfigsInstanceGroupManagersRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1935,8 +1893,19 @@ public ListPerInstanceConfigsInstanceGroupManagersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPerInstanceConfigsInstanceGroupManagersRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPerInstanceConfigsRegionInstanceGroupManagersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPerInstanceConfigsRegionInstanceGroupManagersRequest.java index 8161317986f1..65bf0fb511c9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPerInstanceConfigsRegionInstanceGroupManagersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPerInstanceConfigsRegionInstanceGroupManagersRequest.java @@ -60,100 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPerInstanceConfigsRegionInstanceGroupManagersRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListPerInstanceConfigsRegionInstanceGroupManagersRequest_descriptor; @@ -617,7 +523,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -653,7 +559,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -694,7 +600,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -731,7 +637,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -873,17 +779,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest.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 @@ -1054,7 +953,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1069,20 +968,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest - 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListPerInstanceConfigsRegionInstanceGroupManagersRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1944,8 +1902,19 @@ public ListPerInstanceConfigsRegionInstanceGroupManagersRequest parsePartialFrom com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPerInstanceConfigsRegionInstanceGroupManagersRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPreconfiguredExpressionSetsSecurityPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPreconfiguredExpressionSetsSecurityPoliciesRequest.java index c92a90cf57ce..50f2e9a61212 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPreconfiguredExpressionSetsSecurityPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPreconfiguredExpressionSetsSecurityPoliciesRequest.java @@ -58,86 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPreconfiguredExpressionSetsSecurityPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListPreconfiguredExpressionSetsSecurityPoliciesRequest_descriptor; @@ -495,7 +415,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -523,7 +443,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -562,7 +482,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -595,7 +515,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -736,17 +656,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest.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 @@ -902,7 +815,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -917,20 +830,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest - 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListPreconfiguredExpressionSetsSecurityPoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1575,8 +1535,19 @@ public ListPreconfiguredExpressionSetsSecurityPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPreconfiguredExpressionSetsSecurityPoliciesRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPublicAdvertisedPrefixesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPublicAdvertisedPrefixesRequest.java index e4e662d422d2..2f124155f1f0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPublicAdvertisedPrefixesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPublicAdvertisedPrefixesRequest.java @@ -57,86 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPublicAdvertisedPrefixesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListPublicAdvertisedPrefixesRequest_descriptor; @@ -492,7 +412,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -520,7 +440,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -557,7 +477,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -590,7 +510,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -720,17 +640,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest.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 @@ -877,7 +790,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -892,19 +805,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListPublicAdvertisedPrefixesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListPublicAdvertisedPrefixesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1544,7 +1505,18 @@ public ListPublicAdvertisedPrefixesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPublicAdvertisedPrefixesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPublicDelegatedPrefixesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPublicDelegatedPrefixesRequest.java index 2f85e83f758a..d1e6ebcfc4c0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPublicDelegatedPrefixesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListPublicDelegatedPrefixesRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPublicDelegatedPrefixesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListPublicDelegatedPrefixesRequest_descriptor; @@ -551,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -582,7 +495,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,7 +568,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -785,17 +698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest.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 @@ -948,7 +854,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListPublicDelegatedPrefixes if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -963,19 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListPublicDelegatedPrefixesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListPublicDelegatedPrefixesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1721,7 +1681,18 @@ public ListPublicDelegatedPrefixesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPublicDelegatedPrefixesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListReferrersInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListReferrersInstancesRequest.java index 98679cdc0e09..a8c2267989bb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListReferrersInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListReferrersInstancesRequest.java @@ -57,100 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListReferrersInstancesRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListReferrersInstancesRequest_descriptor; @@ -610,7 +516,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -644,7 +550,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -683,7 +589,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -720,7 +626,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -850,17 +756,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListReferrersInstancesRequest.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 @@ -1018,7 +917,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListReferrersInstancesReque zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1033,18 +932,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListReferrersInstancesRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListReferrersInstancesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1894,7 +1854,18 @@ public ListReferrersInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListReferrersInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionAutoscalersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionAutoscalersRequest.java index 26843bc3b238..6a5b30cbced3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionAutoscalersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionAutoscalersRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionAutoscalersRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionAutoscalersRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionAutoscalersRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionAutoscalersReques if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionAutoscalersRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionAutoscalersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListRegionAutoscalersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionAutoscalersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionBackendServicesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionBackendServicesRequest.java index 67efd6ec5d08..460ccaba114e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionBackendServicesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionBackendServicesRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionBackendServicesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionBackendServicesRequest_descriptor; @@ -551,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -582,7 +495,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,7 +568,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -785,17 +698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionBackendServicesRequest.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 @@ -948,7 +854,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionBackendServicesRe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -963,18 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionBackendServicesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionBackendServicesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1719,7 +1680,18 @@ public ListRegionBackendServicesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionBackendServicesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionCommitmentsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionCommitmentsRequest.java index 09d4b4990d16..a89dfdc9fe7e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionCommitmentsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionCommitmentsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionCommitmentsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionCommitmentsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionCommitmentsRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionCommitmentsReques if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionCommitmentsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionCommitmentsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListRegionCommitmentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionCommitmentsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionDiskTypesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionDiskTypesRequest.java index 813e1b41a8be..c62ba7c20859 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionDiskTypesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionDiskTypesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionDiskTypesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionDiskTypesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionDiskTypesRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionDiskTypesRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionDiskTypesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionDiskTypesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListRegionDiskTypesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionDiskTypesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionDisksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionDisksRequest.java index b3e4b4a9684f..b46627feaf0a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionDisksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionDisksRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionDisksRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionDisksRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionDisksRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionDisksRequest othe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionDisksRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionDisksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListRegionDisksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionDisksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionHealthCheckServicesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionHealthCheckServicesRequest.java index 96d2e24ffc80..8c28230a4f2c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionHealthCheckServicesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionHealthCheckServicesRequest.java @@ -58,93 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionHealthCheckServicesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionHealthCheckServicesRequest_descriptor; @@ -552,7 +465,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -583,7 +496,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -621,7 +534,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -656,7 +569,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -786,17 +699,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest.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 @@ -950,7 +856,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -965,19 +871,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionHealthCheckServicesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionHealthCheckServicesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1723,7 +1683,18 @@ public ListRegionHealthCheckServicesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionHealthCheckServicesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionHealthChecksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionHealthChecksRequest.java index 22fdc6d8278c..927008336499 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionHealthChecksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionHealthChecksRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionHealthChecksRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionHealthChecksRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionHealthChecksRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionHealthChecksReque if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionHealthChecksRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionHealthChecksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListRegionHealthChecksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionHealthChecksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionInstanceGroupManagersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionInstanceGroupManagersRequest.java index 5f6aaf47fcb5..f45cd8d16169 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionInstanceGroupManagersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionInstanceGroupManagersRequest.java @@ -58,93 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionInstanceGroupManagersRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionInstanceGroupManagersRequest_descriptor; @@ -552,7 +465,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -583,7 +496,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -621,7 +534,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -656,7 +569,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -788,17 +701,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest.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 @@ -954,7 +860,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -969,19 +875,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionInstanceGroupManagersRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionInstanceGroupManagersRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1727,7 +1687,18 @@ public ListRegionInstanceGroupManagersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionInstanceGroupManagersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionInstanceGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionInstanceGroupsRequest.java index 05679353ab31..9e1f0485b1c0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionInstanceGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionInstanceGroupsRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionInstanceGroupsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionInstanceGroupsRequest_descriptor; @@ -551,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -582,7 +495,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,7 +568,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -785,17 +698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionInstanceGroupsRequest.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 @@ -946,7 +852,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionInstanceGroupsReq if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -961,18 +867,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionInstanceGroupsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionInstanceGroupsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1716,7 +1677,18 @@ public ListRegionInstanceGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionInstanceGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNetworkEndpointGroupsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNetworkEndpointGroupsRequest.java index c5723fac4cbc..b48da517bffc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNetworkEndpointGroupsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNetworkEndpointGroupsRequest.java @@ -58,93 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionNetworkEndpointGroupsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionNetworkEndpointGroupsRequest_descriptor; @@ -552,7 +465,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -583,7 +496,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -621,7 +534,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -656,7 +569,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -788,17 +701,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest.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 @@ -954,7 +860,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -969,19 +875,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionNetworkEndpointGroupsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionNetworkEndpointGroupsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1727,7 +1687,18 @@ public ListRegionNetworkEndpointGroupsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionNetworkEndpointGroupsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNetworkFirewallPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNetworkFirewallPoliciesRequest.java index 3d2bc1a5e80d..4b755038d220 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNetworkFirewallPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNetworkFirewallPoliciesRequest.java @@ -58,93 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionNetworkFirewallPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionNetworkFirewallPoliciesRequest_descriptor; @@ -552,7 +465,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -583,7 +496,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -621,7 +534,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -656,7 +569,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -788,17 +701,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest.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 @@ -954,7 +860,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -969,19 +875,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionNetworkFirewallPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionNetworkFirewallPoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1727,7 +1687,18 @@ public ListRegionNetworkFirewallPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionNetworkFirewallPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNotificationEndpointsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNotificationEndpointsRequest.java index 17609c2e8ff3..8ca15d91a01b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNotificationEndpointsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionNotificationEndpointsRequest.java @@ -58,93 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionNotificationEndpointsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionNotificationEndpointsRequest_descriptor; @@ -552,7 +465,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -583,7 +496,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -621,7 +534,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -656,7 +569,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -788,17 +701,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest.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 @@ -954,7 +860,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -969,19 +875,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionNotificationEndpointsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionNotificationEndpointsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1727,7 +1687,18 @@ public ListRegionNotificationEndpointsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionNotificationEndpointsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionOperationsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionOperationsRequest.java index fc77e83b4dcf..1659d5be4e7d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionOperationsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionOperationsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionOperationsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionOperationsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionOperationsRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionOperationsRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionOperationsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionOperationsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListRegionOperationsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionOperationsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSecurityPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSecurityPoliciesRequest.java index 13e2f54ff74b..21e71997d929 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSecurityPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSecurityPoliciesRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionSecurityPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionSecurityPoliciesRequest_descriptor; @@ -551,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -582,7 +495,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,7 +568,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -785,17 +698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest.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 @@ -948,7 +854,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionSecurityPoliciesR if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -963,19 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionSecurityPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionSecurityPoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1720,7 +1680,18 @@ public ListRegionSecurityPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionSecurityPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSslCertificatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSslCertificatesRequest.java index 9fedf0a3c75a..8cd6b51cf890 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSslCertificatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSslCertificatesRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionSslCertificatesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionSslCertificatesRequest_descriptor; @@ -551,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -582,7 +495,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,7 +568,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -785,17 +698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionSslCertificatesRequest.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 @@ -948,7 +854,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionSslCertificatesRe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -963,18 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionSslCertificatesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionSslCertificatesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1719,7 +1680,18 @@ public ListRegionSslCertificatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionSslCertificatesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSslPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSslPoliciesRequest.java index cb9afc6b4b43..f24cbb500c2f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSslPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionSslPoliciesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionSslPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionSslPoliciesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionSslPoliciesRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionSslPoliciesReques if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionSslPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionSslPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListRegionSslPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionSslPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetHttpProxiesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetHttpProxiesRequest.java index 510162f1a09b..a3a9d7c56a23 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetHttpProxiesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetHttpProxiesRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionTargetHttpProxiesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionTargetHttpProxiesRequest_descriptor; @@ -551,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -582,7 +495,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,7 +568,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -785,17 +698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest.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 @@ -948,7 +854,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionTargetHttpProxies if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -963,19 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionTargetHttpProxiesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionTargetHttpProxiesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1721,7 +1681,18 @@ public ListRegionTargetHttpProxiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionTargetHttpProxiesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetHttpsProxiesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetHttpsProxiesRequest.java index 098d91088314..9e93c052d9cd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetHttpsProxiesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetHttpsProxiesRequest.java @@ -58,93 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionTargetHttpsProxiesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionTargetHttpsProxiesRequest_descriptor; @@ -552,7 +465,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -583,7 +496,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -621,7 +534,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -656,7 +569,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -786,17 +699,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest.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 @@ -950,7 +856,7 @@ public Builder mergeFrom( if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -965,19 +871,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionTargetHttpsProxiesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionTargetHttpsProxiesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1723,7 +1683,18 @@ public ListRegionTargetHttpsProxiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionTargetHttpsProxiesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetTcpProxiesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetTcpProxiesRequest.java index 6385d8e95717..e0c4443be0f6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetTcpProxiesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionTargetTcpProxiesRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionTargetTcpProxiesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionTargetTcpProxiesRequest_descriptor; @@ -551,7 +464,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -582,7 +495,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -655,7 +568,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -785,17 +698,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest.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 @@ -948,7 +854,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionTargetTcpProxiesR if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -963,19 +869,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionTargetTcpProxiesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionTargetTcpProxiesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1720,7 +1680,18 @@ public ListRegionTargetTcpProxiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionTargetTcpProxiesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionUrlMapsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionUrlMapsRequest.java index 028267265bc2..a543a158936c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionUrlMapsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionUrlMapsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionUrlMapsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionUrlMapsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionUrlMapsRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionUrlMapsRequest ot if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionUrlMapsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionUrlMapsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListRegionUrlMapsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionUrlMapsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionsRequest.java index dad39c7d1e1c..4e8ca65eb434 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRegionsRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRegionsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRegionsRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRegionsRequest.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 @@ -870,7 +783,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRegionsRequest other) { if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -885,17 +798,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRegionsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRegionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1533,7 +1496,18 @@ public ListRegionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRegionsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListReservationsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListReservationsRequest.java index dd23975bce12..674e65735baa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListReservationsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListReservationsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListReservationsRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListReservationsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListReservationsRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListReservationsRequest oth zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListReservationsRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListReservationsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListReservationsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListReservationsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListResourcePoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListResourcePoliciesRequest.java index 4b5ca9bd8345..aefbeabe8759 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListResourcePoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListResourcePoliciesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListResourcePoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListResourcePoliciesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListResourcePoliciesRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListResourcePoliciesRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListResourcePoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListResourcePoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListResourcePoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListResourcePoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRoutersRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRoutersRequest.java index c7139c0a8ed9..e7967ba16df9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRoutersRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRoutersRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRoutersRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRoutersRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRoutersRequest.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 @@ -943,7 +849,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRoutersRequest other) { if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -958,17 +864,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRoutersRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRoutersRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1712,7 +1674,18 @@ public ListRoutersRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRoutersRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRoutesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRoutesRequest.java index 65fcc209223d..1cc026e5e7b1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRoutesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListRoutesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListRoutesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListRoutesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListRoutesRequest.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 @@ -870,7 +783,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListRoutesRequest other) { if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -885,17 +798,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListRoutesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListRoutesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1533,7 +1496,18 @@ public ListRoutesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListRoutesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSecurityPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSecurityPoliciesRequest.java index e51f0baf3f18..8c258d39e161 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSecurityPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSecurityPoliciesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSecurityPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListSecurityPoliciesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListSecurityPoliciesRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListSecurityPoliciesRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListSecurityPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListSecurityPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListSecurityPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSecurityPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListServiceAttachmentsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListServiceAttachmentsRequest.java index bd223d5d4e4e..e8644a7414a6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListServiceAttachmentsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListServiceAttachmentsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListServiceAttachmentsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListServiceAttachmentsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListServiceAttachmentsRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListServiceAttachmentsReque if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListServiceAttachmentsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListServiceAttachmentsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListServiceAttachmentsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListServiceAttachmentsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSnapshotsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSnapshotsRequest.java index 45c453e93ef4..431e4a9763ae 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSnapshotsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSnapshotsRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSnapshotsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListSnapshotsRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListSnapshotsRequest.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 @@ -871,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListSnapshotsRequest other) if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -886,17 +799,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListSnapshotsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListSnapshotsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1534,7 +1497,18 @@ public ListSnapshotsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSnapshotsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSslCertificatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSslCertificatesRequest.java index 93091548e1c9..82ec361f4260 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSslCertificatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSslCertificatesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSslCertificatesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListSslCertificatesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListSslCertificatesRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListSslCertificatesRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListSslCertificatesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListSslCertificatesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListSslCertificatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSslCertificatesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSslPoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSslPoliciesRequest.java index 900e45088c4a..e42d41f73e25 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSslPoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSslPoliciesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSslPoliciesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListSslPoliciesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListSslPoliciesRequest.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 @@ -871,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListSslPoliciesRequest othe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -886,18 +799,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListSslPoliciesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListSslPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1535,7 +1497,18 @@ public ListSslPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSslPoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSubnetworksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSubnetworksRequest.java index 265ea60677da..92aa29ebca14 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSubnetworksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListSubnetworksRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListSubnetworksRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListSubnetworksRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListSubnetworksRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListSubnetworksRequest othe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListSubnetworksRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListSubnetworksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListSubnetworksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListSubnetworksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetGrpcProxiesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetGrpcProxiesRequest.java index c6b7e17a9805..e2250603def9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetGrpcProxiesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetGrpcProxiesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTargetGrpcProxiesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListTargetGrpcProxiesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListTargetGrpcProxiesRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListTargetGrpcProxiesReques if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListTargetGrpcProxiesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListTargetGrpcProxiesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListTargetGrpcProxiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTargetGrpcProxiesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetHttpProxiesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetHttpProxiesRequest.java index ad3e2b69b0e2..9834bd6cf7ca 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetHttpProxiesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetHttpProxiesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTargetHttpProxiesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListTargetHttpProxiesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListTargetHttpProxiesRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListTargetHttpProxiesReques if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListTargetHttpProxiesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListTargetHttpProxiesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListTargetHttpProxiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTargetHttpProxiesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetHttpsProxiesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetHttpsProxiesRequest.java index f54f2d93b7fd..786a7d48bb9d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetHttpsProxiesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetHttpsProxiesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTargetHttpsProxiesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListTargetHttpsProxiesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListTargetHttpsProxiesRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListTargetHttpsProxiesReque if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListTargetHttpsProxiesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListTargetHttpsProxiesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListTargetHttpsProxiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTargetHttpsProxiesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetInstancesRequest.java index 79e7a0fb7a9d..fdce46e3a2e3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetInstancesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTargetInstancesRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListTargetInstancesRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListTargetInstancesRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListTargetInstancesRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListTargetInstancesRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListTargetInstancesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListTargetInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTargetInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetPoolsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetPoolsRequest.java index d58db0e49437..c347ee0e4fcc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetPoolsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetPoolsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTargetPoolsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListTargetPoolsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListTargetPoolsRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListTargetPoolsRequest othe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListTargetPoolsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListTargetPoolsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListTargetPoolsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTargetPoolsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetSslProxiesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetSslProxiesRequest.java index 5da055a505e2..1d1353b49eef 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetSslProxiesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetSslProxiesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTargetSslProxiesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListTargetSslProxiesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListTargetSslProxiesRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListTargetSslProxiesRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListTargetSslProxiesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListTargetSslProxiesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListTargetSslProxiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTargetSslProxiesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetTcpProxiesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetTcpProxiesRequest.java index 38386b7b0409..b770168a2257 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetTcpProxiesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetTcpProxiesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTargetTcpProxiesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListTargetTcpProxiesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListTargetTcpProxiesRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListTargetTcpProxiesRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListTargetTcpProxiesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListTargetTcpProxiesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListTargetTcpProxiesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTargetTcpProxiesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetVpnGatewaysRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetVpnGatewaysRequest.java index f918f57f3949..adff0931045d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetVpnGatewaysRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListTargetVpnGatewaysRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListTargetVpnGatewaysRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListTargetVpnGatewaysRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListTargetVpnGatewaysRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListTargetVpnGatewaysReques if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListTargetVpnGatewaysRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListTargetVpnGatewaysRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListTargetVpnGatewaysRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListTargetVpnGatewaysRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListUrlMapsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListUrlMapsRequest.java index 2a376f56574c..2c505d7e8de0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListUrlMapsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListUrlMapsRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListUrlMapsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListUrlMapsRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListUrlMapsRequest.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 @@ -870,7 +783,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListUrlMapsRequest other) { if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -885,17 +798,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListUrlMapsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListUrlMapsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1533,7 +1496,18 @@ public ListUrlMapsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListUrlMapsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListUsableSubnetworksRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListUsableSubnetworksRequest.java index 0c6e41e3bbd7..c22db9839d05 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListUsableSubnetworksRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListUsableSubnetworksRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListUsableSubnetworksRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListUsableSubnetworksRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +638,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListUsableSubnetworksRequest.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 @@ -872,7 +785,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListUsableSubnetworksReques if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -887,18 +800,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListUsableSubnetworksRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListUsableSubnetworksRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1498,18 @@ public ListUsableSubnetworksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListUsableSubnetworksRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListVpnGatewaysRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListVpnGatewaysRequest.java index b0625837bf74..c32dec3c3332 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListVpnGatewaysRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListVpnGatewaysRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListVpnGatewaysRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListVpnGatewaysRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListVpnGatewaysRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListVpnGatewaysRequest othe if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListVpnGatewaysRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListVpnGatewaysRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListVpnGatewaysRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListVpnGatewaysRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListVpnTunnelsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListVpnTunnelsRequest.java index 5c8a99a494e4..1a60b700cdca 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListVpnTunnelsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListVpnTunnelsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListVpnTunnelsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListVpnTunnelsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -783,17 +696,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListVpnTunnelsRequest.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 @@ -944,7 +850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListVpnTunnelsRequest other if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -959,18 +865,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListVpnTunnelsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListVpnTunnelsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1714,7 +1675,18 @@ public ListVpnTunnelsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListVpnTunnelsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListXpnHostsProjectsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListXpnHostsProjectsRequest.java index 6ed5ec7ca3a2..abf03a7a7fd2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListXpnHostsProjectsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListXpnHostsProjectsRequest.java @@ -55,103 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListXpnHostsProjectsRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1906131130: - { - com.google.cloud.compute.v1.ProjectsListXpnHostsRequest.Builder subBuilder = null; - if (projectsListXpnHostsRequestResource_ != null) { - subBuilder = projectsListXpnHostsRequestResource_.toBuilder(); - } - projectsListXpnHostsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.ProjectsListXpnHostsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(projectsListXpnHostsRequestResource_); - projectsListXpnHostsRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListXpnHostsProjectsRequest_descriptor; @@ -567,7 +470,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +503,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -643,7 +546,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -680,7 +583,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -810,17 +713,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListXpnHostsProjectsRequest.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 @@ -979,7 +875,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListXpnHostsProjectsRequest if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -994,18 +890,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListXpnHostsProjectsRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1906131130: + { + input.readMessage( + getProjectsListXpnHostsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1906131130 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListXpnHostsProjectsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1855,7 +1808,18 @@ public ListXpnHostsProjectsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListXpnHostsProjectsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListZoneOperationsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListZoneOperationsRequest.java index 3d0e676eee61..998129c8b0cb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListZoneOperationsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListZoneOperationsRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListZoneOperationsRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListZoneOperationsRequest_descriptor; @@ -550,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -581,7 +494,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -619,7 +532,7 @@ public boolean equals(final java.lang.Object obj) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +567,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -784,17 +697,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListZoneOperationsRequest.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 @@ -945,7 +851,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListZoneOperationsRequest o zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -960,18 +866,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListZoneOperationsRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListZoneOperationsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1715,7 +1676,18 @@ public ListZoneOperationsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListZoneOperationsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListZonesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListZonesRequest.java index 820ce57b1a88..3c3e31d2ad17 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListZonesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ListZonesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListZonesRequest( - 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 159957578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - pageToken_ = s; - break; - } - case 437723352: - { - bitField0_ |= 0x00000002; - maxResults_ = input.readUInt32(); - break; - } - case 1284503362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - orderBy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filter_ = s; - break; - } - case -157380176: - { - bitField0_ |= 0x00000010; - returnPartialSuccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ListZonesRequest_descriptor; @@ -490,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(517198390, returnPartialSuccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -518,7 +438,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(517198390, returnPartialSuccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -555,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReturnPartialSuccess()) { if (getReturnPartialSuccess() != other.getReturnPartialSuccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + RETURN_PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnPartialSuccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -717,17 +637,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ListZonesRequest.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 @@ -870,7 +783,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ListZonesRequest other) { if (other.hasReturnPartialSuccess()) { setReturnPartialSuccess(other.getReturnPartialSuccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -885,17 +798,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ListZonesRequest 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 159957578: + { + pageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 159957578 + case 437723352: + { + maxResults_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 437723352 + case 1284503362: + { + orderBy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1284503362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1606001726 + case -157380176: + { + returnPartialSuccess_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -157380176 + 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.compute.v1.ListZonesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1533,7 +1496,18 @@ public ListZonesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListZonesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocalDisk.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocalDisk.java index a8cb5ebc2b74..77dba27e722c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocalDisk.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocalDisk.java @@ -51,65 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LocalDisk( - 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 744072418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - diskType_ = s; - break; - } - case 1463467880: - { - bitField0_ |= 0x00000001; - diskCount_ = input.readInt32(); - break; - } - case -1764857416: - { - bitField0_ |= 0x00000002; - diskSizeGb_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LocalDisk_descriptor; @@ -279,7 +220,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(316263735, diskSizeGb_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -297,7 +238,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(316263735, diskSizeGb_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -324,7 +265,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDiskType()) { if (!getDiskType().equals(other.getDiskType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -347,7 +288,7 @@ public int hashCode() { hash = (37 * hash) + DISK_TYPE_FIELD_NUMBER; hash = (53 * hash) + getDiskType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -474,17 +415,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.LocalDisk.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 @@ -598,7 +532,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LocalDisk other) { diskType_ = other.diskType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,17 +547,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LocalDisk 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 744072418: + { + diskType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 744072418 + case 1463467880: + { + diskCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 1463467880 + case -1764857416: + { + diskSizeGb_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case -1764857416 + 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.compute.v1.LocalDisk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -915,7 +881,18 @@ public LocalDisk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LocalDisk(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocalizedMessage.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocalizedMessage.java index 6ad50b72ba70..a2d96965449d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocalizedMessage.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocalizedMessage.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LocalizedMessage( - 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 -950534086: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - message_ = s; - break; - } - case -189762862: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - locale_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LocalizedMessage_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 513150554, locale_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(513150554, locale_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMessage()) { if (!getMessage().equals(other.getMessage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +275,7 @@ public int hashCode() { hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.LocalizedMessage.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 @@ -575,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LocalizedMessage other) { message_ = other.message_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,17 +529,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LocalizedMessage 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 -950534086: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -950534086 + case -189762862: + { + locale_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -189762862 + 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.compute.v1.LocalizedMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -878,7 +843,18 @@ public LocalizedMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LocalizedMessage(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicy.java index 886effd3fa80..16e88860e203 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicy.java @@ -52,70 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LocationPolicy( - 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 -1585996902: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - targetShape_ = s; - break; - } - case -987579662: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - locations_ = - com.google.protobuf.MapField.newMapField( - LocationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.LocationPolicyLocation> - locations__ = - input.readMessage( - LocationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - locations_.getMutableMap().put(locations__.getKey(), locations__.getValue()); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LocationPolicy_descriptor; @@ -524,7 +460,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLocations(), LocationsDefaultEntryHolder.defaultEntry, 413423454); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -548,7 +484,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(413423454, locations__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -569,7 +505,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetShape()) { if (!getTargetShape().equals(other.getTargetShape())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +524,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_SHAPE_FIELD_NUMBER; hash = (53 * hash) + getTargetShape().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -737,17 +673,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.LocationPolicy.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 @@ -847,7 +776,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LocationPolicy other) { targetShape_ = other.targetShape_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -862,17 +791,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LocationPolicy 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 -1585996902: + { + targetShape_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1585996902 + case -987579662: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.LocationPolicyLocation> + locations__ = + input.readMessage( + LocationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLocations() + .getMutableMap() + .put(locations__.getKey(), locations__.getValue()); + break; + } // case -987579662 + 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.compute.v1.LocationPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1223,7 +1185,18 @@ public LocationPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LocationPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicyLocation.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicyLocation.java index 2adfd29834f1..1fc33944cee0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicyLocation.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicyLocation.java @@ -51,71 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LocationPolicyLocation( - 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 31273394: - { - com.google.cloud.compute.v1.LocationPolicyLocationConstraints.Builder subBuilder = - null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = constraints_.toBuilder(); - } - constraints_ = - input.readMessage( - com.google.cloud.compute.v1.LocationPolicyLocationConstraints.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(constraints_); - constraints_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1206249178: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - preference_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LocationPolicyLocation_descriptor; @@ -457,7 +392,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 150781147, preference_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -472,7 +407,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(150781147, preference_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -496,7 +431,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreference()) { if (!getPreference().equals(other.getPreference())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -515,7 +450,7 @@ public int hashCode() { hash = (37 * hash) + PREFERENCE_FIELD_NUMBER; hash = (53 * hash) + getPreference().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -769,7 +704,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LocationPolicyLocation othe preference_ = other.preference_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -784,18 +719,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LocationPolicyLocation 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 31273394: + { + input.readMessage(getConstraintsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 31273394 + case 1206249178: + { + preference_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1206249178 + 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.compute.v1.LocationPolicyLocation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1170,7 +1130,18 @@ public LocationPolicyLocation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LocationPolicyLocation(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicyLocationConstraints.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicyLocationConstraints.java index 082b8e5e80c1..1a71a23de0d9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicyLocationConstraints.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LocationPolicyLocationConstraints.java @@ -51,52 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LocationPolicyLocationConstraints( - 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 -1994001504: - { - bitField0_ |= 0x00000001; - maxCount_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LocationPolicyLocationConstraints_descriptor; @@ -163,7 +117,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(287620724, maxCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -175,7 +129,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(287620724, maxCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -195,7 +149,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMaxCount()) { if (getMaxCount() != other.getMaxCount()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -210,7 +164,7 @@ public int hashCode() { hash = (37 * hash) + MAX_COUNT_FIELD_NUMBER; hash = (53 * hash) + getMaxCount(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -340,17 +294,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.LocationPolicyLocationConstraints.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 @@ -447,7 +394,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LocationPolicyLocationConst if (other.hasMaxCount()) { setMaxCount(other.getMaxCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -462,19 +409,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LocationPolicyLocationConstraints 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 -1994001504: + { + maxCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -1994001504 + 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.compute.v1.LocationPolicyLocationConstraints) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -580,7 +545,18 @@ public LocationPolicyLocationConstraints parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LocationPolicyLocationConstraints(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfig.java index 981ffcad3e3c..3be748d26e7e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfig.java @@ -50,97 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LogConfig( - 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 -2001896246: - { - com.google.cloud.compute.v1.LogConfigDataAccessOptions.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = dataAccess_.toBuilder(); - } - dataAccess_ = - input.readMessage( - com.google.cloud.compute.v1.LogConfigDataAccessOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataAccess_); - dataAccess_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -992146806: - { - com.google.cloud.compute.v1.LogConfigCloudAuditOptions.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = cloudAudit_.toBuilder(); - } - cloudAudit_ = - input.readMessage( - com.google.cloud.compute.v1.LogConfigCloudAuditOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cloudAudit_); - cloudAudit_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -927289374: - { - com.google.cloud.compute.v1.LogConfigCounterOptions.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = counter_.toBuilder(); - } - counter_ = - input.readMessage( - com.google.cloud.compute.v1.LogConfigCounterOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(counter_); - counter_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LogConfig_descriptor; @@ -336,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(420959740, getCounter()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +263,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(420959740, getCounter()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -381,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDataAccess()) { if (!getDataAccess().equals(other.getDataAccess())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -404,7 +313,7 @@ public int hashCode() { hash = (37 * hash) + DATA_ACCESS_FIELD_NUMBER; hash = (53 * hash) + getDataAccess().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -682,7 +591,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LogConfig other) { if (other.hasDataAccess()) { mergeDataAccess(other.getDataAccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -697,17 +606,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LogConfig 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 -2001896246: + { + input.readMessage(getDataAccessFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -2001896246 + case -992146806: + { + input.readMessage(getCloudAuditFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -992146806 + case -927289374: + { + input.readMessage(getCounterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -927289374 + 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.compute.v1.LogConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1329,7 +1270,18 @@ public LogConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LogConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCloudAuditOptions.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCloudAuditOptions.java index 20fee37315f2..e3c98749bf73 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCloudAuditOptions.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCloudAuditOptions.java @@ -52,70 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LogConfigCloudAuditOptions( - 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 1742892994: - { - com.google.cloud.compute.v1.AuthorizationLoggingOptions.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = authorizationLoggingOptions_.toBuilder(); - } - authorizationLoggingOptions_ = - input.readMessage( - com.google.cloud.compute.v1.AuthorizationLoggingOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(authorizationLoggingOptions_); - authorizationLoggingOptions_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1071655630: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - logName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LogConfigCloudAuditOptions_descriptor; @@ -457,7 +393,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 402913958, logName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -474,7 +410,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(402913958, logName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -499,7 +435,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLogName()) { if (!getLogName().equals(other.getLogName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -518,7 +454,7 @@ public int hashCode() { hash = (37 * hash) + LOG_NAME_FIELD_NUMBER; hash = (53 * hash) + getLogName().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -774,7 +710,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LogConfigCloudAuditOptions logName_ = other.logName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -789,18 +725,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LogConfigCloudAuditOptions 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 1742892994: + { + input.readMessage( + getAuthorizationLoggingOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1742892994 + case -1071655630: + { + logName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1071655630 + 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.compute.v1.LogConfigCloudAuditOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1176,7 +1138,18 @@ public LogConfigCloudAuditOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LogConfigCloudAuditOptions(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptions.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptions.java index d8079d8ee3ff..01a830e97ec5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptions.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptions.java @@ -54,77 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LogConfigCounterOptions( - 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 779421650: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - field_ = s; - break; - } - case 1997208122: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - customFields_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.LogConfigCounterOptionsCustomField>(); - mutable_bitField0_ |= 0x00000001; - } - customFields_.add( - input.readMessage( - com.google.cloud.compute.v1.LogConfigCounterOptionsCustomField.parser(), - extensionRegistry)); - break; - } - case -30429822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - metric_ = 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)) { - customFields_ = java.util.Collections.unmodifiableList(customFields_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_LogConfigCounterOptions_descriptor; @@ -375,7 +304,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 533067184, metric_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -394,7 +323,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(533067184, metric_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -419,7 +348,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMetric()) { if (!getMetric().equals(other.getMetric())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -442,7 +371,7 @@ public int hashCode() { hash = (37 * hash) + METRIC_FIELD_NUMBER; hash = (53 * hash) + getMetric().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -571,19 +500,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.LogConfigCounterOptions.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) { - getCustomFieldsFieldBuilder(); - } } @java.lang.Override @@ -591,10 +511,11 @@ public Builder clear() { super.clear(); if (customFieldsBuilder_ == null) { customFields_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + customFields_ = null; customFieldsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); field_ = ""; bitField0_ = (bitField0_ & ~0x00000002); metric_ = ""; @@ -733,7 +654,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LogConfigCounterOptions oth metric_ = other.metric_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,18 +669,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LogConfigCounterOptions 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 779421650: + { + field_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 779421650 + case 1997208122: + { + com.google.cloud.compute.v1.LogConfigCounterOptionsCustomField m = + input.readMessage( + com.google.cloud.compute.v1.LogConfigCounterOptionsCustomField.parser(), + extensionRegistry); + if (customFieldsBuilder_ == null) { + ensureCustomFieldsIsMutable(); + customFields_.add(m); + } else { + customFieldsBuilder_.addMessage(m); + } + break; + } // case 1997208122 + case -30429822: + { + metric_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -30429822 + 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.compute.v1.LogConfigCounterOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1441,7 +1401,18 @@ public LogConfigCounterOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LogConfigCounterOptions(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptionsCustomField.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptionsCustomField.java index 3722d43c20cb..0c4f0ed2f0b8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptionsCustomField.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigCounterOptionsCustomField.java @@ -54,60 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LogConfigCounterOptionsCustomField( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 895781770: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LogConfigCounterOptionsCustomField_descriptor; @@ -272,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 111972721, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +233,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(111972721, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +257,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValue()) { if (!getValue().equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +276,7 @@ public int 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; } @@ -460,17 +406,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.LogConfigCounterOptionsCustomField.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 @@ -580,7 +519,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LogConfigCounterOptionsCust value_ = other.value_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -595,19 +534,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LogConfigCounterOptionsCustomField 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 895781770: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 895781770 + 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.compute.v1.LogConfigCounterOptionsCustomField) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -887,7 +850,18 @@ public LogConfigCounterOptionsCustomField parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LogConfigCounterOptionsCustomField(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java index f162e922cd18..edd112d94e28 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/LogConfigDataAccessOptions.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LogConfigDataAccessOptions( - 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 -1071788558: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - logMode_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_LogConfigDataAccessOptions_descriptor; @@ -358,7 +311,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 402897342, logMode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -370,7 +323,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(402897342, logMode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -390,7 +343,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLogMode()) { if (!getLogMode().equals(other.getLogMode())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -405,7 +358,7 @@ public int hashCode() { hash = (37 * hash) + LOG_MODE_FIELD_NUMBER; hash = (53 * hash) + getLogMode().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -535,17 +488,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.LogConfigDataAccessOptions.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 @@ -642,7 +588,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.LogConfigDataAccessOptions logMode_ = other.logMode_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -657,18 +603,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.LogConfigDataAccessOptions 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 -1071788558: + { + logMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1071788558 + 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.compute.v1.LogConfigDataAccessOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -832,7 +797,18 @@ public LogConfigDataAccessOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LogConfigDataAccessOptions(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineImage.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineImage.java index 48ddfd401df4..5bafeb9da809 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineImage.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineImage.java @@ -61,213 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MachineImage( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 654843744: - { - bitField0_ |= 0x00002000; - totalStorageBytes_ = input.readInt64(); - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - status_ = s; - break; - } - case 1722841322: - { - com.google.cloud.compute.v1.InstanceProperties.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = instanceProperties_.toBuilder(); - } - instanceProperties_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceProperties.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceProperties_); - instanceProperties_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case -1670925102: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00008000) != 0)) { - storageLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00008000; - } - storageLocations_.add(s); - break; - } - case -1331699310: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - sourceDiskEncryptionKeys_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - sourceDiskEncryptionKeys_.add( - input.readMessage( - com.google.cloud.compute.v1.SourceDiskEncryptionKey.parser(), - extensionRegistry)); - break; - } - case -1210560792: - { - bitField0_ |= 0x00000004; - guestFlush_ = input.readBool(); - break; - } - case -1124441654: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - sourceInstance_ = s; - break; - } - case -1115572750: - { - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - savedDisks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - savedDisks_.add( - input.readMessage( - com.google.cloud.compute.v1.SavedDisk.parser(), extensionRegistry)); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - selfLink_ = s; - break; - } - case -493402166: - { - com.google.cloud.compute.v1.SourceInstanceProperties.Builder subBuilder = null; - if (((bitField0_ & 0x00000800) != 0)) { - subBuilder = sourceInstanceProperties_.toBuilder(); - } - sourceInstanceProperties_ = - input.readMessage( - com.google.cloud.compute.v1.SourceInstanceProperties.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceInstanceProperties_); - sourceInstanceProperties_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000800; - break; - } - case -447253160: - { - bitField0_ |= 0x00000100; - satisfiesPzs_ = input.readBool(); - break; - } - case -70254598: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = machineImageEncryptionKey_.toBuilder(); - } - machineImageEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(machineImageEncryptionKey_); - machineImageEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - 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_ & 0x00008000) != 0)) { - storageLocations_ = storageLocations_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000800) != 0)) { - sourceDiskEncryptionKeys_ = - java.util.Collections.unmodifiableList(sourceDiskEncryptionKeys_); - } - if (((mutable_bitField0_ & 0x00000200) != 0)) { - savedDisks_ = java.util.Collections.unmodifiableList(savedDisks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_MachineImage_descriptor; @@ -1456,7 +1249,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(528089087, getMachineImageEncryptionKey()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1531,7 +1324,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 528089087, getMachineImageEncryptionKey()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1607,7 +1400,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTotalStorageBytes()) { if (getTotalStorageBytes() != other.getTotalStorageBytes()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1686,7 +1479,7 @@ public int hashCode() { hash = (37 * hash) + TOTAL_STORAGE_BYTES_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTotalStorageBytes()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1865,18 +1658,20 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000100); if (savedDisksBuilder_ == null) { savedDisks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); } else { + savedDisks_ = null; savedDisksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000200); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00000400); if (sourceDiskEncryptionKeysBuilder_ == null) { sourceDiskEncryptionKeys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + sourceDiskEncryptionKeys_ = null; sourceDiskEncryptionKeysBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); sourceInstance_ = ""; bitField0_ = (bitField0_ & ~0x00001000); if (sourceInstancePropertiesBuilder_ == null) { @@ -2182,7 +1977,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MachineImage other) { if (other.hasTotalStorageBytes()) { setTotalStorageBytes(other.getTotalStorageBytes()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2197,17 +1992,152 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MachineImage 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 654843744: + { + totalStorageBytes_ = input.readInt64(); + bitField0_ |= 0x00010000; + break; + } // case 654843744 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 1450082194 + case 1722841322: + { + input.readMessage( + getInstancePropertiesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 1722841322 + case -1670925102: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureStorageLocationsIsMutable(); + storageLocations_.add(s); + break; + } // case -1670925102 + case -1331699310: + { + com.google.cloud.compute.v1.SourceDiskEncryptionKey m = + input.readMessage( + com.google.cloud.compute.v1.SourceDiskEncryptionKey.parser(), + extensionRegistry); + if (sourceDiskEncryptionKeysBuilder_ == null) { + ensureSourceDiskEncryptionKeysIsMutable(); + sourceDiskEncryptionKeys_.add(m); + } else { + sourceDiskEncryptionKeysBuilder_.addMessage(m); + } + break; + } // case -1331699310 + case -1210560792: + { + guestFlush_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case -1210560792 + case -1124441654: + { + sourceInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case -1124441654 + case -1115572750: + { + com.google.cloud.compute.v1.SavedDisk m = + input.readMessage( + com.google.cloud.compute.v1.SavedDisk.parser(), extensionRegistry); + if (savedDisksBuilder_ == null) { + ensureSavedDisksIsMutable(); + savedDisks_.add(m); + } else { + savedDisksBuilder_.addMessage(m); + } + break; + } // case -1115572750 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -645248918 + case -493402166: + { + input.readMessage( + getSourceInstancePropertiesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case -493402166 + case -447253160: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case -447253160 + case -70254598: + { + input.readMessage( + getMachineImageEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case -70254598 + 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.compute.v1.MachineImage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4897,7 +4827,18 @@ public MachineImage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MachineImage(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineImageList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineImageList.java index 8c268c70223c..004fa1375c50 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineImageList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineImageList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MachineImageList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.MachineImage.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_MachineImageList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MachineImageList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MachineImageList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.MachineImage m = + input.readMessage( + com.google.cloud.compute.v1.MachineImage.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.MachineImageList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public MachineImageList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MachineImageList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineType.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineType.java index a4c94cfd3ca0..b2226091bed7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineType.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineType.java @@ -59,174 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MachineType( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - name_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 602654912: - { - bitField0_ |= 0x00000020; - imageSpaceGb_ = input.readInt32(); - break; - } - case 928009368: - { - bitField0_ |= 0x00000400; - memoryMb_ = input.readInt32(); - break; - } - case 1234195768: - { - bitField0_ |= 0x00000200; - maximumPersistentDisksSizeGb_ = input.readInt64(); - break; - } - case -2138350782: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - accelerators_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - accelerators_.add( - input.readMessage( - com.google.cloud.compute.v1.Accelerators.parser(), extensionRegistry)); - break; - } - case -1148113264: - { - bitField0_ |= 0x00000008; - guestCpus_ = input.readInt32(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - selfLink_ = s; - break; - } - case -448739446: - { - if (!((mutable_bitField0_ & 0x00002000) != 0)) { - scratchDisks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00002000; - } - scratchDisks_.add( - input.readMessage( - com.google.cloud.compute.v1.ScratchDisks.parser(), extensionRegistry)); - break; - } - case -325199768: - { - bitField0_ |= 0x00000100; - maximumPersistentDisks_ = input.readInt32(); - break; - } - case -173855334: - { - com.google.cloud.compute.v1.DeprecationStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = deprecated_.toBuilder(); - } - deprecated_ = - input.readMessage( - com.google.cloud.compute.v1.DeprecationStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deprecated_); - deprecated_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -123770856: - { - bitField0_ |= 0x00000040; - isSharedCpu_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - accelerators_ = java.util.Collections.unmodifiableList(accelerators_); - } - if (((mutable_bitField0_ & 0x00002000) != 0)) { - scratchDisks_ = java.util.Collections.unmodifiableList(scratchDisks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_MachineType_descriptor; @@ -1108,7 +940,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { output.writeBool(521399555, isSharedCpu_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1172,7 +1004,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(521399555, isSharedCpu_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1246,7 +1078,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1321,7 +1153,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1472,10 +1304,11 @@ public Builder clear() { super.clear(); if (acceleratorsBuilder_ == null) { accelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + accelerators_ = null; acceleratorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); creationTimestamp_ = ""; bitField0_ = (bitField0_ & ~0x00000002); if (deprecatedBuilder_ == null) { @@ -1506,10 +1339,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00001000); if (scratchDisksBuilder_ == null) { scratchDisks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); } else { + scratchDisks_ = null; scratchDisksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00002000); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00004000); zone_ = ""; @@ -1779,7 +1613,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MachineType other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1794,17 +1628,141 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MachineType 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 26989658 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 602654912: + { + imageSpaceGb_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 602654912 + case 928009368: + { + memoryMb_ = input.readInt32(); + bitField0_ |= 0x00000800; + break; + } // case 928009368 + case 1234195768: + { + maximumPersistentDisksSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000400; + break; + } // case 1234195768 + case -2138350782: + { + com.google.cloud.compute.v1.Accelerators m = + input.readMessage( + com.google.cloud.compute.v1.Accelerators.parser(), extensionRegistry); + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(m); + } else { + acceleratorsBuilder_.addMessage(m); + } + break; + } // case -2138350782 + case -1148113264: + { + guestCpus_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case -1148113264 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -645248918 + case -448739446: + { + com.google.cloud.compute.v1.ScratchDisks m = + input.readMessage( + com.google.cloud.compute.v1.ScratchDisks.parser(), extensionRegistry); + if (scratchDisksBuilder_ == null) { + ensureScratchDisksIsMutable(); + scratchDisks_.add(m); + } else { + scratchDisksBuilder_.addMessage(m); + } + break; + } // case -448739446 + case -325199768: + { + maximumPersistentDisks_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case -325199768 + case -173855334: + { + input.readMessage(getDeprecatedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -173855334 + case -123770856: + { + isSharedCpu_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case -123770856 + 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.compute.v1.MachineType) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3920,7 +3878,18 @@ public MachineType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MachineType(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypeAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypeAggregatedList.java index 955361e1c9ea..c4f8a09ff930 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypeAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypeAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MachineTypeAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.MachineTypesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_MachineTypeAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1158,7 +1045,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MachineTypeAggregatedList o if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1173,18 +1060,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MachineTypeAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.MachineTypesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.MachineTypeAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2235,7 +2183,18 @@ public MachineTypeAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MachineTypeAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypeList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypeList.java index 9e172ff0d2be..9950cdc73c64 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypeList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypeList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MachineTypeList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.MachineType.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_MachineTypeList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MachineTypeList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MachineTypeList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.MachineType m = + input.readMessage( + com.google.cloud.compute.v1.MachineType.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.MachineTypeList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public MachineTypeList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MachineTypeList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypesScopedList.java index 93ae116539cd..ca83495ce095 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MachineTypesScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MachineTypesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 637760522: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - machineTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - machineTypes_.add( - input.readMessage( - com.google.cloud.compute.v1.MachineType.parser(), extensionRegistry)); - 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)) { - machineTypes_ = java.util.Collections.unmodifiableList(machineTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_MachineTypesScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < machineTypes_.size(); i++) { output.writeMessage(79720065, machineTypes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(79720065, machineTypes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (machineTypesBuilder_ == null) { machineTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + machineTypes_ = null; machineTypesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MachineTypesScopedList othe if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,18 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MachineTypesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 637760522: + { + com.google.cloud.compute.v1.MachineType m = + input.readMessage( + com.google.cloud.compute.v1.MachineType.parser(), extensionRegistry); + if (machineTypesBuilder_ == null) { + ensureMachineTypesIsMutable(); + machineTypes_.add(m); + } else { + machineTypesBuilder_.addMessage(m); + } + break; + } // case 637760522 + 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.compute.v1.MachineTypesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1215,7 +1178,18 @@ public MachineTypesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MachineTypesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstance.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstance.java index 38fe4edd4477..7654a6ad5337 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstance.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstance.java @@ -55,156 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ManagedInstance( - 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 26840: - { - bitField0_ |= 0x00000002; - id_ = input.readUInt64(); - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - instance_ = s; - break; - } - case 789294866: - { - com.google.cloud.compute.v1.PreservedState.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = preservedStateFromConfig_.toBuilder(); - } - preservedStateFromConfig_ = - input.readMessage( - com.google.cloud.compute.v1.PreservedState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(preservedStateFromConfig_); - preservedStateFromConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 1396618978: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - instanceStatus_ = s; - break; - } - case 1427807714: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - currentAction_ = s; - break; - } - case -1482103102: - { - com.google.cloud.compute.v1.ManagedInstanceVersion.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = version_.toBuilder(); - } - version_ = - input.readMessage( - com.google.cloud.compute.v1.ManagedInstanceVersion.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(version_); - version_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case -1233630670: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - instanceHealth_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.ManagedInstanceInstanceHealth>(); - mutable_bitField0_ |= 0x00000008; - } - instanceHealth_.add( - input.readMessage( - com.google.cloud.compute.v1.ManagedInstanceInstanceHealth.parser(), - extensionRegistry)); - break; - } - case -816795358: - { - com.google.cloud.compute.v1.ManagedInstanceLastAttempt.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = lastAttempt_.toBuilder(); - } - lastAttempt_ = - input.readMessage( - com.google.cloud.compute.v1.ManagedInstanceLastAttempt.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastAttempt_); - lastAttempt_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case -528695662: - { - com.google.cloud.compute.v1.PreservedState.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = preservedStateFromPolicy_.toBuilder(); - } - preservedStateFromPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.PreservedState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(preservedStateFromPolicy_); - preservedStateFromPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - 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_ & 0x00000008) != 0)) { - instanceHealth_ = java.util.Collections.unmodifiableList(instanceHealth_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ManagedInstance_descriptor; @@ -1448,7 +1298,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { output.writeMessage(470783954, getPreservedStateFromPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1490,7 +1340,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 470783954, getPreservedStateFromPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1539,7 +1389,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVersion()) { if (!getVersion().equals(other.getVersion())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1586,7 +1436,7 @@ public int hashCode() { hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1745,10 +1595,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (instanceHealthBuilder_ == null) { instanceHealth_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + instanceHealth_ = null; instanceHealthBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); instanceStatus_ = ""; bitField0_ = (bitField0_ & ~0x00000010); if (lastAttemptBuilder_ == null) { @@ -1968,7 +1819,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ManagedInstance other) { if (other.hasVersion()) { mergeVersion(other.getVersion()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1983,17 +1834,95 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ManagedInstance 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 26840 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 146056362 + case 789294866: + { + input.readMessage( + getPreservedStateFromConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 789294866 + case 1396618978: + { + instanceStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1396618978 + case 1427807714: + { + currentAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1427807714 + case -1482103102: + { + input.readMessage(getVersionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case -1482103102 + case -1233630670: + { + com.google.cloud.compute.v1.ManagedInstanceInstanceHealth m = + input.readMessage( + com.google.cloud.compute.v1.ManagedInstanceInstanceHealth.parser(), + extensionRegistry); + if (instanceHealthBuilder_ == null) { + ensureInstanceHealthIsMutable(); + instanceHealth_.add(m); + } else { + instanceHealthBuilder_.addMessage(m); + } + break; + } // case -1233630670 + case -816795358: + { + input.readMessage(getLastAttemptFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case -816795358 + case -528695662: + { + input.readMessage( + getPreservedStateFromPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case -528695662 + 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.compute.v1.ManagedInstance) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3676,7 +3605,18 @@ public ManagedInstance parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ManagedInstance(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceInstanceHealth.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceInstanceHealth.java index 3fcfa4cea30d..a3d1de065d10 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceInstanceHealth.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceInstanceHealth.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ManagedInstanceInstanceHealth( - 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 -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - healthCheck_ = s; - break; - } - case -211205910: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - detailedHealthState_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ManagedInstanceInstanceHealth_descriptor; @@ -501,7 +447,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 510470173, detailedHealthState_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -517,7 +463,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(510470173, detailedHealthState_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -541,7 +487,7 @@ public boolean equals(final java.lang.Object obj) { if (hasHealthCheck()) { if (!getHealthCheck().equals(other.getHealthCheck())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -560,7 +506,7 @@ public int hashCode() { hash = (37 * hash) + HEALTH_CHECK_FIELD_NUMBER; hash = (53 * hash) + getHealthCheck().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -689,17 +635,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ManagedInstanceInstanceHealth.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 @@ -807,7 +746,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ManagedInstanceInstanceHeal healthCheck_ = other.healthCheck_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -822,18 +761,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ManagedInstanceInstanceHealth 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 -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1823954134 + case -211205910: + { + detailedHealthState_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -211205910 + 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.compute.v1.ManagedInstanceInstanceHealth) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1117,7 +1081,18 @@ public ManagedInstanceInstanceHealth parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ManagedInstanceInstanceHealth(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceLastAttempt.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceLastAttempt.java index b3e57598fab4..bbcfc84810ec 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceLastAttempt.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceLastAttempt.java @@ -49,61 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ManagedInstanceLastAttempt( - 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 -1767146662: - { - com.google.cloud.compute.v1.Errors.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = errors_.toBuilder(); - } - errors_ = - input.readMessage(com.google.cloud.compute.v1.Errors.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errors_); - errors_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ManagedInstanceLastAttempt_descriptor; @@ -183,7 +128,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(315977579, getErrors()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +140,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(315977579, getErrors()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -215,7 +160,7 @@ public boolean equals(final java.lang.Object obj) { if (hasErrors()) { if (!getErrors().equals(other.getErrors())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -230,7 +175,7 @@ public int hashCode() { hash = (37 * hash) + ERRORS_FIELD_NUMBER; hash = (53 * hash) + getErrors().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -474,7 +419,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ManagedInstanceLastAttempt if (other.hasErrors()) { mergeErrors(other.getErrors()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -489,18 +434,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ManagedInstanceLastAttempt 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 -1767146662: + { + input.readMessage(getErrorsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -1767146662 + 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.compute.v1.ManagedInstanceLastAttempt) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -720,7 +684,18 @@ public ManagedInstanceLastAttempt parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ManagedInstanceLastAttempt(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceVersion.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceVersion.java index db781bffac5c..abed14a5d841 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceVersion.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ManagedInstanceVersion.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ManagedInstanceVersion( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - name_ = s; - break; - } - case -1820981470: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - instanceTemplate_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ManagedInstanceVersion_descriptor; @@ -270,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 309248228, instanceTemplate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(309248228, instanceTemplate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (hasName()) { if (!getName().equals(other.getName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +275,7 @@ public int 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; } @@ -457,17 +403,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ManagedInstanceVersion.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 @@ -575,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ManagedInstanceVersion othe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,18 +529,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ManagedInstanceVersion 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26989658 + case -1820981470: + { + instanceTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1820981470 + 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.compute.v1.ManagedInstanceVersion) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -879,7 +843,18 @@ public ManagedInstanceVersion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ManagedInstanceVersion(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Metadata.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Metadata.java index d91ced733a87..f375ae49fbbf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Metadata.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Metadata.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Metadata( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage(com.google.cloud.compute.v1.Items.parser(), extensionRegistry)); - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - fingerprint_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Metadata_descriptor; @@ -357,7 +290,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 234678500, fingerprint_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -375,7 +308,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(234678500, fingerprint_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -399,7 +332,7 @@ public boolean equals(final java.lang.Object obj) { if (hasKind()) { if (!getKind().equals(other.getKind())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -422,7 +355,7 @@ public int hashCode() { hash = (37 * hash) + KIND_FIELD_NUMBER; hash = (53 * hash) + getKind().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -550,19 +483,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Metadata.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) { - getItemsFieldBuilder(); - } } @java.lang.Override @@ -572,10 +496,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); return this; @@ -710,7 +635,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Metadata other) { kind_ = other.kind_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,17 +650,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Metadata 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 804208130: + { + com.google.cloud.compute.v1.Items m = + input.readMessage( + com.google.cloud.compute.v1.Items.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1877428002 + 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.compute.v1.Metadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1359,7 +1323,18 @@ public Metadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Metadata(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MetadataFilter.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MetadataFilter.java index 94690d6319dc..74027c91b1df 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MetadataFilter.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MetadataFilter.java @@ -53,69 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MetadataFilter( - 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 1919762946: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - filterMatchCriteria_ = s; - break; - } - case -1831742158: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - filterLabels_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - filterLabels_.add( - input.readMessage( - com.google.cloud.compute.v1.MetadataFilterLabelMatch.parser(), - extensionRegistry)); - 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)) { - filterLabels_ = java.util.Collections.unmodifiableList(filterLabels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_MetadataFilter_descriptor; @@ -477,7 +414,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < filterLabels_.size(); i++) { output.writeMessage(307903142, filterLabels_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -494,7 +431,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(307903142, filterLabels_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -515,7 +452,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFilterMatchCriteria()) { if (!getFilterMatchCriteria().equals(other.getFilterMatchCriteria())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -534,7 +471,7 @@ public int hashCode() { hash = (37 * hash) + FILTER_MATCH_CRITERIA_FIELD_NUMBER; hash = (53 * hash) + getFilterMatchCriteria().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -663,19 +600,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.MetadataFilter.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) { - getFilterLabelsFieldBuilder(); - } } @java.lang.Override @@ -683,10 +611,11 @@ public Builder clear() { super.clear(); if (filterLabelsBuilder_ == null) { filterLabels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + filterLabels_ = null; filterLabelsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); filterMatchCriteria_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -813,7 +742,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MetadataFilter other) { filterMatchCriteria_ = other.filterMatchCriteria_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -828,17 +757,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MetadataFilter 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 1919762946: + { + filterMatchCriteria_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1919762946 + case -1831742158: + { + com.google.cloud.compute.v1.MetadataFilterLabelMatch m = + input.readMessage( + com.google.cloud.compute.v1.MetadataFilterLabelMatch.parser(), + extensionRegistry); + if (filterLabelsBuilder_ == null) { + ensureFilterLabelsIsMutable(); + filterLabels_.add(m); + } else { + filterLabelsBuilder_.addMessage(m); + } + break; + } // case -1831742158 + 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.compute.v1.MetadataFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1379,7 +1342,18 @@ public MetadataFilter parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MetadataFilter(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MetadataFilterLabelMatch.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MetadataFilterLabelMatch.java index d21b1b600ef9..e32b3160c08a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MetadataFilterLabelMatch.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MetadataFilterLabelMatch.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MetadataFilterLabelMatch( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 895781770: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_MetadataFilterLabelMatch_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 111972721, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(111972721, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValue()) { if (!getValue().equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +275,7 @@ public int 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; } @@ -458,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.MetadataFilterLabelMatch.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 @@ -576,7 +515,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MetadataFilterLabelMatch ot value_ = other.value_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -591,18 +530,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MetadataFilterLabelMatch 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 895781770: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 895781770 + 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.compute.v1.MetadataFilterLabelMatch) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -880,7 +844,18 @@ public MetadataFilterLabelMatch parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MetadataFilterLabelMatch(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveDiskProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveDiskProjectRequest.java index ae5d34bc8181..10e99446b9b3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveDiskProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveDiskProjectRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MoveDiskProjectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1790899630: - { - com.google.cloud.compute.v1.DiskMoveRequest.Builder subBuilder = null; - if (diskMoveRequestResource_ != null) { - subBuilder = diskMoveRequestResource_.toBuilder(); - } - diskMoveRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.DiskMoveRequest.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diskMoveRequestResource_); - diskMoveRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_MoveDiskProjectRequest_descriptor; @@ -334,7 +264,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (diskMoveRequestResource_ != null) { output.writeMessage(313008458, getDiskMoveRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +284,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 313008458, getDiskMoveRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -379,7 +309,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -400,7 +330,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -529,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.MoveDiskProjectRequest.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 @@ -657,7 +580,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MoveDiskProjectRequest othe requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -672,18 +595,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MoveDiskProjectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1790899630: + { + input.readMessage( + getDiskMoveRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1790899630 + 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.compute.v1.MoveDiskProjectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1162,7 +1117,18 @@ public MoveDiskProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MoveDiskProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveFirewallPolicyRequest.java index 1ea26e519192..c210b8fc89c0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveFirewallPolicyRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MoveFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case -617249150: - { - java.lang.String s = input.readStringRequireUtf8(); - - parentId_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_MoveFirewallPolicyRequest_descriptor; @@ -320,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +277,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +318,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.MoveFirewallPolicyRequest.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 @@ -630,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MoveFirewallPolicyRequest o requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MoveFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case -617249150: + { + parentId_ = input.readStringRequireUtf8(); + + break; + } // case -617249150 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.MoveFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1036,7 +999,18 @@ public MoveFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MoveFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveInstanceProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveInstanceProjectRequest.java index 785aff30d67f..aeb2479e1ec5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveInstanceProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/MoveInstanceProjectRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MoveInstanceProjectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1801653742: - { - com.google.cloud.compute.v1.InstanceMoveRequest.Builder subBuilder = null; - if (instanceMoveRequestResource_ != null) { - subBuilder = instanceMoveRequestResource_.toBuilder(); - } - instanceMoveRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceMoveRequest.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceMoveRequestResource_); - instanceMoveRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_MoveInstanceProjectRequest_descriptor; @@ -334,7 +264,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceMoveRequestResource_ != null) { output.writeMessage(311664194, getInstanceMoveRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +284,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 311664194, getInstanceMoveRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -380,7 +310,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -401,7 +331,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -531,17 +461,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.MoveInstanceProjectRequest.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 @@ -659,7 +582,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.MoveInstanceProjectRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -674,18 +597,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.MoveInstanceProjectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1801653742: + { + input.readMessage( + getInstanceMoveRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1801653742 + 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.compute.v1.MoveInstanceProjectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1168,7 +1123,18 @@ public MoveInstanceProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MoveInstanceProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NamedPort.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NamedPort.java index adcad3857f36..7c22b2db498f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NamedPort.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NamedPort.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NamedPort( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 27575304: - { - bitField0_ |= 0x00000002; - port_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NamedPort_descriptor; @@ -238,7 +185,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(3446913, port_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -253,7 +200,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3446913, port_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -276,7 +223,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPort()) { if (getPort() != other.getPort()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (37 * hash) + PORT_FIELD_NUMBER; hash = (53 * hash) + getPort(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -423,17 +370,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NamedPort.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 @@ -538,7 +478,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NamedPort other) { if (other.hasPort()) { setPort(other.getPort()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -553,17 +493,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NamedPort 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 27575304 + 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.compute.v1.NamedPort) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -788,7 +754,18 @@ public NamedPort parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NamedPort(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Network.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Network.java index 54f255540290..414559df49f2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Network.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Network.java @@ -64,190 +64,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Network( - 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 26840: - { - bitField0_ |= 0x00000080; - id_ = input.readUInt64(); - break; - } - case 867696: - { - bitField0_ |= 0x00000400; - mtu_ = input.readInt32(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - name_ = s; - break; - } - case 52038274: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - networkFirewallPolicyEnforcementOrder_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - creationTimestamp_ = s; - break; - } - case 356167698: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - selfLinkWithId_ = s; - break; - } - case 473874866: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - iPv4Range_ = s; - break; - } - case 559065498: - { - if (!((mutable_bitField0_ & 0x00002000) != 0)) { - peerings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00002000; - } - peerings_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkPeering.parser(), extensionRegistry)); - break; - } - case 1429431018: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - gatewayIPv4_ = s; - break; - } - case 2049253520: - { - bitField0_ |= 0x00000002; - autoCreateSubnetworks_ = input.readBool(); - break; - } - case -2075312838: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - internalIpv6Range_ = s; - break; - } - case -968142294: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00020000) != 0)) { - subnetworks_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00020000; - } - subnetworks_.add(s); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - description_ = s; - break; - } - case -904905536: - { - bitField0_ |= 0x00000010; - enableUlaInternalIpv6_ = input.readBool(); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - selfLink_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - firewallPolicy_ = s; - break; - } - case -106518822: - { - com.google.cloud.compute.v1.NetworkRoutingConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00002000) != 0)) { - subBuilder = routingConfig_.toBuilder(); - } - routingConfig_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkRoutingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(routingConfig_); - routingConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00002000; - 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_ & 0x00002000) != 0)) { - peerings_ = java.util.Collections.unmodifiableList(peerings_); - } - if (((mutable_bitField0_ & 0x00020000) != 0)) { - subnetworks_ = subnetworks_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Network_descriptor; @@ -1482,7 +1298,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00002000) != 0)) { output.writeMessage(523556059, getRoutingConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1557,7 +1373,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(523556059, getRoutingConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1640,7 +1456,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSelfLinkWithId().equals(other.getSelfLinkWithId())) return false; } if (!getSubnetworksList().equals(other.getSubnetworksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1723,7 +1539,7 @@ public int hashCode() { hash = (37 * hash) + SUBNETWORKS_FIELD_NUMBER; hash = (53 * hash) + getSubnetworksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1898,10 +1714,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00001000); if (peeringsBuilder_ == null) { peerings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); } else { + peerings_ = null; peeringsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00002000); if (routingConfigBuilder_ == null) { routingConfig_ = null; } else { @@ -2181,7 +1998,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Network other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2196,17 +2013,147 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Network 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 26840 + case 867696: + { + mtu_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 867696 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 26989658 + case 52038274: + { + networkFirewallPolicyEnforcementOrder_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 52038274 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 244202930 + case 356167698: + { + selfLinkWithId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 356167698 + case 473874866: + { + iPv4Range_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 473874866 + case 559065498: + { + com.google.cloud.compute.v1.NetworkPeering m = + input.readMessage( + com.google.cloud.compute.v1.NetworkPeering.parser(), extensionRegistry); + if (peeringsBuilder_ == null) { + ensurePeeringsIsMutable(); + peerings_.add(m); + } else { + peeringsBuilder_.addMessage(m); + } + break; + } // case 559065498 + case 1429431018: + { + gatewayIPv4_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1429431018 + case 2049253520: + { + autoCreateSubnetworks_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 2049253520 + case -2075312838: + { + internalIpv6Range_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -2075312838 + case -968142294: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSubnetworksIsMutable(); + subnetworks_.add(s); + break; + } // case -968142294 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -904905536: + { + enableUlaInternalIpv6_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -904905536 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case -645248918 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -309581174 + case -106518822: + { + input.readMessage(getRoutingConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case -106518822 + 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.compute.v1.Network) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4554,7 +4501,18 @@ public Network parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Network(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityService.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityService.java index 419ce8342717..2c8e0390c059 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityService.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityService.java @@ -60,115 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEdgeSecurityService( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 356167698: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - selfLinkWithId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - region_ = s; - break; - } - case 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - securityPolicy_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - fingerprint_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEdgeSecurityService_descriptor; @@ -838,7 +729,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -878,7 +769,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -934,7 +825,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSelfLinkWithId()) { if (!getSelfLinkWithId().equals(other.getSelfLinkWithId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -985,7 +876,7 @@ public int hashCode() { hash = (37 * hash) + SELF_LINK_WITH_ID_FIELD_NUMBER; hash = (53 * hash) + getSelfLinkWithId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1115,17 +1006,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NetworkEdgeSecurityService.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 @@ -1319,7 +1203,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkEdgeSecurityService selfLinkWithId_ = other.selfLinkWithId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1334,18 +1218,91 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEdgeSecurityService 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 356167698: + { + selfLinkWithId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 356167698 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1111570338 + case 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1368660106 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1877428002 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -645248918 + 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.compute.v1.NetworkEdgeSecurityService) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2530,7 +2487,18 @@ public NetworkEdgeSecurityService parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEdgeSecurityService(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityServiceAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityServiceAggregatedList.java index 77aa8fbd0791..9279b83b0886 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityServiceAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityServiceAggregatedList.java @@ -58,127 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEdgeSecurityServiceAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - id_ = s; - break; - } - case 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.compute.v1.NetworkEdgeSecurityServicesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - selfLink_ = 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_ & 0x00000040) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEdgeSecurityServiceAggregatedList_descriptor; @@ -780,7 +659,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -828,7 +707,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -870,7 +749,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -913,7 +792,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1260,7 +1139,7 @@ public Builder mergeFrom( if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1275,19 +1154,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEdgeSecurityServiceAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26842 + case 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24987818 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.compute.v1.NetworkEdgeSecurityServicesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -645248918 + 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.compute.v1.NetworkEdgeSecurityServiceAggregatedList) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2439,7 +2385,18 @@ public NetworkEdgeSecurityServiceAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEdgeSecurityServiceAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityServicesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityServicesScopedList.java index 16f33dff5b43..c972d3ab3d77 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityServicesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEdgeSecurityServicesScopedList.java @@ -53,80 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEdgeSecurityServicesScopedList( - 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 284241250: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - networkEdgeSecurityServices_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.NetworkEdgeSecurityService>(); - mutable_bitField0_ |= 0x00000001; - } - networkEdgeSecurityServices_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkEdgeSecurityService.parser(), - extensionRegistry)); - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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)) { - networkEdgeSecurityServices_ = - java.util.Collections.unmodifiableList(networkEdgeSecurityServices_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEdgeSecurityServicesScopedList_descriptor; @@ -292,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(50704284, getWarning()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -309,7 +235,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(50704284, getWarning()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -331,7 +257,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -350,7 +276,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -502,10 +428,11 @@ public Builder clear() { super.clear(); if (networkEdgeSecurityServicesBuilder_ == null) { networkEdgeSecurityServices_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + networkEdgeSecurityServices_ = null; networkEdgeSecurityServicesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -643,7 +570,7 @@ public Builder mergeFrom( if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -658,19 +585,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEdgeSecurityServicesScopedList 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 284241250: + { + com.google.cloud.compute.v1.NetworkEdgeSecurityService m = + input.readMessage( + com.google.cloud.compute.v1.NetworkEdgeSecurityService.parser(), + extensionRegistry); + if (networkEdgeSecurityServicesBuilder_ == null) { + ensureNetworkEdgeSecurityServicesIsMutable(); + networkEdgeSecurityServices_.add(m); + } else { + networkEdgeSecurityServicesBuilder_.addMessage(m); + } + break; + } // case 284241250 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + 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.compute.v1.NetworkEdgeSecurityServicesScopedList) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1299,7 +1258,18 @@ public NetworkEdgeSecurityServicesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEdgeSecurityServicesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java index cee06b6b2b77..799d40c3e2e0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpoint.java @@ -54,88 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpoint( - 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 25203882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - fqdn_ = s; - break; - } - case 27575304: - { - bitField0_ |= 0x00000008; - port_ = input.readInt32(); - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - instance_ = s; - break; - } - case 896260386: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case -1044789534: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - ipAddress_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpoint_descriptor; @@ -516,7 +434,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 406272220, ipAddress_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -547,7 +465,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(406272220, ipAddress_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -580,7 +498,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPort()) { if (getPort() != other.getPort()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -611,7 +529,7 @@ public int hashCode() { hash = (37 * hash) + PORT_FIELD_NUMBER; hash = (53 * hash) + getPort(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -760,17 +678,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.NetworkEndpoint.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 @@ -901,7 +812,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkEndpoint other) { if (other.hasPort()) { setPort(other.getPort()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -916,17 +827,66 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpoint 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 25203882: + { + fqdn_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 25203882 + case 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 27575304 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 146056362 + case 896260386: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 896260386 + case -1044789534: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -1044789534 + 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.compute.v1.NetworkEndpoint) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1552,7 +1512,18 @@ public NetworkEndpoint parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpoint(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java index 0840c3b338db..c932753ebcc5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroup.java @@ -62,208 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroup( - 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 26840: - { - bitField0_ |= 0x00000040; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - name_ = s; - break; - } - case 28246024: - { - bitField0_ |= 0x00004000; - size_ = input.readInt32(); - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - creationTimestamp_ = s; - break; - } - case 888482826: - { - com.google.cloud.compute.v1.NetworkEndpointGroupCloudRun.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = cloudRun_.toBuilder(); - } - cloudRun_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroupCloudRun.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cloudRun_); - cloudRun_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 896260386: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case 946412186: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - networkEndpointType_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - region_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - network_ = s; - break; - } - case -2141910222: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - pscTargetService_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - subnetwork_ = s; - break; - } - case -1568657150: - { - com.google.cloud.compute.v1.NetworkEndpointGroupAppEngine.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = appEngine_.toBuilder(); - } - appEngine_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroupAppEngine.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(appEngine_); - appEngine_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - description_ = s; - break; - } - case -907944456: - { - bitField0_ |= 0x00000010; - defaultPort_ = input.readInt32(); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - selfLink_ = s; - break; - } - case -135817966: - { - com.google.cloud.compute.v1.NetworkEndpointGroupCloudFunction.Builder subBuilder = - null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = cloudFunction_.toBuilder(); - } - cloudFunction_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroupCloudFunction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(cloudFunction_); - cloudFunction_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroup_descriptor; @@ -1698,7 +1496,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(519893666, getCloudFunction()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1772,7 +1570,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(519893666, getCloudFunction()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1857,7 +1655,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1940,7 +1738,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2392,7 +2190,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkEndpointGroup other) zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2407,17 +2205,144 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroup 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26989658 + case 28246024: + { + size_ = input.readInt32(); + bitField0_ |= 0x00008000; + break; + } // case 28246024 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 244202930 + case 888482826: + { + input.readMessage(getCloudRunFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 888482826 + case 896260386: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 896260386 + case 946412186: + { + networkEndpointType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 946412186 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 1111570338 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1862979954 + case -2141910222: + { + pscTargetService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case -2141910222 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case -1832345742 + case -1568657150: + { + input.readMessage(getAppEngineFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1568657150 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -911466526 + case -907944456: + { + defaultPort_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case -907944456 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -645248918 + case -135817966: + { + input.readMessage(getCloudFunctionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -135817966 + 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.compute.v1.NetworkEndpointGroup) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4751,7 +4676,18 @@ public NetworkEndpointGroup parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroup(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAggregatedList.java index 636d78eb5ff8..a8d13e3cc167 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAggregatedList.java @@ -56,119 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroupAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.NetworkEndpointGroupsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroupAggregatedList_descriptor; @@ -718,7 +605,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -763,7 +650,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -801,7 +688,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -840,7 +727,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1171,7 +1058,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkEndpointGroupAggrega if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1186,19 +1073,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroupAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.compute.v1.NetworkEndpointGroupsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NetworkEndpointGroupAggregatedList) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2262,7 +2210,18 @@ public NetworkEndpointGroupAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroupAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAppEngine.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAppEngine.java index 36c7dcfbc20e..010bb255a1d5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAppEngine.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupAppEngine.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroupAppEngine( - 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 826818018: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - urlMask_ = s; - break; - } - case -1482103102: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - version_ = s; - break; - } - case -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - service_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroupAppEngine_descriptor; @@ -346,7 +285,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 373540533, service_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -364,7 +303,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(373540533, service_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +331,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVersion()) { if (!getVersion().equals(other.getVersion())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -415,7 +354,7 @@ public int hashCode() { hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -545,17 +484,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NetworkEndpointGroupAppEngine.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 @@ -674,7 +606,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkEndpointGroupAppEngi version_ = other.version_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -689,18 +621,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroupAppEngine 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 826818018: + { + urlMask_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 826818018 + case -1482103102: + { + version_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1482103102 + case -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1306643030 + 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.compute.v1.NetworkEndpointGroupAppEngine) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1098,7 +1061,18 @@ public NetworkEndpointGroupAppEngine parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroupAppEngine(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupCloudFunction.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupCloudFunction.java index 87ecd239a4c1..fb3fdf0f71f0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupCloudFunction.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupCloudFunction.java @@ -54,60 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroupCloudFunction( - 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 826818018: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - urlMask_ = s; - break; - } - case -1837392190: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - function_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroupCloudFunction_descriptor; @@ -272,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 307196888, function_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +233,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(307196888, function_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +257,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMask()) { if (!getUrlMask().equals(other.getUrlMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +276,7 @@ public int hashCode() { hash = (37 * hash) + URL_MASK_FIELD_NUMBER; hash = (53 * hash) + getUrlMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -460,17 +406,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NetworkEndpointGroupCloudFunction.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 @@ -580,7 +519,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkEndpointGroupCloudFu urlMask_ = other.urlMask_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -595,19 +534,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroupCloudFunction 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 826818018: + { + urlMask_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 826818018 + case -1837392190: + { + function_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1837392190 + 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.compute.v1.NetworkEndpointGroupCloudFunction) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -886,7 +849,18 @@ public NetworkEndpointGroupCloudFunction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroupCloudFunction(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupCloudRun.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupCloudRun.java index 641cb8b2edf2..a68c7354a6be 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupCloudRun.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupCloudRun.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroupCloudRun( - 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 916690: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - tag_ = s; - break; - } - case 826818018: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - urlMask_ = s; - break; - } - case -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - service_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroupCloudRun_descriptor; @@ -346,7 +285,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 373540533, service_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -364,7 +303,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(373540533, service_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +331,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMask()) { if (!getUrlMask().equals(other.getUrlMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -415,7 +354,7 @@ public int hashCode() { hash = (37 * hash) + URL_MASK_FIELD_NUMBER; hash = (53 * hash) + getUrlMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -545,17 +484,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NetworkEndpointGroupCloudRun.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 @@ -674,7 +606,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkEndpointGroupCloudRu urlMask_ = other.urlMask_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -689,18 +621,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroupCloudRun 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 916690: + { + tag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 916690 + case 826818018: + { + urlMask_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 826818018 + case -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1306643030 + 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.compute.v1.NetworkEndpointGroupCloudRun) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1098,7 +1061,18 @@ public NetworkEndpointGroupCloudRun parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroupCloudRun(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupList.java index a642a6f83ef4..3027f2f85e8c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupList.java @@ -55,106 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroupList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroup.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroupList_descriptor; @@ -574,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -601,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -638,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -673,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkEndpointGroupList ot if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,18 +919,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroupList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.NetworkEndpointGroup m = + input.readMessage( + com.google.cloud.compute.v1.NetworkEndpointGroup.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NetworkEndpointGroupList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2083,7 +2041,18 @@ public NetworkEndpointGroupList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroupList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsAttachEndpointsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsAttachEndpointsRequest.java index 296d8bd55c2c..3547b48b8e05 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsAttachEndpointsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsAttachEndpointsRequest.java @@ -53,61 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroupsAttachEndpointsRequest( - 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 1198802282: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - networkEndpoints_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - networkEndpoints_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpoint.parser(), extensionRegistry)); - 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)) { - networkEndpoints_ = java.util.Collections.unmodifiableList(networkEndpoints_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroupsAttachEndpointsRequest_descriptor; @@ -210,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < networkEndpoints_.size(); i++) { output.writeMessage(149850285, networkEndpoints_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -224,7 +169,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 149850285, networkEndpoints_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -241,7 +186,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequest) obj; if (!getNetworkEndpointsList().equals(other.getNetworkEndpointsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -256,7 +201,7 @@ public int hashCode() { hash = (37 * hash) + NETWORK_ENDPOINTS_FIELD_NUMBER; hash = (53 * hash) + getNetworkEndpointsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -388,19 +333,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequest.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) { - getNetworkEndpointsFieldBuilder(); - } } @java.lang.Override @@ -408,10 +344,11 @@ public Builder clear() { super.clear(); if (networkEndpointsBuilder_ == null) { networkEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + networkEndpoints_ = null; networkEndpointsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -533,7 +470,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -548,19 +485,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroupsAttachEndpointsRequest 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 1198802282: + { + com.google.cloud.compute.v1.NetworkEndpoint m = + input.readMessage( + com.google.cloud.compute.v1.NetworkEndpoint.parser(), extensionRegistry); + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(m); + } else { + networkEndpointsBuilder_.addMessage(m); + } + break; + } // case 1198802282 + 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.compute.v1.NetworkEndpointGroupsAttachEndpointsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -961,7 +923,19 @@ public NetworkEndpointGroupsAttachEndpointsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroupsAttachEndpointsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsDetachEndpointsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsDetachEndpointsRequest.java index d9cdb75126c3..2e6a2b952271 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsDetachEndpointsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsDetachEndpointsRequest.java @@ -53,61 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroupsDetachEndpointsRequest( - 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 1198802282: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - networkEndpoints_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - networkEndpoints_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpoint.parser(), extensionRegistry)); - 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)) { - networkEndpoints_ = java.util.Collections.unmodifiableList(networkEndpoints_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroupsDetachEndpointsRequest_descriptor; @@ -210,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < networkEndpoints_.size(); i++) { output.writeMessage(149850285, networkEndpoints_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -224,7 +169,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 149850285, networkEndpoints_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -241,7 +186,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequest) obj; if (!getNetworkEndpointsList().equals(other.getNetworkEndpointsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -256,7 +201,7 @@ public int hashCode() { hash = (37 * hash) + NETWORK_ENDPOINTS_FIELD_NUMBER; hash = (53 * hash) + getNetworkEndpointsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -388,19 +333,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequest.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) { - getNetworkEndpointsFieldBuilder(); - } } @java.lang.Override @@ -408,10 +344,11 @@ public Builder clear() { super.clear(); if (networkEndpointsBuilder_ == null) { networkEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + networkEndpoints_ = null; networkEndpointsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -533,7 +470,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -548,19 +485,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroupsDetachEndpointsRequest 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 1198802282: + { + com.google.cloud.compute.v1.NetworkEndpoint m = + input.readMessage( + com.google.cloud.compute.v1.NetworkEndpoint.parser(), extensionRegistry); + if (networkEndpointsBuilder_ == null) { + ensureNetworkEndpointsIsMutable(); + networkEndpoints_.add(m); + } else { + networkEndpointsBuilder_.addMessage(m); + } + break; + } // case 1198802282 + 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.compute.v1.NetworkEndpointGroupsDetachEndpointsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -961,7 +923,19 @@ public NetworkEndpointGroupsDetachEndpointsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroupsDetachEndpointsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListEndpointsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListEndpointsRequest.java index 55177d07fb5a..0739230d07eb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListEndpointsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListEndpointsRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroupsListEndpointsRequest( - 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 -1250600534: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - healthStatus_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroupsListEndpointsRequest_descriptor; @@ -360,7 +313,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 380545845, healthStatus_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -372,7 +325,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(380545845, healthStatus_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { if (hasHealthStatus()) { if (!getHealthStatus().equals(other.getHealthStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -407,7 +360,7 @@ public int hashCode() { hash = (37 * hash) + HEALTH_STATUS_FIELD_NUMBER; hash = (53 * hash) + getHealthStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -538,17 +491,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.NetworkEndpointGroupsListEndpointsRequest.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 @@ -650,7 +596,7 @@ public Builder mergeFrom( healthStatus_ = other.healthStatus_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -665,19 +611,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroupsListEndpointsRequest 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 -1250600534: + { + healthStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1250600534 + 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.compute.v1.NetworkEndpointGroupsListEndpointsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -844,7 +808,19 @@ public NetworkEndpointGroupsListEndpointsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroupsListEndpointsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListNetworkEndpoints.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListNetworkEndpoints.java index c5840bb4b278..71bb9447f98a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListNetworkEndpoints.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsListNetworkEndpoints.java @@ -56,100 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroupsListNetworkEndpoints( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus>(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus.parser(), - extensionRegistry)); - 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroupsListNetworkEndpoints_descriptor; @@ -510,7 +416,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < items_.size(); i++) { output.writeMessage(100526016, items_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -534,7 +440,7 @@ public int getSerializedSize() { for (int i = 0; i < items_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(100526016, items_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -567,7 +473,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -598,7 +504,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -752,10 +658,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -925,7 +832,7 @@ public Builder mergeFrom( if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -940,19 +847,69 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroupsListNetworkEndpoints 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus m = + input.readMessage( + com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + 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.compute.v1.NetworkEndpointGroupsListNetworkEndpoints) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1922,7 +1879,19 @@ public NetworkEndpointGroupsListNetworkEndpoints parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroupsListNetworkEndpoints(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsScopedList.java index 1fd6ab7eb92f..192548ca6bd4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointGroupsScopedList.java @@ -52,78 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointGroupsScopedList( - 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 234773866: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - networkEndpointGroups_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - networkEndpointGroups_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpointGroup.parser(), - extensionRegistry)); - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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)) { - networkEndpointGroups_ = java.util.Collections.unmodifiableList(networkEndpointGroups_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointGroupsScopedList_descriptor; @@ -287,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(50704284, getWarning()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(50704284, getWarning()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -325,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -344,7 +272,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -494,10 +422,11 @@ public Builder clear() { super.clear(); if (networkEndpointGroupsBuilder_ == null) { networkEndpointGroups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + networkEndpointGroups_ = null; networkEndpointGroupsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -631,7 +560,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkEndpointGroupsScoped if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,18 +575,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointGroupsScopedList 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 234773866: + { + com.google.cloud.compute.v1.NetworkEndpointGroup m = + input.readMessage( + com.google.cloud.compute.v1.NetworkEndpointGroup.parser(), + extensionRegistry); + if (networkEndpointGroupsBuilder_ == null) { + ensureNetworkEndpointGroupsIsMutable(); + networkEndpointGroups_.add(m); + } else { + networkEndpointGroupsBuilder_.addMessage(m); + } + break; + } // case 234773866 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + 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.compute.v1.NetworkEndpointGroupsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1280,7 +1242,18 @@ public NetworkEndpointGroupsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointGroupsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointWithHealthStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointWithHealthStatus.java index 33f143cc997e..81177cab5cc7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointWithHealthStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkEndpointWithHealthStatus.java @@ -52,79 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkEndpointWithHealthStatus( - 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 454313010: - { - com.google.cloud.compute.v1.NetworkEndpoint.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = networkEndpoint_.toBuilder(); - } - networkEndpoint_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEndpoint.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkEndpoint_); - networkEndpoint_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 2069515450: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - healths_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.HealthStatusForNetworkEndpoint>(); - mutable_bitField0_ |= 0x00000001; - } - healths_.add( - input.readMessage( - com.google.cloud.compute.v1.HealthStatusForNetworkEndpoint.parser(), - extensionRegistry)); - 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)) { - healths_ = java.util.Collections.unmodifiableList(healths_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkEndpointWithHealthStatus_descriptor; @@ -288,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < healths_.size(); i++) { output.writeMessage(258689431, healths_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +231,7 @@ public int getSerializedSize() { for (int i = 0; i < healths_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(258689431, healths_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -325,7 +252,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNetworkEndpoint()) { if (!getNetworkEndpoint().equals(other.getNetworkEndpoint())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -344,7 +271,7 @@ public int hashCode() { hash = (37 * hash) + NETWORK_ENDPOINT_FIELD_NUMBER; hash = (53 * hash) + getNetworkEndpoint().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -494,10 +421,11 @@ public Builder clear() { super.clear(); if (healthsBuilder_ == null) { healths_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + healths_ = null; healthsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (networkEndpointBuilder_ == null) { networkEndpoint_ = null; } else { @@ -631,7 +559,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkEndpointWithHealthSt if (other.hasNetworkEndpoint()) { mergeNetworkEndpoint(other.getNetworkEndpoint()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,18 +574,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkEndpointWithHealthStatus 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 454313010: + { + input.readMessage(getNetworkEndpointFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 454313010 + case 2069515450: + { + com.google.cloud.compute.v1.HealthStatusForNetworkEndpoint m = + input.readMessage( + com.google.cloud.compute.v1.HealthStatusForNetworkEndpoint.parser(), + extensionRegistry); + if (healthsBuilder_ == null) { + ensureHealthsIsMutable(); + healths_.add(m); + } else { + healthsBuilder_.addMessage(m); + } + break; + } // case 2069515450 + 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.compute.v1.NetworkEndpointWithHealthStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1266,7 +1227,18 @@ public NetworkEndpointWithHealthStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkEndpointWithHealthStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkInterface.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkInterface.java index c29603e9efbb..ebedf537bcc9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkInterface.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkInterface.java @@ -64,173 +64,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkInterface( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 478484618: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - nicType_ = s; - break; - } - case 888466610: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - accessConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - accessConfigs_.add( - input.readMessage( - com.google.cloud.compute.v1.AccessConfig.parser(), extensionRegistry)); - break; - } - case 1320685050: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - aliasIpRanges_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - aliasIpRanges_.add( - input.readMessage( - com.google.cloud.compute.v1.AliasIpRange.parser(), extensionRegistry)); - break; - } - case 1630670056: - { - bitField0_ |= 0x00000002; - internalIpv6PrefixLength_ = input.readInt32(); - break; - } - case 1657455690: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - networkIP_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - network_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - fingerprint_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - subnetwork_ = s; - break; - } - case -1562456862: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - ipv6Address_ = s; - break; - } - case -887696246: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - stackType_ = s; - break; - } - case -427190414: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - ipv6AccessConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - ipv6AccessConfigs_.add( - input.readMessage( - com.google.cloud.compute.v1.AccessConfig.parser(), extensionRegistry)); - break; - } - case -265297144: - { - bitField0_ |= 0x00000200; - queueCount_ = input.readInt32(); - break; - } - case -257698070: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - ipv6AccessType_ = 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)) { - accessConfigs_ = java.util.Collections.unmodifiableList(accessConfigs_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - aliasIpRanges_ = java.util.Collections.unmodifiableList(aliasIpRanges_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - ipv6AccessConfigs_ = java.util.Collections.unmodifiableList(ipv6AccessConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkInterface_descriptor; @@ -1734,7 +1567,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 504658653, ipv6AccessType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1796,7 +1629,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(504658653, ipv6AccessType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1863,7 +1696,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSubnetwork()) { if (!getSubnetwork().equals(other.getSubnetwork())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1934,7 +1767,7 @@ public int hashCode() { hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; hash = (53 * hash) + getSubnetwork().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2063,21 +1896,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NetworkInterface.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) { - getAccessConfigsFieldBuilder(); - getAliasIpRangesFieldBuilder(); - getIpv6AccessConfigsFieldBuilder(); - } } @java.lang.Override @@ -2085,26 +1907,29 @@ public Builder clear() { super.clear(); if (accessConfigsBuilder_ == null) { accessConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + accessConfigs_ = null; accessConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (aliasIpRangesBuilder_ == null) { aliasIpRanges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + aliasIpRanges_ = null; aliasIpRangesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); fingerprint_ = ""; bitField0_ = (bitField0_ & ~0x00000004); internalIpv6PrefixLength_ = 0; bitField0_ = (bitField0_ & ~0x00000008); if (ipv6AccessConfigsBuilder_ == null) { ipv6AccessConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + ipv6AccessConfigs_ = null; ipv6AccessConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); ipv6AccessType_ = ""; bitField0_ = (bitField0_ & ~0x00000020); ipv6Address_ = ""; @@ -2416,7 +2241,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkInterface other) { subnetwork_ = other.subnetwork_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2431,17 +2256,142 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkInterface 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26989658 + case 478484618: + { + nicType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 478484618 + case 888466610: + { + com.google.cloud.compute.v1.AccessConfig m = + input.readMessage( + com.google.cloud.compute.v1.AccessConfig.parser(), extensionRegistry); + if (accessConfigsBuilder_ == null) { + ensureAccessConfigsIsMutable(); + accessConfigs_.add(m); + } else { + accessConfigsBuilder_.addMessage(m); + } + break; + } // case 888466610 + case 1320685050: + { + com.google.cloud.compute.v1.AliasIpRange m = + input.readMessage( + com.google.cloud.compute.v1.AliasIpRange.parser(), extensionRegistry); + if (aliasIpRangesBuilder_ == null) { + ensureAliasIpRangesIsMutable(); + aliasIpRanges_.add(m); + } else { + aliasIpRangesBuilder_.addMessage(m); + } + break; + } // case 1320685050 + case 1630670056: + { + internalIpv6PrefixLength_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 1630670056 + case 1657455690: + { + networkIP_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1657455690 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1862979954 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1877428002 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -1832345742 + case -1562456862: + { + ipv6Address_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -1562456862 + case -887696246: + { + stackType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case -887696246 + case -427190414: + { + com.google.cloud.compute.v1.AccessConfig m = + input.readMessage( + com.google.cloud.compute.v1.AccessConfig.parser(), extensionRegistry); + if (ipv6AccessConfigsBuilder_ == null) { + ensureIpv6AccessConfigsIsMutable(); + ipv6AccessConfigs_.add(m); + } else { + ipv6AccessConfigsBuilder_.addMessage(m); + } + break; + } // case -427190414 + case -265297144: + { + queueCount_ = input.readInt32(); + bitField0_ |= 0x00001000; + break; + } // case -265297144 + case -257698070: + { + ipv6AccessType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -257698070 + 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.compute.v1.NetworkInterface) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4894,7 +4844,18 @@ public NetworkInterface parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkInterface(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkList.java index 40a6bfb98413..3892a323accc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Network.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -823,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Network m = + input.readMessage( + com.google.cloud.compute.v1.Network.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NetworkList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2078,7 +2038,18 @@ public NetworkList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkPeering.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkPeering.java index e96ddadff461..72be1651bbac 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkPeering.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkPeering.java @@ -56,123 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkPeering( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 115357832: - { - bitField0_ |= 0x00000020; - importSubnetRoutesWithPublicIp_ = input.readBool(); - break; - } - case 210578048: - { - bitField0_ |= 0x00000002; - exchangeSubnetRoutes_ = input.readBool(); - break; - } - case 459639528: - { - bitField0_ |= 0x00000001; - autoCreateRoutes_ = input.readBool(); - break; - } - case 482251880: - { - bitField0_ |= 0x00000004; - exportCustomRoutes_ = input.readBool(); - break; - } - case 556677768: - { - bitField0_ |= 0x00000100; - peerMtu_ = input.readInt32(); - break; - } - case 764535970: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - stateDetails_ = s; - break; - } - case 783526672: - { - bitField0_ |= 0x00000008; - exportSubnetRoutesWithPublicIp_ = input.readBool(); - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - state_ = s; - break; - } - case 1583859184: - { - bitField0_ |= 0x00000010; - importCustomRoutes_ = input.readBool(); - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - network_ = s; - break; - } - case -887696246: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - stackType_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkPeering_descriptor; @@ -1110,7 +993,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 425908881, stackType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1160,7 +1043,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(425908881, stackType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1228,7 +1111,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStateDetails()) { if (!getStateDetails().equals(other.getStateDetails())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1291,7 +1174,7 @@ public int hashCode() { hash = (37 * hash) + STATE_DETAILS_FIELD_NUMBER; hash = (53 * hash) + getStateDetails().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1420,17 +1303,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NetworkPeering.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 @@ -1633,7 +1509,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkPeering other) { stateDetails_ = other.stateDetails_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1648,17 +1524,103 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkPeering 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26989658 + case 115357832: + { + importSubnetRoutesWithPublicIp_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 115357832 + case 210578048: + { + exchangeSubnetRoutes_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 210578048 + case 459639528: + { + autoCreateRoutes_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 459639528 + case 482251880: + { + exportCustomRoutes_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 482251880 + case 556677768: + { + peerMtu_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 556677768 + case 764535970: + { + stateDetails_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 764535970 + case 783526672: + { + exportSubnetRoutesWithPublicIp_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 783526672 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 878060682 + case 1583859184: + { + importCustomRoutes_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 1583859184 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1862979954 + case -887696246: + { + stackType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -887696246 + 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.compute.v1.NetworkPeering) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2777,7 +2739,18 @@ public NetworkPeering parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkPeering(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkPerformanceConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkPerformanceConfig.java index 22fe48476dd5..e1ea8044213b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkPerformanceConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkPerformanceConfig.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkPerformanceConfig( - 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 1040875514: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - totalEgressBandwidthTier_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkPerformanceConfig_descriptor; @@ -328,7 +281,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 130109439, totalEgressBandwidthTier_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +295,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 130109439, totalEgressBandwidthTier_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +315,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTotalEgressBandwidthTier()) { if (!getTotalEgressBandwidthTier().equals(other.getTotalEgressBandwidthTier())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +330,7 @@ public int hashCode() { hash = (37 * hash) + TOTAL_EGRESS_BANDWIDTH_TIER_FIELD_NUMBER; hash = (53 * hash) + getTotalEgressBandwidthTier().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -505,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NetworkPerformanceConfig.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 @@ -612,7 +558,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkPerformanceConfig ot totalEgressBandwidthTier_ = other.totalEgressBandwidthTier_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -627,18 +573,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkPerformanceConfig 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 1040875514: + { + totalEgressBandwidthTier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1040875514 + 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.compute.v1.NetworkPerformanceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -802,7 +767,18 @@ public NetworkPerformanceConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkPerformanceConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkRoutingConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkRoutingConfig.java index 3997047723a3..6e4954897160 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkRoutingConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworkRoutingConfig.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworkRoutingConfig( - 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 -493818910: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - routingMode_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworkRoutingConfig_descriptor; @@ -324,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 475143548, routingMode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +289,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(475143548, routingMode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -356,7 +309,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRoutingMode()) { if (!getRoutingMode().equals(other.getRoutingMode())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -371,7 +324,7 @@ public int hashCode() { hash = (37 * hash) + ROUTING_MODE_FIELD_NUMBER; hash = (53 * hash) + getRoutingMode().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -500,17 +453,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NetworkRoutingConfig.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 @@ -607,7 +553,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworkRoutingConfig other) routingMode_ = other.routingMode_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -622,17 +568,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworkRoutingConfig 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 -493818910: + { + routingMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -493818910 + 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.compute.v1.NetworkRoutingConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -796,7 +762,18 @@ public NetworkRoutingConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworkRoutingConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksAddPeeringRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksAddPeeringRequest.java index ef0cc1a9b5fb..8144b52bc85f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksAddPeeringRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksAddPeeringRequest.java @@ -52,82 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworksAddPeeringRequest( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - name_ = s; - break; - } - case 459639528: - { - bitField0_ |= 0x00000001; - autoCreateRoutes_ = input.readBool(); - break; - } - case -1663553158: - { - com.google.cloud.compute.v1.NetworkPeering.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = networkPeering_.toBuilder(); - } - networkPeering_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkPeering.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkPeering_); - networkPeering_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -289963382: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - peerNetwork_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworksAddPeeringRequest_descriptor; @@ -381,7 +305,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 500625489, peerNetwork_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -403,7 +327,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(500625489, peerNetwork_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -435,7 +359,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPeerNetwork()) { if (!getPeerNetwork().equals(other.getPeerNetwork())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -462,7 +386,7 @@ public int hashCode() { hash = (37 * hash) + PEER_NETWORK_FIELD_NUMBER; hash = (53 * hash) + getPeerNetwork().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -737,7 +661,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworksAddPeeringRequest o peerNetwork_ = other.peerNetwork_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,18 +676,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworksAddPeeringRequest 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26989658 + case 459639528: + { + autoCreateRoutes_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 459639528 + case -1663553158: + { + input.readMessage(getNetworkPeeringFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -1663553158 + case -289963382: + { + peerNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -289963382 + 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.compute.v1.NetworksAddPeeringRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1295,7 +1256,18 @@ public NetworksAddPeeringRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworksAddPeeringRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksGetEffectiveFirewallsResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksGetEffectiveFirewallsResponse.java index 2ca44a723f68..62bd8a71a14a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksGetEffectiveFirewallsResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksGetEffectiveFirewallsResponse.java @@ -54,79 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworksGetEffectiveFirewallsResponse( - 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 -2117002342: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - firewalls_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - firewalls_.add( - input.readMessage( - com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry)); - break; - } - case -1007080942: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - firewallPolicys_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy>(); - mutable_bitField0_ |= 0x00000001; - } - firewallPolicys_.add( - input.readMessage( - com.google.cloud.compute.v1 - .NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy.parser(), - extensionRegistry)); - 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_ & 0x00000002) != 0)) { - firewalls_ = java.util.Collections.unmodifiableList(firewalls_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - firewallPolicys_ = java.util.Collections.unmodifiableList(firewallPolicys_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworksGetEffectiveFirewallsResponse_descriptor; @@ -320,7 +247,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < firewallPolicys_.size(); i++) { output.writeMessage(410985794, firewallPolicys_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +265,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 410985794, firewallPolicys_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -356,7 +283,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFirewallPolicysList().equals(other.getFirewallPolicysList())) return false; if (!getFirewallsList().equals(other.getFirewallsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -375,7 +302,7 @@ public int hashCode() { hash = (37 * hash) + FIREWALLS_FIELD_NUMBER; hash = (53 * hash) + getFirewallsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -506,20 +433,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponse.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) { - getFirewallPolicysFieldBuilder(); - getFirewallsFieldBuilder(); - } } @java.lang.Override @@ -527,16 +444,18 @@ public Builder clear() { super.clear(); if (firewallPolicysBuilder_ == null) { firewallPolicys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + firewallPolicys_ = null; firewallPolicysBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (firewallsBuilder_ == null) { firewalls_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + firewalls_ = null; firewallsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -690,7 +609,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -705,19 +624,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponse 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 -2117002342: + { + com.google.cloud.compute.v1.Firewall m = + input.readMessage( + com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry); + if (firewallsBuilder_ == null) { + ensureFirewallsIsMutable(); + firewalls_.add(m); + } else { + firewallsBuilder_.addMessage(m); + } + break; + } // case -2117002342 + case -1007080942: + { + com.google.cloud.compute.v1 + .NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy + m = + input.readMessage( + com.google.cloud.compute.v1 + .NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy + .parser(), + extensionRegistry); + if (firewallPolicysBuilder_ == null) { + ensureFirewallPolicysIsMutable(); + firewallPolicys_.add(m); + } else { + firewallPolicysBuilder_.addMessage(m); + } + break; + } // case -1007080942 + 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.compute.v1.NetworksGetEffectiveFirewallsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1553,7 +1515,18 @@ public NetworksGetEffectiveFirewallsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworksGetEffectiveFirewallsResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java index 5783d16ddd55..9f04355c9871 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java @@ -58,88 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - name_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - type_ = s; - break; - } - case 35790658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - displayName_ = s; - break; - } - case 870991802: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - rules_.add( - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry)); - break; - } - case -358554766: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - shortName_ = 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_ & 0x00000004) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy_descriptor; @@ -650,7 +568,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 492051566, shortName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -674,7 +592,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(492051566, shortName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -710,7 +628,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -741,7 +659,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -894,19 +812,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy.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) { - getRulesFieldBuilder(); - } } @java.lang.Override @@ -918,10 +827,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); shortName_ = ""; bitField0_ = (bitField0_ & ~0x00000008); type_ = ""; @@ -1095,7 +1005,7 @@ public Builder mergeFrom( type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1110,21 +1020,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy - 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26989658 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 28604882 + case 35790658: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 35790658 + case 870991802: + { + com.google.cloud.compute.v1.FirewallPolicyRule m = + input.readMessage( + com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 870991802 + case -358554766: + { + shortName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -358554766 + 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.compute.v1 - .NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2007,8 +1964,19 @@ public NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy parsePartial com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicy( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksRemovePeeringRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksRemovePeeringRequest.java index 8bded3300739..9ea0f0506f46 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksRemovePeeringRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksRemovePeeringRequest.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworksRemovePeeringRequest( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworksRemovePeeringRequest_descriptor; @@ -195,7 +148,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +160,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +180,7 @@ public boolean equals(final java.lang.Object obj) { if (hasName()) { if (!getName().equals(other.getName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +195,7 @@ public int 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; } @@ -371,17 +324,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NetworksRemovePeeringRequest.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 @@ -478,7 +424,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworksRemovePeeringReques name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -493,18 +439,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworksRemovePeeringRequest 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + 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.compute.v1.NetworksRemovePeeringRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -662,7 +627,18 @@ public NetworksRemovePeeringRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworksRemovePeeringRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksUpdatePeeringRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksUpdatePeeringRequest.java index 06cbb558bef2..4aed67e9133d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksUpdatePeeringRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NetworksUpdatePeeringRequest.java @@ -49,62 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NetworksUpdatePeeringRequest( - 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 -1663553158: - { - com.google.cloud.compute.v1.NetworkPeering.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = networkPeering_.toBuilder(); - } - networkPeering_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkPeering.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkPeering_); - networkPeering_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NetworksUpdatePeeringRequest_descriptor; @@ -168,7 +112,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(328926767, getNetworkPeering()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -181,7 +125,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(328926767, getNetworkPeering()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -201,7 +145,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNetworkPeering()) { if (!getNetworkPeering().equals(other.getNetworkPeering())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -216,7 +160,7 @@ public int hashCode() { hash = (37 * hash) + NETWORK_PEERING_FIELD_NUMBER; hash = (53 * hash) + getNetworkPeering().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -460,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NetworksUpdatePeeringReques if (other.hasNetworkPeering()) { mergeNetworkPeering(other.getNetworkPeering()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NetworksUpdatePeeringRequest 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 -1663553158: + { + input.readMessage(getNetworkPeeringFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -1663553158 + 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.compute.v1.NetworksUpdatePeeringRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -657,7 +620,18 @@ public NetworksUpdatePeeringRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NetworksUpdatePeeringRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroup.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroup.java index b20aee095992..e561658db22b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroup.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroup.java @@ -62,185 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroup( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - name_ = s; - break; - } - case 28246024: - { - bitField0_ |= 0x00002000; - size_ = input.readInt32(); - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - status_ = s; - break; - } - case 1490998498: - { - com.google.cloud.compute.v1.NodeGroupMaintenanceWindow.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = maintenanceWindow_.toBuilder(); - } - maintenanceWindow_ = - input.readMessage( - com.google.cloud.compute.v1.NodeGroupMaintenanceWindow.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maintenanceWindow_); - maintenanceWindow_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case 1775600330: - { - com.google.cloud.compute.v1.NodeGroupAutoscalingPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = autoscalingPolicy_.toBuilder(); - } - autoscalingPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.NodeGroupAutoscalingPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalingPolicy_); - autoscalingPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - fingerprint_ = s; - break; - } - case 2133345306: - { - com.google.cloud.compute.v1.ShareSettings.Builder subBuilder = null; - if (((bitField0_ & 0x00001000) != 0)) { - subBuilder = shareSettings_.toBuilder(); - } - shareSettings_ = - input.readMessage( - com.google.cloud.compute.v1.ShareSettings.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shareSettings_); - shareSettings_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00001000; - break; - } - case -1709731654: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - nodeTemplate_ = s; - break; - } - case -1490811254: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - locationHint_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - selfLink_ = s; - break; - } - case -68346126: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - maintenancePolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroup_descriptor; @@ -1547,7 +1368,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 528327646, maintenancePolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1611,7 +1432,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(528327646, maintenancePolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1690,7 +1511,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1765,7 +1586,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2182,7 +2003,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroup other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2197,17 +2018,129 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroup 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26989658 + case 28246024: + { + size_ = input.readInt32(); + bitField0_ |= 0x00002000; + break; + } // case 28246024 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 1450082194 + case 1490998498: + { + input.readMessage( + getMaintenanceWindowFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 1490998498 + case 1775600330: + { + input.readMessage( + getAutoscalingPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1775600330 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1877428002 + case 2133345306: + { + input.readMessage(getShareSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 2133345306 + case -1709731654: + { + nodeTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -1709731654 + case -1490811254: + { + locationHint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -1490811254 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -645248918 + case -68346126: + { + maintenancePolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -68346126 + 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.compute.v1.NodeGroup) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4228,7 +4161,18 @@ public NodeGroup parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroup(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupAggregatedList.java index b76968fbf9ce..2e432068bdbd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroupAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.NodeGroupsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroupAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1157,7 +1044,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroupAggregatedList oth if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1172,18 +1059,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroupAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.NodeGroupsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NodeGroupAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2232,7 +2180,18 @@ public NodeGroupAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupAutoscalingPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupAutoscalingPolicy.java index b169b2671fcb..132f802cbcbe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupAutoscalingPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupAutoscalingPolicy.java @@ -51,65 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroupAutoscalingPolicy( - 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 26856730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - mode_ = s; - break; - } - case -1912864592: - { - bitField0_ |= 0x00000001; - maxNodes_ = input.readInt32(); - break; - } - case -28003296: - { - bitField0_ |= 0x00000002; - minNodes_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroupAutoscalingPolicy_descriptor; @@ -469,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(533370500, minNodes_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +428,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(533370500, minNodes_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -515,7 +456,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMode()) { if (!getMode().equals(other.getMode())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -538,7 +479,7 @@ public int hashCode() { hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + getMode().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -667,17 +608,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NodeGroupAutoscalingPolicy.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 @@ -792,7 +726,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroupAutoscalingPolicy mode_ = other.mode_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -807,18 +741,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroupAutoscalingPolicy 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 26856730: + { + mode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26856730 + case -1912864592: + { + maxNodes_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -1912864592 + case -28003296: + { + minNodes_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case -28003296 + 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.compute.v1.NodeGroupAutoscalingPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1116,7 +1081,18 @@ public NodeGroupAutoscalingPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupAutoscalingPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupList.java index 0f7642f01a4d..f4f994554f3c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroupList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.NodeGroup.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroupList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroupList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroupList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.NodeGroup m = + input.readMessage( + com.google.cloud.compute.v1.NodeGroup.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NodeGroupList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public NodeGroupList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupMaintenanceWindow.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupMaintenanceWindow.java index 1f9c441a4de9..756c33a3062e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupMaintenanceWindow.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupMaintenanceWindow.java @@ -52,69 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroupMaintenanceWindow( - 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 299738194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - startTime_ = s; - break; - } - case -92632574: - { - com.google.cloud.compute.v1.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = maintenanceDuration_.toBuilder(); - } - maintenanceDuration_ = - input.readMessage( - com.google.cloud.compute.v1.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(maintenanceDuration_); - maintenanceDuration_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroupMaintenanceWindow_descriptor; @@ -265,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(525291840, getMaintenanceDuration()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -282,7 +219,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 525291840, getMaintenanceDuration()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -306,7 +243,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStartTime()) { if (!getStartTime().equals(other.getStartTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +262,7 @@ public int hashCode() { hash = (37 * hash) + START_TIME_FIELD_NUMBER; hash = (53 * hash) + getStartTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -581,7 +518,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroupMaintenanceWindow startTime_ = other.startTime_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -596,18 +533,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroupMaintenanceWindow 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 299738194: + { + startTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 299738194 + case -92632574: + { + input.readMessage( + getMaintenanceDurationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -92632574 + 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.compute.v1.NodeGroupMaintenanceWindow) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -952,7 +915,18 @@ public NodeGroupMaintenanceWindow parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupMaintenanceWindow(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupNode.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupNode.java index 9f816f0b4d2d..1da1bbe740aa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupNode.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupNode.java @@ -59,195 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroupNode( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - name_ = s; - break; - } - case 232780786: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - instances_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - instances_.add(s); - break; - } - case 677724610: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - instanceConsumptionData_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - instanceConsumptionData_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceConsumptionData.parser(), - extensionRegistry)); - break; - } - case 764752818: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - disks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - disks_.add( - input.readMessage( - com.google.cloud.compute.v1.LocalDisk.parser(), extensionRegistry)); - break; - } - case 779253586: - { - com.google.cloud.compute.v1.InstanceConsumptionInfo.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = totalResources_.toBuilder(); - } - totalResources_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceConsumptionInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(totalResources_); - totalResources_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - status_ = s; - break; - } - case 1665436746: - { - com.google.cloud.compute.v1.ServerBinding.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = serverBinding_.toBuilder(); - } - serverBinding_ = - input.readMessage( - com.google.cloud.compute.v1.ServerBinding.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serverBinding_); - serverBinding_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 1981823674: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - cpuOvercommitType_ = s; - break; - } - case -2138350782: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - accelerators_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - accelerators_.add( - input.readMessage( - com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry)); - break; - } - case -1618750350: - { - com.google.cloud.compute.v1.InstanceConsumptionInfo.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = consumedResources_.toBuilder(); - } - consumedResources_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceConsumptionInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(consumedResources_); - consumedResources_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1579500358: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - serverId_ = s; - break; - } - case -568304966: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - nodeType_ = s; - break; - } - case -447253160: - { - bitField0_ |= 0x00000010; - satisfiesPzs_ = 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 { - if (((mutable_bitField0_ & 0x00000020) != 0)) { - instances_ = instances_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - instanceConsumptionData_ = java.util.Collections.unmodifiableList(instanceConsumptionData_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - disks_ = java.util.Collections.unmodifiableList(disks_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - accelerators_ = java.util.Collections.unmodifiableList(accelerators_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroupNode_descriptor; @@ -1391,7 +1202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeBool(480964267, satisfiesPzs_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1452,7 +1263,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(480964267, satisfiesPzs_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1509,7 +1320,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTotalResources()) { if (!getTotalResources().equals(other.getTotalResources())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1572,7 +1383,7 @@ public int hashCode() { hash = (37 * hash) + TOTAL_RESOURCES_FIELD_NUMBER; hash = (53 * hash) + getTotalResources().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1725,10 +1536,11 @@ public Builder clear() { super.clear(); if (acceleratorsBuilder_ == null) { accelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + accelerators_ = null; acceleratorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (consumedResourcesBuilder_ == null) { consumedResources_ = null; } else { @@ -1739,16 +1551,18 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (disksBuilder_ == null) { disks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + disks_ = null; disksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); if (instanceConsumptionDataBuilder_ == null) { instanceConsumptionData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + instanceConsumptionData_ = null; instanceConsumptionDataBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); instances_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); name_ = ""; @@ -2061,7 +1875,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroupNode other) { if (other.hasTotalResources()) { mergeTotalResources(other.getTotalResources()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2076,17 +1890,133 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroupNode 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26989658 + case 232780786: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstancesIsMutable(); + instances_.add(s); + break; + } // case 232780786 + case 677724610: + { + com.google.cloud.compute.v1.InstanceConsumptionData m = + input.readMessage( + com.google.cloud.compute.v1.InstanceConsumptionData.parser(), + extensionRegistry); + if (instanceConsumptionDataBuilder_ == null) { + ensureInstanceConsumptionDataIsMutable(); + instanceConsumptionData_.add(m); + } else { + instanceConsumptionDataBuilder_.addMessage(m); + } + break; + } // case 677724610 + case 764752818: + { + com.google.cloud.compute.v1.LocalDisk m = + input.readMessage( + com.google.cloud.compute.v1.LocalDisk.parser(), extensionRegistry); + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(m); + } else { + disksBuilder_.addMessage(m); + } + break; + } // case 764752818 + case 779253586: + { + input.readMessage(getTotalResourcesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 779253586 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1450082194 + case 1665436746: + { + input.readMessage(getServerBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 1665436746 + case 1981823674: + { + cpuOvercommitType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1981823674 + case -2138350782: + { + com.google.cloud.compute.v1.AcceleratorConfig m = + input.readMessage( + com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry); + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(m); + } else { + acceleratorsBuilder_.addMessage(m); + } + break; + } // case -2138350782 + case -1618750350: + { + input.readMessage( + getConsumedResourcesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1618750350 + case -1579500358: + { + serverId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -1579500358 + case -568304966: + { + nodeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -568304966 + case -447253160: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case -447253160 + 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.compute.v1.NodeGroupNode) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4666,7 +4596,18 @@ public NodeGroupNode parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupNode(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsAddNodesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsAddNodesRequest.java index 2a1b5fad1cb0..c584744d78d3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsAddNodesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsAddNodesRequest.java @@ -49,52 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroupsAddNodesRequest( - 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 1079983440: - { - bitField0_ |= 0x00000001; - additionalNodeCount_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroupsAddNodesRequest_descriptor; @@ -161,7 +115,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(134997930, additionalNodeCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -174,7 +128,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt32Size(134997930, additionalNodeCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -194,7 +148,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAdditionalNodeCount()) { if (getAdditionalNodeCount() != other.getAdditionalNodeCount()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -209,7 +163,7 @@ public int hashCode() { hash = (37 * hash) + ADDITIONAL_NODE_COUNT_FIELD_NUMBER; hash = (53 * hash) + getAdditionalNodeCount(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -338,17 +292,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NodeGroupsAddNodesRequest.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 @@ -443,7 +390,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroupsAddNodesRequest o if (other.hasAdditionalNodeCount()) { setAdditionalNodeCount(other.getAdditionalNodeCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -458,18 +405,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroupsAddNodesRequest 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 1079983440: + { + additionalNodeCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 1079983440 + 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.compute.v1.NodeGroupsAddNodesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -574,7 +540,18 @@ public NodeGroupsAddNodesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupsAddNodesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsDeleteNodesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsDeleteNodesRequest.java index 4527f9fefee3..22dd8e5603b6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsDeleteNodesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsDeleteNodesRequest.java @@ -51,59 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroupsDeleteNodesRequest( - 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 839947658: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - nodes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - nodes_.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)) { - nodes_ = nodes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroupsDeleteNodesRequest_descriptor; @@ -197,7 +144,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < nodes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 104993457, nodes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -214,7 +161,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getNodesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -231,7 +178,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.NodeGroupsDeleteNodesRequest) obj; if (!getNodesList().equals(other.getNodesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -246,7 +193,7 @@ public int hashCode() { hash = (37 * hash) + NODES_FIELD_NUMBER; hash = (53 * hash) + getNodesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -375,17 +322,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NodeGroupsDeleteNodesRequest.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 @@ -486,7 +426,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroupsDeleteNodesReques } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -501,18 +441,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroupsDeleteNodesRequest 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 839947658: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNodesIsMutable(); + nodes_.add(s); + break; + } // case 839947658 + 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.compute.v1.NodeGroupsDeleteNodesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -718,7 +678,18 @@ public NodeGroupsDeleteNodesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupsDeleteNodesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsListNodes.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsListNodes.java index 855f8141382f..6b1957db7847 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsListNodes.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsListNodes.java @@ -55,104 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroupsListNodes( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.NodeGroupNode.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroupsListNodes_descriptor; @@ -572,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -822,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroupsListNodes other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroupsListNodes 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.NodeGroupNode m = + input.readMessage( + com.google.cloud.compute.v1.NodeGroupNode.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NodeGroupsListNodes) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2078,7 +2038,18 @@ public NodeGroupsListNodes parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupsListNodes(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsScopedList.java index 8d61ef51a135..469289bb7018 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroupsScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 585504138: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - nodeGroups_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - nodeGroups_.add( - input.readMessage( - com.google.cloud.compute.v1.NodeGroup.parser(), extensionRegistry)); - 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)) { - nodeGroups_ = java.util.Collections.unmodifiableList(nodeGroups_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroupsScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < nodeGroups_.size(); i++) { output.writeMessage(73188017, nodeGroups_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(73188017, nodeGroups_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (nodeGroupsBuilder_ == null) { nodeGroups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + nodeGroups_ = null; nodeGroupsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroupsScopedList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,17 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroupsScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 585504138: + { + com.google.cloud.compute.v1.NodeGroup m = + input.readMessage( + com.google.cloud.compute.v1.NodeGroup.parser(), extensionRegistry); + if (nodeGroupsBuilder_ == null) { + ensureNodeGroupsIsMutable(); + nodeGroups_.add(m); + } else { + nodeGroupsBuilder_.addMessage(m); + } + break; + } // case 585504138 + 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.compute.v1.NodeGroupsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1212,7 +1176,18 @@ public NodeGroupsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSetNodeTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSetNodeTemplateRequest.java index bfb43e27463e..0d3108db34c4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSetNodeTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeGroupsSetNodeTemplateRequest.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeGroupsSetNodeTemplateRequest( - 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 -1709731654: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - nodeTemplate_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeGroupsSetNodeTemplateRequest_descriptor; @@ -196,7 +149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 323154455, nodeTemplate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -208,7 +161,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(323154455, nodeTemplate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -228,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNodeTemplate()) { if (!getNodeTemplate().equals(other.getNodeTemplate())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -243,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + NODE_TEMPLATE_FIELD_NUMBER; hash = (53 * hash) + getNodeTemplate().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -372,17 +325,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NodeGroupsSetNodeTemplateRequest.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 @@ -481,7 +427,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeGroupsSetNodeTemplateRe nodeTemplate_ = other.nodeTemplate_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -496,18 +442,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeGroupsSetNodeTemplateRequest 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 -1709731654: + { + nodeTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1709731654 + 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.compute.v1.NodeGroupsSetNodeTemplateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -666,7 +631,18 @@ public NodeGroupsSetNodeTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeGroupsSetNodeTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplate.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplate.java index 0a130587c609..ebc4b1171b97 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplate.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplate.java @@ -63,202 +63,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeTemplate( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 764752818: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - disks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - disks_.add( - input.readMessage( - com.google.cloud.compute.v1.LocalDisk.parser(), extensionRegistry)); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - region_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - status_ = s; - break; - } - case 1665436746: - { - com.google.cloud.compute.v1.ServerBinding.Builder subBuilder = null; - if (((bitField0_ & 0x00000400) != 0)) { - subBuilder = serverBinding_.toBuilder(); - } - serverBinding_ = - input.readMessage( - com.google.cloud.compute.v1.ServerBinding.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serverBinding_); - serverBinding_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000400; - break; - } - case 1981823674: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - cpuOvercommitType_ = s; - break; - } - case -2138350782: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - accelerators_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - accelerators_.add( - input.readMessage( - com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry)); - break; - } - case -1915542062: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - statusMessage_ = s; - break; - } - case -1772904054: - { - com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = nodeTypeFlexibility_.toBuilder(); - } - nodeTypeFlexibility_ = - input.readMessage( - com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(nodeTypeFlexibility_); - nodeTypeFlexibility_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case -1582910006: - { - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - nodeAffinityLabels_ = - com.google.protobuf.MapField.newMapField( - NodeAffinityLabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000100; - } - com.google.protobuf.MapEntry - nodeAffinityLabels__ = - input.readMessage( - NodeAffinityLabelsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - nodeAffinityLabels_ - .getMutableMap() - .put(nodeAffinityLabels__.getKey(), nodeAffinityLabels__.getValue()); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - selfLink_ = s; - break; - } - case -568304966: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - nodeType_ = 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_ & 0x00000010) != 0)) { - disks_ = java.util.Collections.unmodifiableList(disks_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - accelerators_ = java.util.Collections.unmodifiableList(accelerators_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeTemplate_descriptor; @@ -1633,7 +1437,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 465832791, nodeType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1704,7 +1508,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(465832791, nodeType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1775,7 +1579,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatusMessage()) { if (!getStatusMessage().equals(other.getStatusMessage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1850,7 +1654,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getStatusMessage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2022,10 +1826,11 @@ public Builder clear() { super.clear(); if (acceleratorsBuilder_ == null) { accelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + accelerators_ = null; acceleratorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); cpuOvercommitType_ = ""; bitField0_ = (bitField0_ & ~0x00000002); creationTimestamp_ = ""; @@ -2034,10 +1839,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000008); if (disksBuilder_ == null) { disks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + disks_ = null; disksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); id_ = 0L; bitField0_ = (bitField0_ & ~0x00000020); kind_ = ""; @@ -2340,7 +2146,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeTemplate other) { statusMessage_ = other.statusMessage_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2355,17 +2161,148 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeTemplate 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 244202930 + case 764752818: + { + com.google.cloud.compute.v1.LocalDisk m = + input.readMessage( + com.google.cloud.compute.v1.LocalDisk.parser(), extensionRegistry); + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(m); + } else { + disksBuilder_.addMessage(m); + } + break; + } // case 764752818 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1111570338 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 1450082194 + case 1665436746: + { + input.readMessage(getServerBindingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 1665436746 + case 1981823674: + { + cpuOvercommitType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1981823674 + case -2138350782: + { + com.google.cloud.compute.v1.AcceleratorConfig m = + input.readMessage( + com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry); + if (acceleratorsBuilder_ == null) { + ensureAcceleratorsIsMutable(); + accelerators_.add(m); + } else { + acceleratorsBuilder_.addMessage(m); + } + break; + } // case -2138350782 + case -1915542062: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case -1915542062 + case -1772904054: + { + input.readMessage( + getNodeTypeFlexibilityFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case -1772904054 + case -1582910006: + { + com.google.protobuf.MapEntry + nodeAffinityLabels__ = + input.readMessage( + NodeAffinityLabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableNodeAffinityLabels() + .getMutableMap() + .put(nodeAffinityLabels__.getKey(), nodeAffinityLabels__.getValue()); + break; + } // case -1582910006 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case -645248918 + case -568304966: + { + nodeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -568304966 + 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.compute.v1.NodeTemplate) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4694,7 +4631,18 @@ public NodeTemplate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeTemplate(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateAggregatedList.java index 918468738e2d..176f282d5104 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeTemplateAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.NodeTemplatesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeTemplateAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1158,7 +1045,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeTemplateAggregatedList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1173,18 +1060,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeTemplateAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.NodeTemplatesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NodeTemplateAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2235,7 +2183,18 @@ public NodeTemplateAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeTemplateAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateList.java index e672dbb695fe..e13b6ee8f1b0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeTemplateList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.NodeTemplate.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeTemplateList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeTemplateList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeTemplateList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.NodeTemplate m = + input.readMessage( + com.google.cloud.compute.v1.NodeTemplate.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NodeTemplateList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public NodeTemplateList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeTemplateList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateNodeTypeFlexibility.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateNodeTypeFlexibility.java index 2c130e87d56c..3dc6a3d2e81a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateNodeTypeFlexibility.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplateNodeTypeFlexibility.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeTemplateNodeTypeFlexibility( - 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 24485466: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - cpus_ = s; - break; - } - case -1049036414: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - localSsd_ = s; - break; - } - case -32118774: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - memory_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeTemplateNodeTypeFlexibility_descriptor; @@ -292,7 +231,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 532856065, memory_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -310,7 +249,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(532856065, memory_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -338,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMemory()) { if (!getMemory().equals(other.getMemory())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -361,7 +300,7 @@ public int hashCode() { hash = (37 * hash) + MEMORY_FIELD_NUMBER; hash = (53 * hash) + getMemory().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -490,17 +429,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility.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 @@ -619,7 +551,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibi memory_ = other.memory_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -634,18 +566,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeTemplateNodeTypeFlexibility 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 24485466: + { + cpus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24485466 + case -1049036414: + { + localSsd_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1049036414 + case -32118774: + { + memory_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -32118774 + 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.compute.v1.NodeTemplateNodeTypeFlexibility) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -935,7 +898,18 @@ public NodeTemplateNodeTypeFlexibility parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeTemplateNodeTypeFlexibility(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplatesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplatesScopedList.java index 40d61bbffafe..3dbf285040c2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplatesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTemplatesScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeTemplatesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1462072862: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - nodeTemplates_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - nodeTemplates_.add( - input.readMessage( - com.google.cloud.compute.v1.NodeTemplate.parser(), extensionRegistry)); - 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)) { - nodeTemplates_ = java.util.Collections.unmodifiableList(nodeTemplates_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeTemplatesScopedList_descriptor; @@ -273,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < nodeTemplates_.size(); i++) { output.writeMessage(354111804, nodeTemplates_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +219,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 354111804, nodeTemplates_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +240,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +259,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -479,10 +408,11 @@ public Builder clear() { super.clear(); if (nodeTemplatesBuilder_ == null) { nodeTemplates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + nodeTemplates_ = null; nodeTemplatesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -616,7 +546,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeTemplatesScopedList oth if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -631,18 +561,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeTemplatesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1462072862: + { + com.google.cloud.compute.v1.NodeTemplate m = + input.readMessage( + com.google.cloud.compute.v1.NodeTemplate.parser(), extensionRegistry); + if (nodeTemplatesBuilder_ == null) { + ensureNodeTemplatesIsMutable(); + nodeTemplates_.add(m); + } else { + nodeTemplatesBuilder_.addMessage(m); + } + break; + } // case -1462072862 + 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.compute.v1.NodeTemplatesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1220,7 +1182,18 @@ public NodeTemplatesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeTemplatesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeType.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeType.java index 4ead00dd796b..1798ca01a1b5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeType.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeType.java @@ -58,135 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeType( - 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 26840: - { - bitField0_ |= 0x00000020; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - name_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 928009368: - { - bitField0_ |= 0x00000100; - memoryMb_ = input.readInt32(); - break; - } - case -1661066672: - { - bitField0_ |= 0x00000080; - localSsdGb_ = input.readInt32(); - break; - } - case -1148113264: - { - bitField0_ |= 0x00000010; - guestCpus_ = input.readInt32(); - break; - } - case -1012684462: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - cpuPlatform_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - selfLink_ = s; - break; - } - case -173855334: - { - com.google.cloud.compute.v1.DeprecationStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = deprecated_.toBuilder(); - } - deprecated_ = - input.readMessage( - com.google.cloud.compute.v1.DeprecationStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deprecated_); - deprecated_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeType_descriptor; @@ -883,7 +754,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(515138995, getDeprecated()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -929,7 +800,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(515138995, getDeprecated()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -992,7 +863,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1051,7 +922,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1405,7 +1276,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeType other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1420,17 +1291,103 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeType 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26989658 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 928009368: + { + memoryMb_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 928009368 + case -1661066672: + { + localSsdGb_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case -1661066672 + case -1148113264: + { + guestCpus_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case -1148113264 + case -1012684462: + { + cpuPlatform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1012684462 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -645248918 + case -173855334: + { + input.readMessage(getDeprecatedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -173855334 + 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.compute.v1.NodeType) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2763,7 +2720,18 @@ public NodeType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeType(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypeAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypeAggregatedList.java index c33758a9acc4..dca24bce79e0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypeAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypeAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeTypeAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.NodeTypesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeTypeAggregatedList_descriptor; @@ -704,7 +591,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -748,7 +635,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -786,7 +673,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -825,7 +712,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1153,7 +1040,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeTypeAggregatedList othe if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1168,18 +1055,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeTypeAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.NodeTypesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NodeTypeAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2228,7 +2176,18 @@ public NodeTypeAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeTypeAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypeList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypeList.java index 54b27747b5d9..3953d901d8e9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypeList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypeList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeTypeList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.NodeType.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeTypeList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -823,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeTypeList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeTypeList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.NodeType m = + input.readMessage( + com.google.cloud.compute.v1.NodeType.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NodeTypeList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2078,7 +2038,18 @@ public NodeTypeList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeTypeList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypesScopedList.java index cea7369369b1..b499fd3f44ab 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NodeTypesScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NodeTypesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -437583902: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - nodeTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - nodeTypes_.add( - input.readMessage( - com.google.cloud.compute.v1.NodeType.parser(), extensionRegistry)); - 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)) { - nodeTypes_ = java.util.Collections.unmodifiableList(nodeTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NodeTypesScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < nodeTypes_.size(); i++) { output.writeMessage(482172924, nodeTypes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(482172924, nodeTypes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (nodeTypesBuilder_ == null) { nodeTypes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + nodeTypes_ = null; nodeTypesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NodeTypesScopedList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,17 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NodeTypesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -437583902: + { + com.google.cloud.compute.v1.NodeType m = + input.readMessage( + com.google.cloud.compute.v1.NodeType.parser(), extensionRegistry); + if (nodeTypesBuilder_ == null) { + ensureNodeTypesIsMutable(); + nodeTypes_.add(m); + } else { + nodeTypesBuilder_.addMessage(m); + } + break; + } // case -437583902 + 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.compute.v1.NodeTypesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1211,7 +1175,18 @@ public NodeTypesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NodeTypesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpoint.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpoint.java index e3d027a4360e..53b33aaaac8a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpoint.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpoint.java @@ -57,112 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NotificationEndpoint( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - region_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645850846: - { - com.google.cloud.compute.v1.NotificationEndpointGrpcSettings.Builder subBuilder = - null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = grpcSettings_.toBuilder(); - } - grpcSettings_ = - input.readMessage( - com.google.cloud.compute.v1.NotificationEndpointGrpcSettings.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(grpcSettings_); - grpcSettings_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NotificationEndpoint_descriptor; @@ -691,7 +585,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -726,7 +620,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -774,7 +668,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSelfLink()) { if (!getSelfLink().equals(other.getSelfLink())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -817,7 +711,7 @@ public int hashCode() { hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; hash = (53 * hash) + getSelfLink().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1136,7 +1030,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NotificationEndpoint other) selfLink_ = other.selfLink_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1151,17 +1045,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NotificationEndpoint 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1111570338 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645850846: + { + input.readMessage(getGrpcSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -645850846 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -645248918 + 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.compute.v1.NotificationEndpoint) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2197,7 +2153,18 @@ public NotificationEndpoint parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NotificationEndpoint(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpointGrpcSettings.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpointGrpcSettings.java index a8426709e27e..af70f2add03b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpointGrpcSettings.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpointGrpcSettings.java @@ -55,89 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NotificationEndpointGrpcSettings( - 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 925448936: - { - bitField0_ |= 0x00000010; - retryDurationSec_ = input.readUInt32(); - break; - } - case 1043917994: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - endpoint_ = s; - break; - } - case -1892100894: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - payloadName_ = s; - break; - } - case -1080018406: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - authority_ = s; - break; - } - case -468655542: - { - com.google.cloud.compute.v1.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = resendInterval_.toBuilder(); - } - resendInterval_ = - input.readMessage( - com.google.cloud.compute.v1.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resendInterval_); - resendInterval_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_NotificationEndpointGrpcSettings_descriptor; @@ -458,7 +375,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(478288969, getResendInterval()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -483,7 +400,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(478288969, getResendInterval()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -519,7 +436,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRetryDurationSec()) { if (getRetryDurationSec() != other.getRetryDurationSec()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -550,7 +467,7 @@ public int hashCode() { hash = (37 * hash) + RETRY_DURATION_SEC_FIELD_NUMBER; hash = (53 * hash) + getRetryDurationSec(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -839,7 +756,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NotificationEndpointGrpcSet if (other.hasRetryDurationSec()) { setRetryDurationSec(other.getRetryDurationSec()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -854,18 +771,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NotificationEndpointGrpcSettings 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 925448936: + { + retryDurationSec_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case 925448936 + case 1043917994: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1043917994 + case -1892100894: + { + payloadName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1892100894 + case -1080018406: + { + authority_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1080018406 + case -468655542: + { + input.readMessage(getResendIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -468655542 + 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.compute.v1.NotificationEndpointGrpcSettings) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1517,7 +1477,18 @@ public NotificationEndpointGrpcSettings parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NotificationEndpointGrpcSettings(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpointList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpointList.java index 3818efb4ae1f..679ae0aaa091 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpointList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/NotificationEndpointList.java @@ -55,106 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private NotificationEndpointList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.NotificationEndpoint.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_NotificationEndpointList_descriptor; @@ -574,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -601,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -638,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -673,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.NotificationEndpointList ot if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,18 +919,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.NotificationEndpointList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.NotificationEndpoint m = + input.readMessage( + com.google.cloud.compute.v1.NotificationEndpoint.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.NotificationEndpointList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2083,7 +2041,18 @@ public NotificationEndpointList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NotificationEndpointList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Operation.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Operation.java index 104f37a76270..3110e78dcd9e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Operation.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Operation.java @@ -70,225 +70,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Operation( - 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 26840: - { - bitField0_ |= 0x00000080; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - name_ = s; - break; - } - case 28794458: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00200000; - user_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00400000; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 299738194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - startTime_ = s; - break; - } - case 321369498: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - operationGroupId_ = s; - break; - } - case 501370690: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00100000; - targetLink_ = s; - break; - } - case 581308776: - { - bitField0_ |= 0x00002000; - progress_ = input.readInt32(); - break; - } - case 774279234: - { - com.google.cloud.compute.v1.Error.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = error_.toBuilder(); - } - error_ = - input.readMessage(com.google.cloud.compute.v1.Error.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(error_); - error_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 919510410: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - endTime_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - region_ = s; - break; - } - case 1421203602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - operationType_ = s; - break; - } - case 1450082192: - { - int rawValue = input.readEnum(); - bitField0_ |= 0x00020000; - status_ = rawValue; - break; - } - case 1620175562: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - httpErrorMessage_ = s; - break; - } - case 2065323080: - { - bitField0_ |= 0x00080000; - targetId_ = input.readUInt64(); - break; - } - case -1917044934: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - clientOperationId_ = s; - break; - } - case -1915542062: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; - statusMessage_ = s; - break; - } - case -1796205728: - { - bitField0_ |= 0x00000040; - httpErrorStatusCode_ = input.readInt32(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -825187174: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - insertTime_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - selfLink_ = s; - break; - } - case -310238534: - { - if (!((mutable_bitField0_ & 0x00400000) != 0)) { - warnings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00400000; - } - warnings_.add( - input.readMessage( - com.google.cloud.compute.v1.Warnings.parser(), extensionRegistry)); - 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_ & 0x00400000) != 0)) { - warnings_ = java.util.Collections.unmodifiableList(warnings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Operation_descriptor; @@ -1924,7 +1705,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < warnings_.size(); i++) { output.writeMessage(498091095, warnings_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2009,7 +1790,7 @@ public int getSerializedSize() { for (int i = 0; i < warnings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(498091095, warnings_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2117,7 +1898,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2224,7 +2005,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2421,10 +2202,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00200000); if (warningsBuilder_ == null) { warnings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00400000); } else { + warnings_ = null; warningsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00400000); zone_ = ""; bitField0_ = (bitField0_ & ~0x00800000); return this; @@ -2741,7 +2523,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Operation other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2756,17 +2538,182 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Operation 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000080; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 26989658 + case 28794458: + { + user_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case 28794458 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 299738194: + { + startTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 299738194 + case 321369498: + { + operationGroupId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 321369498 + case 501370690: + { + targetLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00100000; + break; + } // case 501370690 + case 581308776: + { + progress_ = input.readInt32(); + bitField0_ |= 0x00002000; + break; + } // case 581308776 + case 774279234: + { + input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 774279234 + case 919510410: + { + endTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 919510410 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 1111570338 + case 1421203602: + { + operationType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 1421203602 + case 1450082192: + { + status_ = input.readEnum(); + bitField0_ |= 0x00020000; + break; + } // case 1450082192 + case 1620175562: + { + httpErrorMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1620175562 + case 2065323080: + { + targetId_ = input.readUInt64(); + bitField0_ |= 0x00080000; + break; + } // case 2065323080 + case -1917044934: + { + clientOperationId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1917044934 + case -1915542062: + { + statusMessage_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case -1915542062 + case -1796205728: + { + httpErrorStatusCode_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case -1796205728 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -825187174: + { + insertTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -825187174 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case -645248918 + case -310238534: + { + com.google.cloud.compute.v1.Warnings m = + input.readMessage( + com.google.cloud.compute.v1.Warnings.parser(), extensionRegistry); + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.add(m); + } else { + warningsBuilder_.addMessage(m); + } + break; + } // case -310238534 + 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.compute.v1.Operation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5778,7 +5725,18 @@ public Operation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Operation(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationAggregatedList.java index 53be6108debd..fc9ecc3cae6c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.OperationsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_OperationAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1157,7 +1044,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.OperationAggregatedList oth if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1172,18 +1059,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.OperationAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.OperationsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.OperationAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2232,7 +2180,18 @@ public OperationAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationList.java index 9a5221885e37..d6ee1aeace5e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Operation.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_OperationList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.OperationList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.OperationList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Operation m = + input.readMessage( + com.google.cloud.compute.v1.Operation.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.OperationList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public OperationList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationsScopedList.java index 3fb22e1888d3..39b7e8865b40 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationsScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OperationsScopedList( - 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 33472354: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - operations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - operations_.add( - input.readMessage( - com.google.cloud.compute.v1.Operation.parser(), extensionRegistry)); - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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)) { - operations_ = java.util.Collections.unmodifiableList(operations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_OperationsScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(50704284, getWarning()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +217,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(50704284, getWarning()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +238,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -327,7 +257,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -476,10 +406,11 @@ public Builder clear() { super.clear(); if (operationsBuilder_ == null) { operations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + operations_ = null; operationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -613,7 +544,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.OperationsScopedList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -628,17 +559,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.OperationsScopedList 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 33472354: + { + com.google.cloud.compute.v1.Operation m = + input.readMessage( + com.google.cloud.compute.v1.Operation.parser(), extensionRegistry); + if (operationsBuilder_ == null) { + ensureOperationsIsMutable(); + operations_.add(m); + } else { + operationsBuilder_.addMessage(m); + } + break; + } // case 33472354 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + 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.compute.v1.OperationsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1211,7 +1175,18 @@ public OperationsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OperationsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OutlierDetection.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OutlierDetection.java index 17cbb70c2e7b..eb36cc8a27b8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OutlierDetection.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OutlierDetection.java @@ -50,132 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OutlierDetection( - 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 147495104: - { - bitField0_ |= 0x00000080; - maxEjectionPercent_ = input.readInt32(); - break; - } - case 268379690: - { - com.google.cloud.compute.v1.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = interval_.toBuilder(); - } - interval_ = - input.readMessage( - com.google.cloud.compute.v1.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(interval_); - interval_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case 647978042: - { - com.google.cloud.compute.v1.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = baseEjectionTime_.toBuilder(); - } - baseEjectionTime_ = - input.readMessage( - com.google.cloud.compute.v1.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(baseEjectionTime_); - baseEjectionTime_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1397886184: - { - bitField0_ |= 0x00000400; - successRateStdevFactor_ = input.readInt32(); - break; - } - case 1556069856: - { - bitField0_ |= 0x00000020; - enforcingSuccessRate_ = input.readInt32(); - break; - } - case 1705070080: - { - bitField0_ |= 0x00000008; - enforcingConsecutiveErrors_ = input.readInt32(); - break; - } - case -2043564440: - { - bitField0_ |= 0x00000200; - successRateRequestVolume_ = input.readInt32(); - break; - } - case -1197421312: - { - bitField0_ |= 0x00000002; - consecutiveErrors_ = input.readInt32(); - break; - } - case -1139441968: - { - bitField0_ |= 0x00000010; - enforcingConsecutiveGatewayFailure_ = input.readInt32(); - break; - } - case -954933296: - { - bitField0_ |= 0x00000004; - consecutiveGatewayFailure_ = input.readInt32(); - break; - } - case -88832072: - { - bitField0_ |= 0x00000100; - successRateMinimumHosts_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_OutlierDetection_descriptor; @@ -636,7 +510,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { output.writeInt32(525766903, successRateMinimumHosts_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -692,7 +566,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 525766903, successRateMinimumHosts_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -754,7 +628,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSuccessRateStdevFactor()) { if (getSuccessRateStdevFactor() != other.getSuccessRateStdevFactor()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -809,7 +683,7 @@ public int hashCode() { hash = (37 * hash) + SUCCESS_RATE_STDEV_FACTOR_FIELD_NUMBER; hash = (53 * hash) + getSuccessRateStdevFactor(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1151,7 +1025,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.OutlierDetection other) { if (other.hasSuccessRateStdevFactor()) { setSuccessRateStdevFactor(other.getSuccessRateStdevFactor()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1166,17 +1040,98 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.OutlierDetection 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 147495104: + { + maxEjectionPercent_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 147495104 + case 268379690: + { + input.readMessage(getIntervalFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 268379690 + case 647978042: + { + input.readMessage( + getBaseEjectionTimeFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 647978042 + case 1397886184: + { + successRateStdevFactor_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 1397886184 + case 1556069856: + { + enforcingSuccessRate_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 1556069856 + case 1705070080: + { + enforcingConsecutiveErrors_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 1705070080 + case -2043564440: + { + successRateRequestVolume_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case -2043564440 + case -1197421312: + { + consecutiveErrors_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case -1197421312 + case -1139441968: + { + enforcingConsecutiveGatewayFailure_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case -1139441968 + case -954933296: + { + consecutiveGatewayFailure_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case -954933296 + case -88832072: + { + successRateMinimumHosts_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case -88832072 + 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.compute.v1.OutlierDetection) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2190,7 +2145,18 @@ public OutlierDetection parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OutlierDetection(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketIntervals.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketIntervals.java index f64f145e5102..d27e691db3c1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketIntervals.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketIntervals.java @@ -53,84 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketIntervals( - 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 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - type_ = s; - break; - } - case 1243770018: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - duration_ = s; - break; - } - case 1490638504: - { - bitField0_ |= 0x00000010; - numIntervals_ = input.readInt64(); - break; - } - case 1638494616: - { - bitField0_ |= 0x00000001; - avgMs_ = input.readInt64(); - break; - } - case -59174136: - { - bitField0_ |= 0x00000004; - maxMs_ = input.readInt64(); - break; - } - case -2452072: - { - bitField0_ |= 0x00000008; - minMs_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketIntervals_descriptor; @@ -783,7 +705,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeInt64(536564403, minMs_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -810,7 +732,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(536564403, minMs_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -850,7 +772,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -885,7 +807,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1014,17 +936,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PacketIntervals.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 @@ -1167,7 +1082,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PacketIntervals other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1182,17 +1097,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketIntervals 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 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 28604882 + case 1243770018: + { + duration_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1243770018 + case 1490638504: + { + numIntervals_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 1490638504 + case 1638494616: + { + avgMs_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 1638494616 + case -59174136: + { + maxMs_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case -59174136 + case -2452072: + { + minMs_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case -2452072 + 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.compute.v1.PacketIntervals) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1750,7 +1715,18 @@ public PacketIntervals parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketIntervals(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroring.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroring.java index 0a9852f39e0d..d5e5ea1ae4cb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroring.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroring.java @@ -58,177 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketMirroring( - 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 26840: - { - bitField0_ |= 0x00000020; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 998538786: - { - com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfo.Builder subBuilder = - null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = mirroredResources_.toBuilder(); - } - mirroredResources_ = - input.readMessage( - com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(mirroredResources_); - mirroredResources_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - region_ = s; - break; - } - case 1862979954: - { - com.google.cloud.compute.v1.PacketMirroringNetworkInfo.Builder subBuilder = null; - if (((bitField0_ & 0x00000200) != 0)) { - subBuilder = network_.toBuilder(); - } - network_ = - input.readMessage( - com.google.cloud.compute.v1.PacketMirroringNetworkInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(network_); - network_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000200; - break; - } - case -1800852454: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - enable_ = s; - break; - } - case -1606001726: - { - com.google.cloud.compute.v1.PacketMirroringFilter.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = filter_.toBuilder(); - } - filter_ = - input.readMessage( - com.google.cloud.compute.v1.PacketMirroringFilter.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(filter_); - filter_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -882104470: - { - com.google.cloud.compute.v1.PacketMirroringForwardingRuleInfo.Builder subBuilder = - null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = collectorIlb_.toBuilder(); - } - collectorIlb_ = - input.readMessage( - com.google.cloud.compute.v1.PacketMirroringForwardingRuleInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(collectorIlb_); - collectorIlb_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -733754080: - { - bitField0_ |= 0x00000400; - priority_ = input.readUInt32(); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketMirroring_descriptor; @@ -1154,7 +983,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00001000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1206,7 +1035,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00001000) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1274,7 +1103,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSelfLink()) { if (!getSelfLink().equals(other.getSelfLink())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1337,7 +1166,7 @@ public int hashCode() { hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; hash = (53 * hash) + getSelfLink().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1729,7 +1558,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PacketMirroring other) { selfLink_ = other.selfLink_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1744,17 +1573,110 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketMirroring 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 998538786: + { + input.readMessage( + getMirroredResourcesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 998538786 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1111570338 + case 1862979954: + { + input.readMessage(getNetworkFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case 1862979954 + case -1800852454: + { + enable_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -1800852454 + case -1606001726: + { + input.readMessage(getFilterFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case -1606001726 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -882104470: + { + input.readMessage(getCollectorIlbFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -882104470 + case -733754080: + { + priority_ = input.readUInt32(); + bitField0_ |= 0x00000400; + break; + } // case -733754080 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case -645248918 + 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.compute.v1.PacketMirroring) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3580,7 +3502,18 @@ public PacketMirroring parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketMirroring(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringAggregatedList.java index 475e604b1369..4f12da1a3b69 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringAggregatedList.java @@ -56,119 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketMirroringAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.PacketMirroringsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketMirroringAggregatedList_descriptor; @@ -711,7 +598,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -756,7 +643,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -794,7 +681,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -833,7 +720,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1163,7 +1050,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PacketMirroringAggregatedLi if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1178,18 +1065,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketMirroringAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.PacketMirroringsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.PacketMirroringAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2247,7 +2195,18 @@ public PacketMirroringAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketMirroringAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringFilter.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringFilter.java index 46acb760ae57..ada39c96d59d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringFilter.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringFilter.java @@ -53,79 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketMirroringFilter( - 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 788358834: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - iPProtocols_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - iPProtocols_.add(s); - break; - } - case 889207802: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - direction_ = s; - break; - } - case -391753718: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - cidrRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - cidrRanges_.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)) { - iPProtocols_ = iPProtocols_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - cidrRanges_ = cidrRanges_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketMirroringFilter_descriptor; @@ -535,7 +462,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < cidrRanges_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 487901697, cidrRanges_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -563,7 +490,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getCidrRangesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -585,7 +512,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDirection()) { if (!getDirection().equals(other.getDirection())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -608,7 +535,7 @@ public int hashCode() { hash = (37 * hash) + DIRECTION_FIELD_NUMBER; hash = (53 * hash) + getDirection().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -736,17 +663,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PacketMirroringFilter.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 @@ -877,7 +797,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PacketMirroringFilter other direction_ = other.direction_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -892,18 +812,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketMirroringFilter 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 788358834: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIPProtocolsIsMutable(); + iPProtocols_.add(s); + break; + } // case 788358834 + case 889207802: + { + direction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 889207802 + case -391753718: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCidrRangesIsMutable(); + cidrRanges_.add(s); + break; + } // case -391753718 + 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.compute.v1.PacketMirroringFilter) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1403,7 +1356,18 @@ public PacketMirroringFilter parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketMirroringFilter(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringForwardingRuleInfo.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringForwardingRuleInfo.java index 6cc85dc18bee..e0d44d7ddc9d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringForwardingRuleInfo.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringForwardingRuleInfo.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketMirroringForwardingRuleInfo( - 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 928634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - url_ = s; - break; - } - case -196608734: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - canonicalUrl_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketMirroringForwardingRuleInfo_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 512294820, canonicalUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(512294820, canonicalUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrl()) { if (!getUrl().equals(other.getUrl())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +275,7 @@ public int hashCode() { hash = (37 * hash) + URL_FIELD_NUMBER; hash = (53 * hash) + getUrl().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PacketMirroringForwardingRuleInfo.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 @@ -578,7 +517,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PacketMirroringForwardingRu url_ = other.url_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -593,19 +532,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketMirroringForwardingRuleInfo 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 928634: + { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 928634 + case -196608734: + { + canonicalUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -196608734 + 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.compute.v1.PacketMirroringForwardingRuleInfo) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -884,7 +847,18 @@ public PacketMirroringForwardingRuleInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketMirroringForwardingRuleInfo(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringList.java index 6fb53f817325..9b0a98eff3e6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketMirroringList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.PacketMirroring.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketMirroringList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PacketMirroringList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,17 +921,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketMirroringList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.PacketMirroring m = + input.readMessage( + com.google.cloud.compute.v1.PacketMirroring.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.PacketMirroringList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2081,7 +2041,18 @@ public PacketMirroringList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketMirroringList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfo.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfo.java index ad67041a535d..50a8bca433fb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfo.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfo.java @@ -55,97 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketMirroringMirroredResourceInfo( - 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 28418250: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - tags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - tags_.add(s); - break; - } - case 232780786: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .PacketMirroringMirroredResourceInfoInstanceInfo>(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage( - com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo - .parser(), - extensionRegistry)); - break; - } - case -968142294: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - subnetworks_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .PacketMirroringMirroredResourceInfoSubnetInfo>(); - mutable_bitField0_ |= 0x00000002; - } - subnetworks_.add( - input.readMessage( - com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo - .parser(), - extensionRegistry)); - 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_ & 0x00000004) != 0)) { - tags_ = tags_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - subnetworks_ = java.util.Collections.unmodifiableList(subnetworks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfo_descriptor; @@ -416,7 +325,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < subnetworks_.size(); i++) { output.writeMessage(415853125, subnetworks_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -440,7 +349,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(415853125, subnetworks_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -459,7 +368,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstancesList().equals(other.getInstancesList())) return false; if (!getSubnetworksList().equals(other.getSubnetworksList())) return false; if (!getTagsList().equals(other.getTagsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -482,7 +391,7 @@ public int hashCode() { hash = (37 * hash) + TAGS_FIELD_NUMBER; hash = (53 * hash) + getTagsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -611,20 +520,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfo.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) { - getInstancesFieldBuilder(); - getSubnetworksFieldBuilder(); - } } @java.lang.Override @@ -632,16 +531,18 @@ public Builder clear() { super.clear(); if (instancesBuilder_ == null) { instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instances_ = null; instancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (subnetworksBuilder_ == null) { subnetworks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + subnetworks_ = null; subnetworksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); tags_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; @@ -812,7 +713,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -827,19 +728,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfo 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 28418250: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 28418250 + case 232780786: + { + com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo m = + input.readMessage( + com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo + .parser(), + extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 232780786 + case -968142294: + { + com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo m = + input.readMessage( + com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo + .parser(), + extensionRegistry); + if (subnetworksBuilder_ == null) { + ensureSubnetworksIsMutable(); + subnetworks_.add(m); + } else { + subnetworksBuilder_.addMessage(m); + } + break; + } // case -968142294 + 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.compute.v1.PacketMirroringMirroredResourceInfo) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1883,7 +1833,18 @@ public PacketMirroringMirroredResourceInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketMirroringMirroredResourceInfo(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfoInstanceInfo.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfoInstanceInfo.java index c1dd238faf42..fe26ae106584 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfoInstanceInfo.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfoInstanceInfo.java @@ -54,60 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketMirroringMirroredResourceInfoInstanceInfo( - 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 928634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - url_ = s; - break; - } - case -196608734: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - canonicalUrl_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfoInstanceInfo_descriptor; @@ -273,7 +219,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 512294820, canonicalUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +234,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(512294820, canonicalUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +259,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrl()) { if (!getUrl().equals(other.getUrl())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -332,7 +278,7 @@ public int hashCode() { hash = (37 * hash) + URL_FIELD_NUMBER; hash = (53 * hash) + getUrl().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -469,17 +415,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo.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 @@ -595,7 +534,7 @@ public Builder mergeFrom( url_ = other.url_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,20 +549,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo 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 928634: + { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 928634 + case -196608734: + { + canonicalUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -196608734 + 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.compute.v1.PacketMirroringMirroredResourceInfoInstanceInfo) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -906,7 +868,19 @@ public PacketMirroringMirroredResourceInfoInstanceInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketMirroringMirroredResourceInfoInstanceInfo(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfoSubnetInfo.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfoSubnetInfo.java index 2170a49fe0f6..d19b2fb57436 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfoSubnetInfo.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringMirroredResourceInfoSubnetInfo.java @@ -54,60 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketMirroringMirroredResourceInfoSubnetInfo( - 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 928634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - url_ = s; - break; - } - case -196608734: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - canonicalUrl_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketMirroringMirroredResourceInfoSubnetInfo_descriptor; @@ -273,7 +219,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 512294820, canonicalUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +234,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(512294820, canonicalUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +259,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrl()) { if (!getUrl().equals(other.getUrl())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -332,7 +278,7 @@ public int hashCode() { hash = (37 * hash) + URL_FIELD_NUMBER; hash = (53 * hash) + getUrl().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -464,17 +410,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo.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 @@ -590,7 +529,7 @@ public Builder mergeFrom( url_ = other.url_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -605,20 +544,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo 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 928634: + { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 928634 + case -196608734: + { + canonicalUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -196608734 + 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.compute.v1.PacketMirroringMirroredResourceInfoSubnetInfo) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -900,7 +862,19 @@ public PacketMirroringMirroredResourceInfoSubnetInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketMirroringMirroredResourceInfoSubnetInfo(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringNetworkInfo.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringNetworkInfo.java index 6783bcf7ecc2..5e0a79aa1e22 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringNetworkInfo.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringNetworkInfo.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketMirroringNetworkInfo( - 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 928634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - url_ = s; - break; - } - case -196608734: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - canonicalUrl_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketMirroringNetworkInfo_descriptor; @@ -270,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 512294820, canonicalUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -285,7 +231,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(512294820, canonicalUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrl()) { if (!getUrl().equals(other.getUrl())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + URL_FIELD_NUMBER; hash = (53 * hash) + getUrl().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -457,17 +403,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PacketMirroringNetworkInfo.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 @@ -575,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PacketMirroringNetworkInfo url_ = other.url_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,18 +529,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketMirroringNetworkInfo 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 928634: + { + url_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 928634 + case -196608734: + { + canonicalUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -196608734 + 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.compute.v1.PacketMirroringNetworkInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -879,7 +843,18 @@ public PacketMirroringNetworkInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketMirroringNetworkInfo(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringsScopedList.java index ec6da0b23ea8..226cca1f7b84 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PacketMirroringsScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PacketMirroringsScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1236920634: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - packetMirrorings_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - packetMirrorings_.add( - input.readMessage( - com.google.cloud.compute.v1.PacketMirroring.parser(), extensionRegistry)); - 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)) { - packetMirrorings_ = java.util.Collections.unmodifiableList(packetMirrorings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PacketMirroringsScopedList_descriptor; @@ -274,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < packetMirrorings_.size(); i++) { output.writeMessage(154615079, packetMirrorings_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +220,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 154615079, packetMirrorings_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,10 +410,11 @@ public Builder clear() { super.clear(); if (packetMirroringsBuilder_ == null) { packetMirrorings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + packetMirrorings_ = null; packetMirroringsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -618,7 +548,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PacketMirroringsScopedList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,18 +563,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PacketMirroringsScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 1236920634: + { + com.google.cloud.compute.v1.PacketMirroring m = + input.readMessage( + com.google.cloud.compute.v1.PacketMirroring.parser(), extensionRegistry); + if (packetMirroringsBuilder_ == null) { + ensurePacketMirroringsIsMutable(); + packetMirrorings_.add(m); + } else { + packetMirroringsBuilder_.addMessage(m); + } + break; + } // case 1236920634 + 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.compute.v1.PacketMirroringsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1189,18 @@ public PacketMirroringsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PacketMirroringsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchAutoscalerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchAutoscalerRequest.java index aab7a8396590..14c0e5830d1a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchAutoscalerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchAutoscalerRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchAutoscalerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1660928946: - { - com.google.cloud.compute.v1.Autoscaler.Builder subBuilder = null; - if (autoscalerResource_ != null) { - subBuilder = autoscalerResource_.toBuilder(); - } - autoscalerResource_ = - input.readMessage( - com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalerResource_); - autoscalerResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -156895558: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - autoscaler_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchAutoscalerRequest_descriptor; @@ -472,7 +388,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517258967, autoscaler_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -498,7 +414,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517258967, autoscaler_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -528,7 +444,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -555,7 +471,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -684,17 +600,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchAutoscalerRequest.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 @@ -830,7 +739,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchAutoscalerRequest othe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -845,18 +754,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchAutoscalerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1660928946: + { + input.readMessage( + getAutoscalerResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1660928946 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -156895558: + { + autoscaler_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -156895558 + 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.compute.v1.PatchAutoscalerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1570,7 +1523,18 @@ public PatchAutoscalerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchAutoscalerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchBackendBucketRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchBackendBucketRequest.java index 3bc8a724325f..6f7392be4df3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchBackendBucketRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchBackendBucketRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchBackendBucketRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 733712298: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendBucket_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1248905022: - { - com.google.cloud.compute.v1.BackendBucket.Builder subBuilder = null; - if (backendBucketResource_ != null) { - subBuilder = backendBucketResource_.toBuilder(); - } - backendBucketResource_ = - input.readMessage( - com.google.cloud.compute.v1.BackendBucket.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backendBucketResource_); - backendBucketResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchBackendBucketRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backendBucketResource_ != null) { output.writeMessage(380757784, getBackendBucketResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +339,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 380757784, getBackendBucketResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -595,17 +518,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchBackendBucketRequest.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 @@ -730,7 +646,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchBackendBucketRequest o requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -745,18 +661,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchBackendBucketRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 733712298: + { + backendBucket_ = input.readStringRequireUtf8(); + + break; + } // case 733712298 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1248905022: + { + input.readMessage( + getBackendBucketResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1248905022 + 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.compute.v1.PatchBackendBucketRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1340,7 +1294,18 @@ public PatchBackendBucketRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchBackendBucketRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchBackendServiceRequest.java index 310a49d690e5..f2e4e663b71a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchBackendServiceRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = s; - break; - } - case -1514273510: - { - com.google.cloud.compute.v1.BackendService.Builder subBuilder = null; - if (backendServiceResource_ != null) { - subBuilder = backendServiceResource_.toBuilder(); - } - backendServiceResource_ = - input.readMessage( - com.google.cloud.compute.v1.BackendService.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backendServiceResource_); - backendServiceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchBackendServiceRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backendServiceResource_ != null) { output.writeMessage(347586723, getBackendServiceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +339,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 347586723, getBackendServiceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -595,17 +518,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchBackendServiceRequest.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 @@ -730,7 +646,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchBackendServiceRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -745,18 +661,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + case -1514273510: + { + input.readMessage( + getBackendServiceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1514273510 + 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.compute.v1.PatchBackendServiceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1341,7 +1295,18 @@ public PatchBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchFirewallPolicyRequest.java index 9bc920e1d8e1..cbde8d5d5ff5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchFirewallPolicyRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case -334571038: - { - com.google.cloud.compute.v1.FirewallPolicy.Builder subBuilder = null; - if (firewallPolicyResource_ != null) { - subBuilder = firewallPolicyResource_.toBuilder(); - } - firewallPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyResource_); - firewallPolicyResource_ = subBuilder.buildPartial(); - } - - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchFirewallPolicyRequest_descriptor; @@ -329,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -349,7 +279,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -374,7 +304,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -395,7 +325,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -525,17 +455,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchFirewallPolicyRequest.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 +576,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchFirewallPolicyRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -668,18 +591,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case -334571038: + { + input.readMessage( + getFirewallPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -334571038 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.PatchFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1148,7 +1103,18 @@ public PatchFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchFirewallRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchFirewallRequest.java index bbc567578eff..e0e2bf99e5ae 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchFirewallRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchFirewallRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchFirewallRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 331400042: - { - com.google.cloud.compute.v1.Firewall.Builder subBuilder = null; - if (firewallResource_ != null) { - subBuilder = firewallResource_.toBuilder(); - } - firewallResource_ = - input.readMessage( - com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallResource_); - firewallResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -206837758: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewall_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchFirewallRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewall_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 511016192, firewall_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -415,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewall_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(511016192, firewall_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -441,7 +364,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -464,7 +387,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -593,17 +516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchFirewallRequest.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 @@ -728,7 +644,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchFirewallRequest other) requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -743,17 +659,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchFirewallRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 331400042: + { + input.readMessage( + getFirewallResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 331400042 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -206837758: + { + firewall_ = input.readStringRequireUtf8(); + + break; + } // case -206837758 + 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.compute.v1.PatchFirewallRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1337,7 +1292,18 @@ public PatchFirewallRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchFirewallRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchForwardingRuleRequest.java index f2aa27002813..231bd01d3642 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchForwardingRuleRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchForwardingRuleRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2135255054: - { - java.lang.String s = input.readStringRequireUtf8(); - - forwardingRule_ = s; - break; - } - case -1885273734: - { - com.google.cloud.compute.v1.ForwardingRule.Builder subBuilder = null; - if (forwardingRuleResource_ != null) { - subBuilder = forwardingRuleResource_.toBuilder(); - } - forwardingRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.ForwardingRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(forwardingRuleResource_); - forwardingRuleResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchForwardingRuleRequest_descriptor; @@ -457,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (forwardingRuleResource_ != null) { output.writeMessage(301211695, getForwardingRuleResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -483,7 +399,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 301211695, getForwardingRuleResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -510,7 +426,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -535,7 +451,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -665,17 +581,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchForwardingRuleRequest.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 @@ -807,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchForwardingRuleRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -822,18 +731,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchForwardingRuleRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2135255054: + { + forwardingRule_ = input.readStringRequireUtf8(); + + break; + } // case -2135255054 + case -1885273734: + { + input.readMessage( + getForwardingRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1885273734 + 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.compute.v1.PatchForwardingRuleRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1534,7 +1487,18 @@ public PatchForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchGlobalForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchGlobalForwardingRuleRequest.java index 287edaf83ad7..c7c6d55ca8dc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchGlobalForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchGlobalForwardingRuleRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchGlobalForwardingRuleRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2135255054: - { - java.lang.String s = input.readStringRequireUtf8(); - - forwardingRule_ = s; - break; - } - case -1885273734: - { - com.google.cloud.compute.v1.ForwardingRule.Builder subBuilder = null; - if (forwardingRuleResource_ != null) { - subBuilder = forwardingRuleResource_.toBuilder(); - } - forwardingRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.ForwardingRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(forwardingRuleResource_); - forwardingRuleResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchGlobalForwardingRuleRequest_descriptor; @@ -394,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (forwardingRuleResource_ != null) { output.writeMessage(301211695, getForwardingRuleResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +340,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 301211695, getForwardingRuleResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -443,7 +366,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -466,7 +389,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +519,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest.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 @@ -733,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchGlobalForwardingRuleRe requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,18 +664,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchGlobalForwardingRuleRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2135255054: + { + forwardingRule_ = input.readStringRequireUtf8(); + + break; + } // case -2135255054 + case -1885273734: + { + input.readMessage( + getForwardingRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1885273734 + 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.compute.v1.PatchGlobalForwardingRuleRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1345,7 +1299,18 @@ public PatchGlobalForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchGlobalForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchGlobalPublicDelegatedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchGlobalPublicDelegatedPrefixeRequest.java index 0e124671fb20..4478d4be2475 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchGlobalPublicDelegatedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchGlobalPublicDelegatedPrefixeRequest.java @@ -56,84 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchGlobalPublicDelegatedPrefixeRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 380756010: - { - com.google.cloud.compute.v1.PublicDelegatedPrefix.Builder subBuilder = null; - if (publicDelegatedPrefixResource_ != null) { - subBuilder = publicDelegatedPrefixResource_.toBuilder(); - } - publicDelegatedPrefixResource_ = - input.readMessage( - com.google.cloud.compute.v1.PublicDelegatedPrefix.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(publicDelegatedPrefixResource_); - publicDelegatedPrefixResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1633907522: - { - java.lang.String s = input.readStringRequireUtf8(); - - publicDelegatedPrefix_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchGlobalPublicDelegatedPrefixeRequest_descriptor; @@ -399,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +346,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +374,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -475,7 +397,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -607,17 +529,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest.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 @@ -747,7 +662,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -762,19 +677,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 380756010: + { + input.readMessage( + getPublicDelegatedPrefixResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 380756010 + case 1633907522: + { + publicDelegatedPrefix_ = input.readStringRequireUtf8(); + + break; + } // case 1633907522 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.PatchGlobalPublicDelegatedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1371,7 +1323,18 @@ public PatchGlobalPublicDelegatedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchGlobalPublicDelegatedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchHealthCheckRequest.java index c179448cb700..35a6729b77be 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchHealthCheckRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchHealthCheckRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1615400258: - { - com.google.cloud.compute.v1.HealthCheck.Builder subBuilder = null; - if (healthCheckResource_ != null) { - subBuilder = healthCheckResource_.toBuilder(); - } - healthCheckResource_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(healthCheckResource_); - healthCheckResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheck_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchHealthCheckRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 308876645, healthCheck_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +339,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(308876645, healthCheck_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -594,17 +517,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchHealthCheckRequest.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 +645,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchHealthCheckRequest oth requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,18 +660,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchHealthCheckRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1615400258: + { + input.readMessage( + getHealthCheckResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1615400258 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + + break; + } // case -1823954134 + 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.compute.v1.PatchHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1339,7 +1293,18 @@ public PatchHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchImageRequest.java index 278ca38b6447..d91f88d8cde2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchImageRequest.java @@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchImageRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 802507482: - { - java.lang.String s = input.readStringRequireUtf8(); - - image_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1325591662: - { - com.google.cloud.compute.v1.Image.Builder subBuilder = null; - if (imageResource_ != null) { - subBuilder = imageResource_.toBuilder(); - } - imageResource_ = - input.readMessage(com.google.cloud.compute.v1.Image.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(imageResource_); - imageResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchImageRequest_descriptor; @@ -392,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (imageResource_ != null) { output.writeMessage(371171954, getImageResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -414,7 +338,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(371171954, getImageResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -440,7 +364,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -463,7 +387,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -592,17 +516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchImageRequest.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 @@ -726,7 +643,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchImageRequest other) { requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -741,17 +658,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchImageRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 802507482: + { + image_ = input.readStringRequireUtf8(); + + break; + } // case 802507482 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1325591662: + { + input.readMessage(getImageResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1325591662 + 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.compute.v1.PatchImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1334,7 +1289,18 @@ public PatchImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInstanceGroupManagerRequest.java index a591a21dbc0f..8c1e8aecbdeb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInstanceGroupManagerRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case 2088511570: - { - com.google.cloud.compute.v1.InstanceGroupManager.Builder subBuilder = null; - if (instanceGroupManagerResource_ != null) { - subBuilder = instanceGroupManagerResource_.toBuilder(); - } - instanceGroupManagerResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManager.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagerResource_); - instanceGroupManagerResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchInstanceGroupManagerRequest_descriptor; @@ -461,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupManagerResource_ != null) { output.writeMessage(261063946, getInstanceGroupManagerResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +405,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 261063946, getInstanceGroupManagerResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -517,7 +433,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -542,7 +458,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -672,17 +588,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchInstanceGroupManagerRequest.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 @@ -816,7 +725,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchInstanceGroupManagerRe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -831,18 +740,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case 2088511570: + { + input.readMessage( + getInstanceGroupManagerResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 2088511570 + 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.compute.v1.PatchInstanceGroupManagerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1553,7 +1506,18 @@ public PatchInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInterconnectAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInterconnectAttachmentRequest.java index c4b29e56601e..a9d99634fece 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInterconnectAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInterconnectAttachmentRequest.java @@ -56,91 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchInterconnectAttachmentRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1698730954: - { - com.google.cloud.compute.v1.InterconnectAttachment.Builder subBuilder = null; - if (interconnectAttachmentResource_ != null) { - subBuilder = interconnectAttachmentResource_.toBuilder(); - } - interconnectAttachmentResource_ = - input.readMessage( - com.google.cloud.compute.v1.InterconnectAttachment.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(interconnectAttachmentResource_); - interconnectAttachmentResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1829885022: - { - java.lang.String s = input.readStringRequireUtf8(); - - interconnectAttachment_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchInterconnectAttachmentRequest_descriptor; @@ -463,7 +378,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 308135284, interconnectAttachment_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -491,7 +406,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 308135284, interconnectAttachment_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -520,7 +435,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -545,7 +460,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -675,17 +590,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchInterconnectAttachmentRequest.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 @@ -819,7 +727,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchInterconnectAttachment requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -834,19 +742,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchInterconnectAttachmentRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1698730954: + { + input.readMessage( + getInterconnectAttachmentResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1698730954 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1829885022: + { + interconnectAttachment_ = input.readStringRequireUtf8(); + + break; + } // case -1829885022 + 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.compute.v1.PatchInterconnectAttachmentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1559,7 +1511,18 @@ public PatchInterconnectAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchInterconnectAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInterconnectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInterconnectRequest.java index d0081056730c..853d528de2c1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInterconnectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchInterconnectRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchInterconnectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1796809842: - { - java.lang.String s = input.readStringRequireUtf8(); - - interconnect_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1114077958: - { - com.google.cloud.compute.v1.Interconnect.Builder subBuilder = null; - if (interconnectResource_ != null) { - subBuilder = interconnectResource_.toBuilder(); - } - interconnectResource_ = - input.readMessage( - com.google.cloud.compute.v1.Interconnect.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(interconnectResource_); - interconnectResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchInterconnectRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (interconnectResource_ != null) { output.writeMessage(397611167, getInterconnectResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +339,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 397611167, getInterconnectResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -594,17 +517,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchInterconnectRequest.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 +645,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchInterconnectRequest ot requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,18 +660,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchInterconnectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1796809842: + { + interconnect_ = input.readStringRequireUtf8(); + + break; + } // case 1796809842 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1114077958: + { + input.readMessage( + getInterconnectResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1114077958 + 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.compute.v1.PatchInterconnectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1339,7 +1293,18 @@ public PatchInterconnectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchInterconnectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkEdgeSecurityServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkEdgeSecurityServiceRequest.java index 19f936d37211..f4aeb4eba838 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkEdgeSecurityServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkEdgeSecurityServiceRequest.java @@ -59,105 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchNetworkEdgeSecurityServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 851511154: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - paths_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1256095034: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkEdgeSecurityService_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -474575566: - { - com.google.cloud.compute.v1.NetworkEdgeSecurityService.Builder subBuilder = null; - if (networkEdgeSecurityServiceResource_ != null) { - subBuilder = networkEdgeSecurityServiceResource_.toBuilder(); - } - networkEdgeSecurityServiceResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkEdgeSecurityService.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkEdgeSecurityServiceResource_); - networkEdgeSecurityServiceResource_ = subBuilder.buildPartial(); - } - - break; - } - case -294329070: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - updateMask_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchNetworkEdgeSecurityServiceRequest_descriptor; @@ -600,7 +501,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 500079778, updateMask_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -634,7 +535,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(500079778, updateMask_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -672,7 +573,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; } @@ -705,7 +606,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; } @@ -837,17 +738,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PatchNetworkEdgeSecurityServiceRequest.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 @@ -1007,7 +901,7 @@ public Builder mergeFrom( updateMask_ = other.updateMask_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1022,19 +916,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchNetworkEdgeSecurityServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 851511154: + { + paths_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 851511154 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1256095034: + { + networkEdgeSecurityService_ = input.readStringRequireUtf8(); + + break; + } // case 1256095034 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -474575566: + { + input.readMessage( + getNetworkEdgeSecurityServiceResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -474575566 + case -294329070: + { + updateMask_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -294329070 + 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.compute.v1.PatchNetworkEdgeSecurityServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1958,7 +1908,18 @@ public PatchNetworkEdgeSecurityServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchNetworkEdgeSecurityServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkFirewallPolicyRequest.java index 6e57a9cc856e..f93a07c3e4d3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkFirewallPolicyRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -334571038: - { - com.google.cloud.compute.v1.FirewallPolicy.Builder subBuilder = null; - if (firewallPolicyResource_ != null) { - subBuilder = firewallPolicyResource_.toBuilder(); - } - firewallPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyResource_); - firewallPolicyResource_ = subBuilder.buildPartial(); - } - - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchNetworkFirewallPolicyRequest_descriptor; @@ -394,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +340,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -443,7 +366,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -466,7 +389,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +519,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchNetworkFirewallPolicyRequest.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 @@ -733,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchNetworkFirewallPolicyR requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,19 +664,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -334571038: + { + input.readMessage( + getFirewallPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -334571038 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.PatchNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1346,7 +1299,18 @@ public PatchNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkRequest.java index ceb37d2eed0f..b0a4f8abe459 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNetworkRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchNetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 976844794: - { - com.google.cloud.compute.v1.Network.Builder subBuilder = null; - if (networkResource_ != null) { - subBuilder = networkResource_.toBuilder(); - } - networkResource_ = - input.readMessage( - com.google.cloud.compute.v1.Network.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkResource_); - networkResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchNetworkRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -415,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -441,7 +364,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -464,7 +387,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -593,17 +516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchNetworkRequest.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 @@ -728,7 +644,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchNetworkRequest other) requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -743,17 +659,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchNetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 976844794: + { + input.readMessage(getNetworkResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 976844794 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 1862979954 + 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.compute.v1.PatchNetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1336,7 +1290,18 @@ public PatchNetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchNetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNodeGroupRequest.java index ca7e56faa117..04530a3591a0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNodeGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchNodeGroupRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchNodeGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -535302126: - { - java.lang.String s = input.readStringRequireUtf8(); - - nodeGroup_ = s; - break; - } - case -252392102: - { - com.google.cloud.compute.v1.NodeGroup.Builder subBuilder = null; - if (nodeGroupResource_ != null) { - subBuilder = nodeGroupResource_.toBuilder(); - } - nodeGroupResource_ = - input.readMessage( - com.google.cloud.compute.v1.NodeGroup.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(nodeGroupResource_); - nodeGroupResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchNodeGroupRequest_descriptor; @@ -457,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (nodeGroupResource_ != null) { output.writeMessage(505321899, getNodeGroupResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -483,7 +399,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 505321899, getNodeGroupResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -510,7 +426,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -535,7 +451,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -664,17 +580,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchNodeGroupRequest.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 @@ -806,7 +715,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchNodeGroupRequest other zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -821,18 +730,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchNodeGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -535302126: + { + nodeGroup_ = input.readStringRequireUtf8(); + + break; + } // case -535302126 + case -252392102: + { + input.readMessage( + getNodeGroupResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -252392102 + 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.compute.v1.PatchNodeGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1532,7 +1485,18 @@ public PatchNodeGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchNodeGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPacketMirroringRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPacketMirroringRequest.java index cd8089946bcc..bc7196928c16 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPacketMirroringRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPacketMirroringRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchPacketMirroringRequest( - 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 178447970: - { - java.lang.String s = input.readStringRequireUtf8(); - - packetMirroring_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -346951414: - { - com.google.cloud.compute.v1.PacketMirroring.Builder subBuilder = null; - if (packetMirroringResource_ != null) { - subBuilder = packetMirroringResource_.toBuilder(); - } - packetMirroringResource_ = - input.readMessage( - com.google.cloud.compute.v1.PacketMirroring.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(packetMirroringResource_); - packetMirroringResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchPacketMirroringRequest_descriptor; @@ -458,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (packetMirroringResource_ != null) { output.writeMessage(493501985, getPacketMirroringResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +400,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 493501985, getPacketMirroringResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -511,7 +427,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -536,7 +452,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -666,17 +582,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchPacketMirroringRequest.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 @@ -808,7 +717,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchPacketMirroringRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -823,18 +732,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchPacketMirroringRequest 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 178447970: + { + packetMirroring_ = input.readStringRequireUtf8(); + + break; + } // case 178447970 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -346951414: + { + input.readMessage( + getPacketMirroringResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -346951414 + 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.compute.v1.PatchPacketMirroringRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1535,7 +1488,18 @@ public PatchPacketMirroringRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchPacketMirroringRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPerInstanceConfigsInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPerInstanceConfigsInstanceGroupManagerRequest.java index 99c99799af2b..9ddbb2ed6ba0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPerInstanceConfigsInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPerInstanceConfigsInstanceGroupManagerRequest.java @@ -57,94 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchPerInstanceConfigsInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -1441763334: - { - com.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq.Builder - subBuilder = null; - if (instanceGroupManagersPatchPerInstanceConfigsReqResource_ != null) { - subBuilder = instanceGroupManagersPatchPerInstanceConfigsReqResource_.toBuilder(); - } - instanceGroupManagersPatchPerInstanceConfigsReqResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagersPatchPerInstanceConfigsReq - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagersPatchPerInstanceConfigsReqResource_); - instanceGroupManagersPatchPerInstanceConfigsReqResource_ = - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchPerInstanceConfigsInstanceGroupManagerRequest_descriptor; @@ -471,7 +383,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupManagersPatchPerInstanceConfigsReqResource_ != null) { output.writeMessage(356650495, getInstanceGroupManagersPatchPerInstanceConfigsReqResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -499,7 +411,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 356650495, getInstanceGroupManagersPatchPerInstanceConfigsReqResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -530,7 +442,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -557,7 +469,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -696,17 +608,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest.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 @@ -850,7 +755,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -865,20 +770,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -1441763334: + { + input.readMessage( + getInstanceGroupManagersPatchPerInstanceConfigsReqResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -1441763334 + 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.compute.v1.PatchPerInstanceConfigsInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1606,8 +1555,19 @@ public PatchPerInstanceConfigsInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchPerInstanceConfigsInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.java index 7089dd4c5492..e43a1068f00e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.java @@ -58,94 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchPerInstanceConfigsRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1581463122: - { - com.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq.Builder - subBuilder = null; - if (regionInstanceGroupManagerPatchInstanceConfigReqResource_ != null) { - subBuilder = regionInstanceGroupManagerPatchInstanceConfigReqResource_.toBuilder(); - } - regionInstanceGroupManagerPatchInstanceConfigReqResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupManagerPatchInstanceConfigReqResource_); - regionInstanceGroupManagerPatchInstanceConfigReqResource_ = - subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchPerInstanceConfigsRegionInstanceGroupManagerRequest_descriptor; @@ -473,7 +385,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -501,7 +413,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -533,7 +445,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -560,7 +472,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -702,17 +614,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.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 @@ -860,7 +765,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -875,20 +780,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest - 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1581463122: + { + input.readMessage( + getRegionInstanceGroupManagerPatchInstanceConfigReqResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 1581463122 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1617,8 +1566,19 @@ public PatchPerInstanceConfigsRegionInstanceGroupManagerRequest parsePartialFrom com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchPerInstanceConfigsRegionInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPublicAdvertisedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPublicAdvertisedPrefixeRequest.java index 949a0eb57821..01f93be82d8b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPublicAdvertisedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPublicAdvertisedPrefixeRequest.java @@ -56,84 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchPublicAdvertisedPrefixeRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 814996722: - { - java.lang.String s = input.readStringRequireUtf8(); - - publicAdvertisedPrefix_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1868913786: - { - com.google.cloud.compute.v1.PublicAdvertisedPrefix.Builder subBuilder = null; - if (publicAdvertisedPrefixResource_ != null) { - subBuilder = publicAdvertisedPrefixResource_.toBuilder(); - } - publicAdvertisedPrefixResource_ = - input.readMessage( - com.google.cloud.compute.v1.PublicAdvertisedPrefix.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(publicAdvertisedPrefixResource_); - publicAdvertisedPrefixResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchPublicAdvertisedPrefixeRequest_descriptor; @@ -400,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (publicAdvertisedPrefixResource_ != null) { output.writeMessage(233614223, getPublicAdvertisedPrefixResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -425,7 +347,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 233614223, getPublicAdvertisedPrefixResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -453,7 +375,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -476,7 +398,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -606,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest.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 @@ -744,7 +659,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -759,19 +674,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchPublicAdvertisedPrefixeRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 814996722: + { + publicAdvertisedPrefix_ = input.readStringRequireUtf8(); + + break; + } // case 814996722 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1868913786: + { + input.readMessage( + getPublicAdvertisedPrefixResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1868913786 + 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.compute.v1.PatchPublicAdvertisedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1368,7 +1321,18 @@ public PatchPublicAdvertisedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchPublicAdvertisedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPublicDelegatedPrefixeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPublicDelegatedPrefixeRequest.java index 77d4496b91a6..1ceab498486b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPublicDelegatedPrefixeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchPublicDelegatedPrefixeRequest.java @@ -56,91 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchPublicDelegatedPrefixeRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 380756010: - { - com.google.cloud.compute.v1.PublicDelegatedPrefix.Builder subBuilder = null; - if (publicDelegatedPrefixResource_ != null) { - subBuilder = publicDelegatedPrefixResource_.toBuilder(); - } - publicDelegatedPrefixResource_ = - input.readMessage( - com.google.cloud.compute.v1.PublicDelegatedPrefix.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(publicDelegatedPrefixResource_); - publicDelegatedPrefixResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1633907522: - { - java.lang.String s = input.readStringRequireUtf8(); - - publicDelegatedPrefix_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchPublicDelegatedPrefixeRequest_descriptor; @@ -462,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -490,7 +405,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -519,7 +434,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -544,7 +459,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -674,17 +589,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest.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 @@ -818,7 +726,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchPublicDelegatedPrefixe requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -833,19 +741,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchPublicDelegatedPrefixeRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 380756010: + { + input.readMessage( + getPublicDelegatedPrefixResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 380756010 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1633907522: + { + publicDelegatedPrefix_ = input.readStringRequireUtf8(); + + break; + } // case 1633907522 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.PatchPublicDelegatedPrefixeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1558,7 +1509,18 @@ public PatchPublicDelegatedPrefixeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchPublicDelegatedPrefixeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionAutoscalerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionAutoscalerRequest.java index 2fc71d7dbc39..46c3fa9638d8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionAutoscalerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionAutoscalerRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRegionAutoscalerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1660928946: - { - com.google.cloud.compute.v1.Autoscaler.Builder subBuilder = null; - if (autoscalerResource_ != null) { - subBuilder = autoscalerResource_.toBuilder(); - } - autoscalerResource_ = - input.readMessage( - com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalerResource_); - autoscalerResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -156895558: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - autoscaler_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRegionAutoscalerRequest_descriptor; @@ -472,7 +388,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517258967, autoscaler_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -498,7 +414,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517258967, autoscaler_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -528,7 +444,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -555,7 +471,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -685,17 +601,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRegionAutoscalerRequest.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 @@ -831,7 +740,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchRegionAutoscalerReques requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -846,18 +755,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRegionAutoscalerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1660928946: + { + input.readMessage( + getAutoscalerResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1660928946 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -156895558: + { + autoscaler_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -156895558 + 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.compute.v1.PatchRegionAutoscalerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1571,7 +1524,18 @@ public PatchRegionAutoscalerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRegionAutoscalerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionBackendServiceRequest.java index f09eec449067..ba96694e7680 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionBackendServiceRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRegionBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = s; - break; - } - case -1514273510: - { - com.google.cloud.compute.v1.BackendService.Builder subBuilder = null; - if (backendServiceResource_ != null) { - subBuilder = backendServiceResource_.toBuilder(); - } - backendServiceResource_ = - input.readMessage( - com.google.cloud.compute.v1.BackendService.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backendServiceResource_); - backendServiceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRegionBackendServiceRequest_descriptor; @@ -458,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backendServiceResource_ != null) { output.writeMessage(347586723, getBackendServiceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +400,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 347586723, getBackendServiceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -511,7 +427,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -536,7 +452,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -666,17 +582,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRegionBackendServiceRequest.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 @@ -810,7 +719,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchRegionBackendServiceRe requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -825,18 +734,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRegionBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + case -1514273510: + { + input.readMessage( + getBackendServiceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1514273510 + 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.compute.v1.PatchRegionBackendServiceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1538,7 +1491,18 @@ public PatchRegionBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRegionBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckRequest.java index 616b69bb5288..60ab90c4c2b5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRegionHealthCheckRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1615400258: - { - com.google.cloud.compute.v1.HealthCheck.Builder subBuilder = null; - if (healthCheckResource_ != null) { - subBuilder = healthCheckResource_.toBuilder(); - } - healthCheckResource_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(healthCheckResource_); - healthCheckResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheck_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRegionHealthCheckRequest_descriptor; @@ -457,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 308876645, healthCheck_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -483,7 +399,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(308876645, healthCheck_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -510,7 +426,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -535,7 +451,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -665,17 +581,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRegionHealthCheckRequest.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 @@ -807,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchRegionHealthCheckReque requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -822,18 +731,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRegionHealthCheckRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1615400258: + { + input.readMessage( + getHealthCheckResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1615400258 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + + break; + } // case -1823954134 + 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.compute.v1.PatchRegionHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1533,7 +1486,18 @@ public PatchRegionHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRegionHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckServiceRequest.java index a5b58ed58977..85bba4f5eb60 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionHealthCheckServiceRequest.java @@ -57,90 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRegionHealthCheckServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1027969318: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheckService_ = s; - break; - } - case -476024942: - { - com.google.cloud.compute.v1.HealthCheckService.Builder subBuilder = null; - if (healthCheckServiceResource_ != null) { - subBuilder = healthCheckServiceResource_.toBuilder(); - } - healthCheckServiceResource_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheckService.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(healthCheckServiceResource_); - healthCheckServiceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRegionHealthCheckServiceRequest_descriptor; @@ -460,7 +376,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (healthCheckServiceResource_ != null) { output.writeMessage(477367794, getHealthCheckServiceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +403,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 477367794, getHealthCheckServiceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -515,7 +431,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -540,7 +456,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -670,17 +586,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest.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 @@ -815,7 +724,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -830,19 +739,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRegionHealthCheckServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1027969318: + { + healthCheckService_ = input.readStringRequireUtf8(); + + break; + } // case -1027969318 + case -476024942: + { + input.readMessage( + getHealthCheckServiceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -476024942 + 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.compute.v1.PatchRegionHealthCheckServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1553,7 +1505,18 @@ public PatchRegionHealthCheckServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRegionHealthCheckServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionInstanceGroupManagerRequest.java index 839b2697c2f4..0d214e67620c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionInstanceGroupManagerRequest.java @@ -57,90 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case 2088511570: - { - com.google.cloud.compute.v1.InstanceGroupManager.Builder subBuilder = null; - if (instanceGroupManagerResource_ != null) { - subBuilder = instanceGroupManagerResource_.toBuilder(); - } - instanceGroupManagerResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManager.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagerResource_); - instanceGroupManagerResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRegionInstanceGroupManagerRequest_descriptor; @@ -462,7 +378,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupManagerResource_ != null) { output.writeMessage(261063946, getInstanceGroupManagerResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -490,7 +406,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 261063946, getInstanceGroupManagerResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +434,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +459,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -675,17 +591,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PatchRegionInstanceGroupManagerRequest.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 @@ -822,7 +731,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -837,19 +746,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRegionInstanceGroupManagerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case 2088511570: + { + input.readMessage( + getInstanceGroupManagerResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 2088511570 + 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.compute.v1.PatchRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1561,7 +1513,18 @@ public PatchRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRegionInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionNetworkFirewallPolicyRequest.java index daf369e51aaa..b3eed5a7c940 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionNetworkFirewallPolicyRequest.java @@ -57,90 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRegionNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -334571038: - { - com.google.cloud.compute.v1.FirewallPolicy.Builder subBuilder = null; - if (firewallPolicyResource_ != null) { - subBuilder = firewallPolicyResource_.toBuilder(); - } - firewallPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyResource_); - firewallPolicyResource_ = subBuilder.buildPartial(); - } - - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRegionNetworkFirewallPolicyRequest_descriptor; @@ -459,7 +375,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -485,7 +401,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -512,7 +428,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -537,7 +453,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -669,17 +585,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest.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 @@ -816,7 +725,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -831,19 +740,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRegionNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -334571038: + { + input.readMessage( + getFirewallPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -334571038 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.PatchRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1546,7 +1498,18 @@ public PatchRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionSecurityPolicyRequest.java index 789333a8612a..54baf953d372 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionSecurityPolicyRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRegionSecurityPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - - securityPolicy_ = s; - break; - } - case 1729276898: - { - com.google.cloud.compute.v1.SecurityPolicy.Builder subBuilder = null; - if (securityPolicyResource_ != null) { - subBuilder = securityPolicyResource_.toBuilder(); - } - securityPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityPolicyResource_); - securityPolicyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRegionSecurityPolicyRequest_descriptor; @@ -458,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +400,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -511,7 +427,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSecurityPolicyResource()) { if (!getSecurityPolicyResource().equals(other.getSecurityPolicyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -536,7 +452,7 @@ public int hashCode() { hash = (37 * hash) + SECURITY_POLICY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -666,17 +582,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRegionSecurityPolicyRequest.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 @@ -810,7 +719,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchRegionSecurityPolicyRe if (other.hasSecurityPolicyResource()) { mergeSecurityPolicyResource(other.getSecurityPolicyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -825,18 +734,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRegionSecurityPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1368660106 + case 1729276898: + { + input.readMessage( + getSecurityPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1729276898 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.PatchRegionSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1538,7 +1491,18 @@ public PatchRegionSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRegionSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionSslPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionSslPolicyRequest.java index 8bf973c2794a..1d00d43f8c87 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionSslPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionSslPolicyRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRegionSslPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2095832510: - { - com.google.cloud.compute.v1.SslPolicy.Builder subBuilder = null; - if (sslPolicyResource_ != null) { - subBuilder = sslPolicyResource_.toBuilder(); - } - sslPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.SslPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sslPolicyResource_); - sslPolicyResource_ = subBuilder.buildPartial(); - } - - break; - } - case -1933445590: - { - java.lang.String s = input.readStringRequireUtf8(); - - sslPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRegionSslPolicyRequest_descriptor; @@ -457,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 295190213, sslPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -483,7 +399,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(295190213, sslPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -510,7 +426,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSslPolicyResource()) { if (!getSslPolicyResource().equals(other.getSslPolicyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -535,7 +451,7 @@ public int hashCode() { hash = (37 * hash) + SSL_POLICY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSslPolicyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -665,17 +581,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRegionSslPolicyRequest.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 @@ -807,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchRegionSslPolicyRequest if (other.hasSslPolicyResource()) { mergeSslPolicyResource(other.getSslPolicyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -822,18 +731,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRegionSslPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2095832510: + { + input.readMessage( + getSslPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -2095832510 + case -1933445590: + { + sslPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -1933445590 + 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.compute.v1.PatchRegionSslPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1533,7 +1486,18 @@ public PatchRegionSslPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRegionSslPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionTargetHttpsProxyRequest.java index 1c9312c41e43..e947950f3632 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionTargetHttpsProxyRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRegionTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -825707510: - { - com.google.cloud.compute.v1.TargetHttpsProxy.Builder subBuilder = null; - if (targetHttpsProxyResource_ != null) { - subBuilder = targetHttpsProxyResource_.toBuilder(); - } - targetHttpsProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetHttpsProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetHttpsProxyResource_); - targetHttpsProxyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRegionTargetHttpsProxyRequest_descriptor; @@ -459,7 +375,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetHttpsProxyResource_ != null) { output.writeMessage(433657473, getTargetHttpsProxyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -485,7 +401,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 433657473, getTargetHttpsProxyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -512,7 +428,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetHttpsProxyResource()) { if (!getTargetHttpsProxyResource().equals(other.getTargetHttpsProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -537,7 +453,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_HTTPS_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -667,17 +583,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest.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 @@ -811,7 +720,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchRegionTargetHttpsProxy if (other.hasTargetHttpsProxyResource()) { mergeTargetHttpsProxyResource(other.getTargetHttpsProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -826,19 +735,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRegionTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -825707510: + { + input.readMessage( + getTargetHttpsProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -825707510 + 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.compute.v1.PatchRegionTargetHttpsProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1543,7 +1495,18 @@ public PatchRegionTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRegionTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionUrlMapRequest.java index b219b4cf2faa..588e901c0f84 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRegionUrlMapRequest.java @@ -55,89 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRegionUrlMapRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1349403402: - { - com.google.cloud.compute.v1.UrlMap.Builder subBuilder = null; - if (urlMapResource_ != null) { - subBuilder = urlMapResource_.toBuilder(); - } - urlMapResource_ = - input.readMessage(com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapResource_); - urlMapResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRegionUrlMapRequest_descriptor; @@ -456,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -481,7 +398,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -508,7 +425,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMapResource()) { if (!getUrlMapResource().equals(other.getUrlMapResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -533,7 +450,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -662,17 +579,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRegionUrlMapRequest.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 @@ -804,7 +714,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchRegionUrlMapRequest ot if (other.hasUrlMapResource()) { mergeUrlMapResource(other.getUrlMapResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -819,18 +729,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRegionUrlMapRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1349403402: + { + input.readMessage(getUrlMapResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1349403402 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + 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.compute.v1.PatchRegionUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1529,7 +1482,18 @@ public PatchRegionUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRegionUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRouterRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRouterRequest.java index aa652a374ae5..80b23abb116b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRouterRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRouterRequest.java @@ -55,89 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRouterRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1188870730: - { - java.lang.String s = input.readStringRequireUtf8(); - - router_ = s; - break; - } - case 1241776674: - { - com.google.cloud.compute.v1.Router.Builder subBuilder = null; - if (routerResource_ != null) { - subBuilder = routerResource_.toBuilder(); - } - routerResource_ = - input.readMessage(com.google.cloud.compute.v1.Router.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(routerResource_); - routerResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRouterRequest_descriptor; @@ -456,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -481,7 +398,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -508,7 +425,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRouterResource()) { if (!getRouterResource().equals(other.getRouterResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -533,7 +450,7 @@ public int hashCode() { hash = (37 * hash) + ROUTER_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getRouterResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -662,17 +579,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRouterRequest.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 @@ -803,7 +713,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchRouterRequest other) { if (other.hasRouterResource()) { mergeRouterResource(other.getRouterResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -818,17 +728,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRouterRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1188870730: + { + router_ = input.readStringRequireUtf8(); + + break; + } // case 1188870730 + case 1241776674: + { + input.readMessage(getRouterResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1241776674 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.PatchRouterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1527,7 +1481,18 @@ public PatchRouterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRouterRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleFirewallPolicyRequest.java index 21937bc75bb7..27edab1d6d4f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleFirewallPolicyRequest.java @@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRuleFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 2004188186: - { - com.google.cloud.compute.v1.FirewallPolicyRule.Builder subBuilder = null; - if (firewallPolicyRuleResource_ != null) { - subBuilder = firewallPolicyRuleResource_.toBuilder(); - } - firewallPolicyRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyRuleResource_); - firewallPolicyRuleResource_ = subBuilder.buildPartial(); - } - - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRuleFirewallPolicyRequest_descriptor; @@ -373,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -396,7 +320,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -426,7 +350,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -451,7 +375,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -581,17 +505,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest.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 @@ -718,7 +635,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchRuleFirewallPolicyRequ requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -733,18 +650,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRuleFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 2004188186: + { + input.readMessage( + getFirewallPolicyRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 2004188186 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.PatchRuleFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1283,7 +1238,18 @@ public PatchRuleFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRuleFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleNetworkFirewallPolicyRequest.java index 62cc1149e071..7aaf6936299a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleNetworkFirewallPolicyRequest.java @@ -56,89 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRuleNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2004188186: - { - com.google.cloud.compute.v1.FirewallPolicyRule.Builder subBuilder = null; - if (firewallPolicyRuleResource_ != null) { - subBuilder = firewallPolicyRuleResource_.toBuilder(); - } - firewallPolicyRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyRuleResource_); - firewallPolicyRuleResource_ = subBuilder.buildPartial(); - } - - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRuleNetworkFirewallPolicyRequest_descriptor; @@ -438,7 +355,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -464,7 +381,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -495,7 +412,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -522,7 +439,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -654,17 +571,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest.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 @@ -801,7 +711,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -816,19 +726,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRuleNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2004188186: + { + input.readMessage( + getFirewallPolicyRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 2004188186 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.PatchRuleNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1485,7 +1438,18 @@ public PatchRuleNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRuleNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleRegionNetworkFirewallPolicyRequest.java index e6e1121026cf..cab629c071a4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleRegionNetworkFirewallPolicyRequest.java @@ -57,96 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRuleRegionNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2004188186: - { - com.google.cloud.compute.v1.FirewallPolicyRule.Builder subBuilder = null; - if (firewallPolicyRuleResource_ != null) { - subBuilder = firewallPolicyRuleResource_.toBuilder(); - } - firewallPolicyRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallPolicyRuleResource_); - firewallPolicyRuleResource_ = subBuilder.buildPartial(); - } - - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRuleRegionNetworkFirewallPolicyRequest_descriptor; @@ -502,7 +412,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -531,7 +441,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -563,7 +473,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -592,7 +502,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -725,17 +635,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest.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 @@ -883,7 +786,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -898,19 +801,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2004188186: + { + input.readMessage( + getFirewallPolicyRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 2004188186 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.PatchRuleRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1685,7 +1637,19 @@ public PatchRuleRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRuleRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleSecurityPolicyRequest.java index 5ef91cf3c35e..a3a3a9fdd77c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchRuleSecurityPolicyRequest.java @@ -54,88 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchRuleSecurityPolicyRequest( - 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 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - - securityPolicy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1941957032: - { - bitField0_ |= 0x00000002; - validateOnly_ = input.readBool(); - break; - } - case -1073419750: - { - com.google.cloud.compute.v1.SecurityPolicyRule.Builder subBuilder = null; - if (securityPolicyRuleResource_ != null) { - subBuilder = securityPolicyRuleResource_.toBuilder(); - } - securityPolicyRuleResource_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityPolicyRuleResource_); - securityPolicyRuleResource_ = subBuilder.buildPartial(); - } - - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchRuleSecurityPolicyRequest_descriptor; @@ -404,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(445151652, priority_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -430,7 +348,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(445151652, priority_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -461,7 +379,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValidateOnly()) { if (getValidateOnly() != other.getValidateOnly()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -488,7 +406,7 @@ public int hashCode() { hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -618,17 +536,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest.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 @@ -760,7 +671,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchRuleSecurityPolicyRequ if (other.hasValidateOnly()) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -775,18 +686,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchRuleSecurityPolicyRequest 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 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1368660106 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1941957032: + { + validateOnly_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 1941957032 + case -1073419750: + { + input.readMessage( + getSecurityPolicyRuleResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1073419750 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + 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.compute.v1.PatchRuleSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1388,7 +1343,18 @@ public PatchRuleSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchRuleSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSecurityPolicyRequest.java index a4cbe05d0ed3..adeb8ac28b9c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSecurityPolicyRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchSecurityPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - - securityPolicy_ = s; - break; - } - case 1729276898: - { - com.google.cloud.compute.v1.SecurityPolicy.Builder subBuilder = null; - if (securityPolicyResource_ != null) { - subBuilder = securityPolicyResource_.toBuilder(); - } - securityPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityPolicyResource_); - securityPolicyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchSecurityPolicyRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +339,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSecurityPolicyResource()) { if (!getSecurityPolicyResource().equals(other.getSecurityPolicyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + SECURITY_POLICY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -595,17 +518,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchSecurityPolicyRequest.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 @@ -730,7 +646,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchSecurityPolicyRequest if (other.hasSecurityPolicyResource()) { mergeSecurityPolicyResource(other.getSecurityPolicyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -745,18 +661,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchSecurityPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1368660106 + case 1729276898: + { + input.readMessage( + getSecurityPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1729276898 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.PatchSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1341,7 +1295,18 @@ public PatchSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchServiceAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchServiceAttachmentRequest.java index 79c424611f2d..df6849a0210a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchServiceAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchServiceAttachmentRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchServiceAttachmentRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1583306902: - { - java.lang.String s = input.readStringRequireUtf8(); - - serviceAttachment_ = s; - break; - } - case -511125246: - { - com.google.cloud.compute.v1.ServiceAttachment.Builder subBuilder = null; - if (serviceAttachmentResource_ != null) { - subBuilder = serviceAttachmentResource_.toBuilder(); - } - serviceAttachmentResource_ = - input.readMessage( - com.google.cloud.compute.v1.ServiceAttachment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(serviceAttachmentResource_); - serviceAttachmentResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchServiceAttachmentRequest_descriptor; @@ -458,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (serviceAttachmentResource_ != null) { output.writeMessage(472980256, getServiceAttachmentResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -485,7 +401,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 472980256, getServiceAttachmentResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -513,7 +429,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServiceAttachmentResource().equals(other.getServiceAttachmentResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -538,7 +454,7 @@ public int hashCode() { hash = (37 * hash) + SERVICE_ATTACHMENT_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getServiceAttachmentResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -668,17 +584,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchServiceAttachmentRequest.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 @@ -810,7 +719,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchServiceAttachmentReque if (other.hasServiceAttachmentResource()) { mergeServiceAttachmentResource(other.getServiceAttachmentResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -825,18 +734,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchServiceAttachmentRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1583306902: + { + serviceAttachment_ = input.readStringRequireUtf8(); + + break; + } // case -1583306902 + case -511125246: + { + input.readMessage( + getServiceAttachmentResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -511125246 + 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.compute.v1.PatchServiceAttachmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1540,7 +1493,18 @@ public PatchServiceAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchServiceAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSslPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSslPolicyRequest.java index 26ca28c81f40..c5b60bc82be2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSslPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSslPolicyRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchSslPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2095832510: - { - com.google.cloud.compute.v1.SslPolicy.Builder subBuilder = null; - if (sslPolicyResource_ != null) { - subBuilder = sslPolicyResource_.toBuilder(); - } - sslPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.SslPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sslPolicyResource_); - sslPolicyResource_ = subBuilder.buildPartial(); - } - - break; - } - case -1933445590: - { - java.lang.String s = input.readStringRequireUtf8(); - - sslPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchSslPolicyRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 295190213, sslPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +339,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sslPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(295190213, sslPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSslPolicyResource()) { if (!getSslPolicyResource().equals(other.getSslPolicyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + SSL_POLICY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSslPolicyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -594,17 +517,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchSslPolicyRequest.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 +645,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchSslPolicyRequest other if (other.hasSslPolicyResource()) { mergeSslPolicyResource(other.getSslPolicyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,18 +660,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchSslPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2095832510: + { + input.readMessage( + getSslPolicyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -2095832510 + case -1933445590: + { + sslPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -1933445590 + 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.compute.v1.PatchSslPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1339,7 +1293,18 @@ public PatchSslPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchSslPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSubnetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSubnetworkRequest.java index 8e55f0297be8..a2e4505ed560 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSubnetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchSubnetworkRequest.java @@ -55,96 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchSubnetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 337865210: - { - com.google.cloud.compute.v1.Subnetwork.Builder subBuilder = null; - if (subnetworkResource_ != null) { - subBuilder = subnetworkResource_.toBuilder(); - } - subnetworkResource_ = - input.readMessage( - com.google.cloud.compute.v1.Subnetwork.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(subnetworkResource_); - subnetworkResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - - subnetwork_ = s; - break; - } - case -1433310512: - { - bitField0_ |= 0x00000001; - drainTimeoutSeconds_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchSubnetworkRequest_descriptor; @@ -499,7 +409,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(357707098, drainTimeoutSeconds_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -529,7 +439,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeInt32Size(357707098, drainTimeoutSeconds_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -560,7 +470,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSubnetworkResource()) { if (!getSubnetworkResource().equals(other.getSubnetworkResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -589,7 +499,7 @@ public int hashCode() { hash = (37 * hash) + SUBNETWORK_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSubnetworkResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -718,17 +628,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchSubnetworkRequest.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 @@ -869,7 +772,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchSubnetworkRequest othe if (other.hasSubnetworkResource()) { mergeSubnetworkResource(other.getSubnetworkResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -884,18 +787,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchSubnetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 337865210: + { + input.readMessage( + getSubnetworkResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 337865210 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + + break; + } // case -1832345742 + case -1433310512: + { + drainTimeoutSeconds_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -1433310512 + 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.compute.v1.PatchSubnetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1662,7 +1615,18 @@ public PatchSubnetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchSubnetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetGrpcProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetGrpcProxyRequest.java index dd5f7ea46010..31a864d46626 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetGrpcProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetGrpcProxyRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchTargetGrpcProxyRequest( - 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 40162266: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetGrpcProxy_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1663587694: - { - com.google.cloud.compute.v1.TargetGrpcProxy.Builder subBuilder = null; - if (targetGrpcProxyResource_ != null) { - subBuilder = targetGrpcProxyResource_.toBuilder(); - } - targetGrpcProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetGrpcProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetGrpcProxyResource_); - targetGrpcProxyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchTargetGrpcProxyRequest_descriptor; @@ -394,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetGrpcProxyResource_ != null) { output.writeMessage(328922450, getTargetGrpcProxyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +340,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 328922450, getTargetGrpcProxyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -443,7 +366,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetGrpcProxyResource()) { if (!getTargetGrpcProxyResource().equals(other.getTargetGrpcProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -466,7 +389,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_GRPC_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetGrpcProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +519,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchTargetGrpcProxyRequest.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 @@ -731,7 +647,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchTargetGrpcProxyRequest if (other.hasTargetGrpcProxyResource()) { mergeTargetGrpcProxyResource(other.getTargetGrpcProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -746,18 +662,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchTargetGrpcProxyRequest 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 40162266: + { + targetGrpcProxy_ = input.readStringRequireUtf8(); + + break; + } // case 40162266 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1663587694: + { + input.readMessage( + getTargetGrpcProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1663587694 + 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.compute.v1.PatchTargetGrpcProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1342,7 +1296,18 @@ public PatchTargetGrpcProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchTargetGrpcProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetHttpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetHttpProxyRequest.java index 76ca22b272c1..ea18fbe84c2f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetHttpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetHttpProxyRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchTargetHttpProxyRequest( - 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 197573954: - { - com.google.cloud.compute.v1.TargetHttpProxy.Builder subBuilder = null; - if (targetHttpProxyResource_ != null) { - subBuilder = targetHttpProxyResource_.toBuilder(); - } - targetHttpProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetHttpProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetHttpProxyResource_); - targetHttpProxyResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1654979370: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchTargetHttpProxyRequest_descriptor; @@ -394,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +340,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -443,7 +366,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetHttpProxyResource()) { if (!getTargetHttpProxyResource().equals(other.getTargetHttpProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -466,7 +389,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_HTTP_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +519,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchTargetHttpProxyRequest.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 @@ -731,7 +647,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchTargetHttpProxyRequest if (other.hasTargetHttpProxyResource()) { mergeTargetHttpProxyResource(other.getTargetHttpProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -746,18 +662,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchTargetHttpProxyRequest 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 197573954: + { + input.readMessage( + getTargetHttpProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 197573954 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1654979370: + { + targetHttpProxy_ = input.readStringRequireUtf8(); + + break; + } // case 1654979370 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.PatchTargetHttpProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1342,7 +1296,18 @@ public PatchTargetHttpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchTargetHttpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetHttpsProxyRequest.java index 3c338b3f577c..4fdcfd7eff7f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchTargetHttpsProxyRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -825707510: - { - com.google.cloud.compute.v1.TargetHttpsProxy.Builder subBuilder = null; - if (targetHttpsProxyResource_ != null) { - subBuilder = targetHttpsProxyResource_.toBuilder(); - } - targetHttpsProxyResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetHttpsProxy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetHttpsProxyResource_); - targetHttpsProxyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchTargetHttpsProxyRequest_descriptor; @@ -394,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetHttpsProxyResource_ != null) { output.writeMessage(433657473, getTargetHttpsProxyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +340,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 433657473, getTargetHttpsProxyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -443,7 +366,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetHttpsProxyResource()) { if (!getTargetHttpsProxyResource().equals(other.getTargetHttpsProxyResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -466,7 +389,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_HTTPS_PROXY_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxyResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +519,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchTargetHttpsProxyRequest.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 @@ -731,7 +647,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchTargetHttpsProxyReques if (other.hasTargetHttpsProxyResource()) { mergeTargetHttpsProxyResource(other.getTargetHttpsProxyResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -746,18 +662,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -825707510: + { + input.readMessage( + getTargetHttpsProxyResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -825707510 + 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.compute.v1.PatchTargetHttpsProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1344,7 +1298,18 @@ public PatchTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchUrlMapRequest.java index 08a3250874c0..aab20547695b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PatchUrlMapRequest.java @@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PatchUrlMapRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1349403402: - { - com.google.cloud.compute.v1.UrlMap.Builder subBuilder = null; - if (urlMapResource_ != null) { - subBuilder = urlMapResource_.toBuilder(); - } - urlMapResource_ = - input.readMessage(com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapResource_); - urlMapResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PatchUrlMapRequest_descriptor; @@ -392,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -414,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -440,7 +364,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMapResource()) { if (!getUrlMapResource().equals(other.getUrlMapResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -463,7 +387,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -592,17 +516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PatchUrlMapRequest.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 @@ -726,7 +643,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PatchUrlMapRequest other) { if (other.hasUrlMapResource()) { mergeUrlMapResource(other.getUrlMapResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -741,17 +658,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PatchUrlMapRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1349403402: + { + input.readMessage(getUrlMapResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1349403402 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + 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.compute.v1.PatchUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1334,7 +1289,18 @@ public PatchUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PatchUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PathMatcher.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PathMatcher.java index b6d02b9a4a45..9bf9e979af5f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PathMatcher.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PathMatcher.java @@ -56,143 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PathMatcher( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 835519210: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - pathRules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - pathRules_.add( - input.readMessage( - com.google.cloud.compute.v1.PathRule.parser(), extensionRegistry)); - break; - } - case -1670348478: - { - com.google.cloud.compute.v1.HttpHeaderAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = headerAction_.toBuilder(); - } - headerAction_ = - input.readMessage( - com.google.cloud.compute.v1.HttpHeaderAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(headerAction_); - headerAction_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case -1418940590: - { - com.google.cloud.compute.v1.HttpRedirectAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = defaultUrlRedirect_.toBuilder(); - } - defaultUrlRedirect_ = - input.readMessage( - com.google.cloud.compute.v1.HttpRedirectAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(defaultUrlRedirect_); - defaultUrlRedirect_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -1333029446: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - defaultService_ = s; - break; - } - case -1284629494: - { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - routeRules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - routeRules_.add( - input.readMessage( - com.google.cloud.compute.v1.HttpRouteRule.parser(), extensionRegistry)); - break; - } - case -1263611566: - { - com.google.cloud.compute.v1.HttpRouteAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = defaultRouteAction_.toBuilder(); - } - defaultRouteAction_ = - input.readMessage( - com.google.cloud.compute.v1.HttpRouteAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(defaultRouteAction_); - defaultRouteAction_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - description_ = 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_ & 0x00000040) != 0)) { - pathRules_ = java.util.Collections.unmodifiableList(pathRules_); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - routeRules_ = java.util.Collections.unmodifiableList(routeRules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PathMatcher_descriptor; @@ -733,7 +596,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -773,7 +636,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -814,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getPathRulesList().equals(other.getPathRulesList())) return false; if (!getRouteRulesList().equals(other.getRouteRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -857,7 +720,7 @@ public int hashCode() { hash = (37 * hash) + ROUTE_RULES_FIELD_NUMBER; hash = (53 * hash) + getRouteRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1034,16 +897,18 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000020); if (pathRulesBuilder_ == null) { pathRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + pathRules_ = null; pathRulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); if (routeRulesBuilder_ == null) { routeRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); } else { + routeRules_ = null; routeRulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000080); return this; } @@ -1255,7 +1120,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PathMatcher other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1270,17 +1135,95 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PathMatcher 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 835519210: + { + com.google.cloud.compute.v1.PathRule m = + input.readMessage( + com.google.cloud.compute.v1.PathRule.parser(), extensionRegistry); + if (pathRulesBuilder_ == null) { + ensurePathRulesIsMutable(); + pathRules_.add(m); + } else { + pathRulesBuilder_.addMessage(m); + } + break; + } // case 835519210 + case -1670348478: + { + input.readMessage(getHeaderActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case -1670348478 + case -1418940590: + { + input.readMessage( + getDefaultUrlRedirectFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -1418940590 + case -1333029446: + { + defaultService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1333029446 + case -1284629494: + { + com.google.cloud.compute.v1.HttpRouteRule m = + input.readMessage( + com.google.cloud.compute.v1.HttpRouteRule.parser(), extensionRegistry); + if (routeRulesBuilder_ == null) { + ensureRouteRulesIsMutable(); + routeRules_.add(m); + } else { + routeRulesBuilder_.addMessage(m); + } + break; + } // case -1284629494 + case -1263611566: + { + input.readMessage( + getDefaultRouteActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -1263611566 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + 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.compute.v1.PathMatcher) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2959,7 +2902,18 @@ public PathMatcher parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PathMatcher(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PathRule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PathRule.java index 2a28a1cf7861..9eab723ff3af 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PathRule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PathRule.java @@ -53,98 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PathRule( - 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 851511154: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - paths_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - paths_.add(s); - break; - } - case -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - service_ = s; - break; - } - case -1053784734: - { - com.google.cloud.compute.v1.HttpRedirectAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = urlRedirect_.toBuilder(); - } - urlRedirect_ = - input.readMessage( - com.google.cloud.compute.v1.HttpRedirectAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlRedirect_); - urlRedirect_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -898455710: - { - com.google.cloud.compute.v1.HttpRouteAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = routeAction_.toBuilder(); - } - routeAction_ = - input.readMessage( - com.google.cloud.compute.v1.HttpRouteAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(routeAction_); - routeAction_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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)) { - paths_ = paths_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PathRule_descriptor; @@ -412,7 +320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(424563948, getRouteAction()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -438,7 +346,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(424563948, getRouteAction()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -466,7 +374,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlRedirect()) { if (!getUrlRedirect().equals(other.getUrlRedirect())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -493,7 +401,7 @@ public int hashCode() { hash = (37 * hash) + URL_REDIRECT_FIELD_NUMBER; hash = (53 * hash) + getUrlRedirect().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -780,7 +688,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PathRule other) { if (other.hasUrlRedirect()) { mergeUrlRedirect(other.getUrlRedirect()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -795,17 +703,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PathRule 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 851511154: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePathsIsMutable(); + paths_.add(s); + break; + } // case 851511154 + case -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1306643030 + case -1053784734: + { + input.readMessage(getUrlRedirectFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -1053784734 + case -898455710: + { + input.readMessage(getRouteActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -898455710 + 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.compute.v1.PathRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1506,7 +1453,18 @@ public PathRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PathRule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PerInstanceConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PerInstanceConfig.java index 649b237a2d17..5c1e7c11b634 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PerInstanceConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PerInstanceConfig.java @@ -53,83 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PerInstanceConfig( - 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 21072210: - { - com.google.cloud.compute.v1.PreservedState.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = preservedState_.toBuilder(); - } - preservedState_ = - input.readMessage( - com.google.cloud.compute.v1.PreservedState.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(preservedState_); - preservedState_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - name_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - status_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - fingerprint_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PerInstanceConfig_descriptor; @@ -662,7 +585,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 234678500, fingerprint_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -684,7 +607,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(234678500, fingerprint_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -716,7 +639,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -743,7 +666,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1018,7 +941,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PerInstanceConfig other) { status_ = other.status_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1033,17 +956,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PerInstanceConfig 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 21072210: + { + input.readMessage(getPreservedStateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 21072210 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26989658 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1450082194 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1877428002 + 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.compute.v1.PerInstanceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1634,7 +1595,18 @@ public PerInstanceConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PerInstanceConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Policy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Policy.java index 0c332e3adad6..dcbe4e138842 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Policy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Policy.java @@ -55,106 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Policy( - 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 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 870991802: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - rules_.add( - input.readMessage(com.google.cloud.compute.v1.Rule.parser(), extensionRegistry)); - break; - } - case -1670322070: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - auditConfigs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - auditConfigs_.add( - input.readMessage( - com.google.cloud.compute.v1.AuditConfig.parser(), extensionRegistry)); - break; - } - case -1482103104: - { - bitField0_ |= 0x00000004; - version_ = input.readInt32(); - break; - } - case -1068952462: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - bindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - bindings_.add( - input.readMessage( - com.google.cloud.compute.v1.Binding.parser(), extensionRegistry)); - break; - } - case -690437672: - { - bitField0_ |= 0x00000002; - iamOwned_ = 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 { - if (((mutable_bitField0_ & 0x00000010) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - auditConfigs_ = java.util.Collections.unmodifiableList(auditConfigs_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - bindings_ = java.util.Collections.unmodifiableList(bindings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Policy_descriptor; @@ -528,7 +428,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(450566203, iamOwned_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -556,7 +456,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(450566203, iamOwned_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -586,7 +486,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVersion()) { if (getVersion() != other.getVersion()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -621,7 +521,7 @@ public int hashCode() { hash = (37 * hash) + VERSION_FIELD_NUMBER; hash = (53 * hash) + getVersion(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -749,21 +649,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Policy.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) { - getAuditConfigsFieldBuilder(); - getBindingsFieldBuilder(); - getRulesFieldBuilder(); - } } @java.lang.Override @@ -771,26 +660,29 @@ public Builder clear() { super.clear(); if (auditConfigsBuilder_ == null) { auditConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + auditConfigs_ = null; auditConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (bindingsBuilder_ == null) { bindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + bindings_ = null; bindingsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); etag_ = ""; bitField0_ = (bitField0_ & ~0x00000004); iamOwned_ = false; bitField0_ = (bitField0_ & ~0x00000008); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); version_ = 0; bitField0_ = (bitField0_ & ~0x00000020); return this; @@ -1002,7 +894,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Policy other) { if (other.hasVersion()) { setVersion(other.getVersion()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +909,87 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Policy 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 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 24987818 + case 870991802: + { + com.google.cloud.compute.v1.Rule m = + input.readMessage(com.google.cloud.compute.v1.Rule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 870991802 + case -1670322070: + { + com.google.cloud.compute.v1.AuditConfig m = + input.readMessage( + com.google.cloud.compute.v1.AuditConfig.parser(), extensionRegistry); + if (auditConfigsBuilder_ == null) { + ensureAuditConfigsIsMutable(); + auditConfigs_.add(m); + } else { + auditConfigsBuilder_.addMessage(m); + } + break; + } // case -1670322070 + case -1482103104: + { + version_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case -1482103104 + case -1068952462: + { + com.google.cloud.compute.v1.Binding m = + input.readMessage( + com.google.cloud.compute.v1.Binding.parser(), extensionRegistry); + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(m); + } else { + bindingsBuilder_.addMessage(m); + } + break; + } // case -1068952462 + case -690437672: + { + iamOwned_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case -690437672 + 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.compute.v1.Policy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2340,7 +2302,18 @@ public Policy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Policy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreconfiguredWafSet.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreconfiguredWafSet.java index c43537a85237..b440d6ab3ea5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreconfiguredWafSet.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreconfiguredWafSet.java @@ -51,61 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreconfiguredWafSet( - 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 -502879038: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - expressionSets_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - expressionSets_.add( - input.readMessage( - com.google.cloud.compute.v1.WafExpressionSet.parser(), extensionRegistry)); - 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)) { - expressionSets_ = java.util.Collections.unmodifiableList(expressionSets_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PreconfiguredWafSet_descriptor; @@ -208,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < expressionSets_.size(); i++) { output.writeMessage(474011032, expressionSets_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -222,7 +167,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 474011032, expressionSets_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -239,7 +184,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.PreconfiguredWafSet) obj; if (!getExpressionSetsList().equals(other.getExpressionSetsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -254,7 +199,7 @@ public int hashCode() { hash = (37 * hash) + EXPRESSION_SETS_FIELD_NUMBER; hash = (53 * hash) + getExpressionSetsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -382,19 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PreconfiguredWafSet.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) { - getExpressionSetsFieldBuilder(); - } } @java.lang.Override @@ -402,10 +338,11 @@ public Builder clear() { super.clear(); if (expressionSetsBuilder_ == null) { expressionSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + expressionSets_ = null; expressionSetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -520,7 +457,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PreconfiguredWafSet other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -535,17 +472,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PreconfiguredWafSet 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 -502879038: + { + com.google.cloud.compute.v1.WafExpressionSet m = + input.readMessage( + com.google.cloud.compute.v1.WafExpressionSet.parser(), extensionRegistry); + if (expressionSetsBuilder_ == null) { + ensureExpressionSetsIsMutable(); + expressionSets_.add(m); + } else { + expressionSetsBuilder_.addMessage(m); + } + break; + } // case -502879038 + 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.compute.v1.PreconfiguredWafSet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -942,7 +906,18 @@ public PreconfiguredWafSet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreconfiguredWafSet(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreservedState.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreservedState.java index 23ae4cf8da6e..1a5c4463ed5e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreservedState.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreservedState.java @@ -50,77 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreservedState( - 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 694933882: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - metadata_ = - com.google.protobuf.MapField.newMapField( - MetadataDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry metadata__ = - input.readMessage( - MetadataDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); - break; - } - case 764752818: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - disks_ = - com.google.protobuf.MapField.newMapField(DisksDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.PreservedStatePreservedDisk> - disks__ = - input.readMessage( - DisksDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - disks_.getMutableMap().put(disks__.getKey(), disks__.getValue()); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PreservedState_descriptor; @@ -383,7 +312,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 86866735); com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetDisks(), DisksDefaultEntryHolder.defaultEntry, 95594102); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -415,7 +344,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(95594102, disks__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -433,7 +362,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetDisks().equals(other.internalGetDisks())) return false; if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -452,7 +381,7 @@ public int hashCode() { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + internalGetMetadata().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -605,17 +534,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.PreservedState.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 @@ -706,7 +628,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PreservedState other) { if (other == com.google.cloud.compute.v1.PreservedState.getDefaultInstance()) return this; internalGetMutableDisks().mergeFrom(other.internalGetDisks()); internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,17 +643,53 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PreservedState 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 694933882: + { + com.google.protobuf.MapEntry metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMetadata() + .getMutableMap() + .put(metadata__.getKey(), metadata__.getValue()); + break; + } // case 694933882 + case 764752818: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.PreservedStatePreservedDisk> + disks__ = + input.readMessage( + DisksDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableDisks().getMutableMap().put(disks__.getKey(), disks__.getValue()); + break; + } // case 764752818 + 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.compute.v1.PreservedState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1115,7 +1073,18 @@ public PreservedState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreservedState(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreservedStatePreservedDisk.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreservedStatePreservedDisk.java index 01d66e0ef304..0f550e3c516b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreservedStatePreservedDisk.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreservedStatePreservedDisk.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreservedStatePreservedDisk( - 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 26856730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - mode_ = s; - break; - } - case 1417887962: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - source_ = s; - break; - } - case -576876070: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - autoDelete_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PreservedStatePreservedDisk_descriptor; @@ -637,7 +576,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 464761403, autoDelete_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -655,7 +594,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(464761403, autoDelete_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -683,7 +622,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSource()) { if (!getSource().equals(other.getSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -706,7 +645,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -835,17 +774,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PreservedStatePreservedDisk.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 @@ -964,7 +896,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PreservedStatePreservedDisk source_ = other.source_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -979,18 +911,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PreservedStatePreservedDisk 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 26856730: + { + mode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26856730 + case 1417887962: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1417887962 + case -576876070: + { + autoDelete_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -576876070 + 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.compute.v1.PreservedStatePreservedDisk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1400,7 +1363,18 @@ public PreservedStatePreservedDisk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreservedStatePreservedDisk(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreviewRouterRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreviewRouterRequest.java index aeca47a25734..1b8f380a97d1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreviewRouterRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PreviewRouterRequest.java @@ -54,81 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PreviewRouterRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1188870730: - { - java.lang.String s = input.readStringRequireUtf8(); - - router_ = s; - break; - } - case 1241776674: - { - com.google.cloud.compute.v1.Router.Builder subBuilder = null; - if (routerResource_ != null) { - subBuilder = routerResource_.toBuilder(); - } - routerResource_ = - input.readMessage(com.google.cloud.compute.v1.Router.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(routerResource_); - routerResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PreviewRouterRequest_descriptor; @@ -371,7 +296,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -393,7 +318,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -416,7 +341,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRouterResource()) { if (!getRouterResource().equals(other.getRouterResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -437,7 +362,7 @@ public int hashCode() { hash = (37 * hash) + ROUTER_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getRouterResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -566,17 +491,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PreviewRouterRequest.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 @@ -694,7 +612,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PreviewRouterRequest other) if (other.hasRouterResource()) { mergeRouterResource(other.getRouterResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -709,17 +627,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PreviewRouterRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1188870730: + { + router_ = input.readStringRequireUtf8(); + + break; + } // case 1188870730 + case 1241776674: + { + input.readMessage(getRouterResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1241776674 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.PreviewRouterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1276,7 +1232,18 @@ public PreviewRouterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PreviewRouterRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Project.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Project.java index a8df90a5ca7d..e314833872b5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Project.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Project.java @@ -61,166 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Project( - 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 26840: - { - bitField0_ |= 0x00000020; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 1002735578: - { - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - quotas_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - quotas_.add( - input.readMessage(com.google.cloud.compute.v1.Quota.parser(), extensionRegistry)); - break; - } - case 1486352938: - { - com.google.cloud.compute.v1.Metadata.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = commonInstanceMetadata_.toBuilder(); - } - commonInstanceMetadata_ = - input.readMessage( - com.google.cloud.compute.v1.Metadata.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(commonInstanceMetadata_); - commonInstanceMetadata_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1827354122: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - xpnProjectStatus_ = s; - break; - } - case -1905269462: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - defaultServiceAccount_ = s; - break; - } - case -1514616302: - { - com.google.cloud.compute.v1.UsageExportLocation.Builder subBuilder = null; - if (((bitField0_ & 0x00000200) != 0)) { - subBuilder = usageExportLocation_.toBuilder(); - } - usageExportLocation_ = - input.readMessage( - com.google.cloud.compute.v1.UsageExportLocation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(usageExportLocation_); - usageExportLocation_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000200; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = s; - break; - } - case -542827558: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - enabledFeatures_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - enabledFeatures_.add(s); - break; - } - case -520940406: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - defaultNetworkTier_ = 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_ & 0x00000200) != 0)) { - quotas_ = java.util.Collections.unmodifiableList(quotas_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - enabledFeatures_ = enabledFeatures_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Project_descriptor; @@ -1407,7 +1247,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 471753361, defaultNetworkTier_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1469,7 +1309,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(471753361, defaultNetworkTier_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1530,7 +1370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasXpnProjectStatus()) { if (!getXpnProjectStatus().equals(other.getXpnProjectStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1593,7 +1433,7 @@ public int hashCode() { hash = (37 * hash) + XPN_PROJECT_STATUS_FIELD_NUMBER; hash = (53 * hash) + getXpnProjectStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1765,10 +1605,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000100); if (quotasBuilder_ == null) { quotas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); } else { + quotas_ = null; quotasBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000200); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00000400); if (usageExportLocationBuilder_ == null) { @@ -2009,7 +1850,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Project other) { xpnProjectStatus_ = other.xpnProjectStatus_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2024,17 +1865,119 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Project 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000040; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 1002735578: + { + com.google.cloud.compute.v1.Quota m = + input.readMessage( + com.google.cloud.compute.v1.Quota.parser(), extensionRegistry); + if (quotasBuilder_ == null) { + ensureQuotasIsMutable(); + quotas_.add(m); + } else { + quotasBuilder_.addMessage(m); + } + break; + } // case 1002735578 + case 1486352938: + { + input.readMessage( + getCommonInstanceMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1486352938 + case 1827354122: + { + xpnProjectStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 1827354122 + case -1905269462: + { + defaultServiceAccount_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -1905269462 + case -1514616302: + { + input.readMessage( + getUsageExportLocationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case -1514616302 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -645248918 + case -542827558: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEnabledFeaturesIsMutable(); + enabledFeatures_.add(s); + break; + } // case -542827558 + case -520940406: + { + defaultNetworkTier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -520940406 + 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.compute.v1.Project) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4020,7 +3963,18 @@ public Project parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Project(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsDisableXpnResourceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsDisableXpnResourceRequest.java index c429fd19c309..7501b267d426 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsDisableXpnResourceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsDisableXpnResourceRequest.java @@ -50,62 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProjectsDisableXpnResourceRequest( - 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 1067077050: - { - com.google.cloud.compute.v1.XpnResourceId.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = xpnResource_.toBuilder(); - } - xpnResource_ = - input.readMessage( - com.google.cloud.compute.v1.XpnResourceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(xpnResource_); - xpnResource_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ProjectsDisableXpnResourceRequest_descriptor; @@ -189,7 +133,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(133384631, getXpnResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -201,7 +145,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(133384631, getXpnResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -221,7 +165,7 @@ public boolean equals(final java.lang.Object obj) { if (hasXpnResource()) { if (!getXpnResource().equals(other.getXpnResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -236,7 +180,7 @@ public int hashCode() { hash = (37 * hash) + XPN_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getXpnResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,7 +426,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ProjectsDisableXpnResourceR if (other.hasXpnResource()) { mergeXpnResource(other.getXpnResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -497,19 +441,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ProjectsDisableXpnResourceRequest 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 1067077050: + { + input.readMessage(getXpnResourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1067077050 + 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.compute.v1.ProjectsDisableXpnResourceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -735,7 +697,18 @@ public ProjectsDisableXpnResourceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProjectsDisableXpnResourceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsEnableXpnResourceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsEnableXpnResourceRequest.java index 3998268b5585..992cb8c14c39 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsEnableXpnResourceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsEnableXpnResourceRequest.java @@ -50,62 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProjectsEnableXpnResourceRequest( - 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 1067077050: - { - com.google.cloud.compute.v1.XpnResourceId.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = xpnResource_.toBuilder(); - } - xpnResource_ = - input.readMessage( - com.google.cloud.compute.v1.XpnResourceId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(xpnResource_); - xpnResource_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ProjectsEnableXpnResourceRequest_descriptor; @@ -189,7 +133,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(133384631, getXpnResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -201,7 +145,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(133384631, getXpnResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -221,7 +165,7 @@ public boolean equals(final java.lang.Object obj) { if (hasXpnResource()) { if (!getXpnResource().equals(other.getXpnResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -236,7 +180,7 @@ public int hashCode() { hash = (37 * hash) + XPN_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getXpnResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,7 +426,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ProjectsEnableXpnResourceRe if (other.hasXpnResource()) { mergeXpnResource(other.getXpnResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -497,18 +441,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ProjectsEnableXpnResourceRequest 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 1067077050: + { + input.readMessage(getXpnResourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1067077050 + 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.compute.v1.ProjectsEnableXpnResourceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -734,7 +697,18 @@ public ProjectsEnableXpnResourceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProjectsEnableXpnResourceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsGetXpnResources.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsGetXpnResources.java index 30f55a578c77..d7f244e4f995 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsGetXpnResources.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsGetXpnResources.java @@ -53,74 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProjectsGetXpnResources( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - kind_ = s; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - nextPageToken_ = s; - break; - } - case 1315303722: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - resources_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - resources_.add( - input.readMessage( - com.google.cloud.compute.v1.XpnResourceId.parser(), extensionRegistry)); - 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_ & 0x00000004) != 0)) { - resources_ = java.util.Collections.unmodifiableList(resources_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ProjectsGetXpnResources_descriptor; @@ -357,7 +289,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < resources_.size(); i++) { output.writeMessage(164412965, resources_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -376,7 +308,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(164412965, resources_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -401,7 +333,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNextPageToken().equals(other.getNextPageToken())) return false; } if (!getResourcesList().equals(other.getResourcesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -424,7 +356,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCES_FIELD_NUMBER; hash = (53 * hash) + getResourcesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -552,19 +484,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ProjectsGetXpnResources.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) { - getResourcesFieldBuilder(); - } } @java.lang.Override @@ -576,10 +499,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (resourcesBuilder_ == null) { resources_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + resources_ = null; resourcesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -714,7 +638,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ProjectsGetXpnResources oth } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -729,18 +653,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ProjectsGetXpnResources 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26336418 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 638380202 + case 1315303722: + { + com.google.cloud.compute.v1.XpnResourceId m = + input.readMessage( + com.google.cloud.compute.v1.XpnResourceId.parser(), extensionRegistry); + if (resourcesBuilder_ == null) { + ensureResourcesIsMutable(); + resources_.add(m); + } else { + resourcesBuilder_.addMessage(m); + } + break; + } // case 1315303722 + 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.compute.v1.ProjectsGetXpnResources) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1367,7 +1329,18 @@ public ProjectsGetXpnResources parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProjectsGetXpnResources(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsListXpnHostsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsListXpnHostsRequest.java index acc937dbda12..e87d7aa7fd04 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsListXpnHostsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsListXpnHostsRequest.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProjectsListXpnHostsRequest( - 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 841443738: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - organization_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ProjectsListXpnHostsRequest_descriptor; @@ -195,7 +148,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 105180467, organization_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +160,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(105180467, organization_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +180,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOrganization()) { if (!getOrganization().equals(other.getOrganization())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +195,7 @@ public int hashCode() { hash = (37 * hash) + ORGANIZATION_FIELD_NUMBER; hash = (53 * hash) + getOrganization().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -371,17 +324,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ProjectsListXpnHostsRequest.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 @@ -478,7 +424,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ProjectsListXpnHostsRequest organization_ = other.organization_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -493,18 +439,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ProjectsListXpnHostsRequest 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 841443738: + { + organization_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 841443738 + 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.compute.v1.ProjectsListXpnHostsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -662,7 +627,18 @@ public ProjectsListXpnHostsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProjectsListXpnHostsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsSetDefaultNetworkTierRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsSetDefaultNetworkTierRequest.java index 9d6d26e58731..47dfb0c370e0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsSetDefaultNetworkTierRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ProjectsSetDefaultNetworkTierRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProjectsSetDefaultNetworkTierRequest( - 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 -155784550: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - networkTier_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ProjectsSetDefaultNetworkTierRequest_descriptor; @@ -403,7 +356,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517397843, networkTier_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -415,7 +368,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517397843, networkTier_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -435,7 +388,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNetworkTier()) { if (!getNetworkTier().equals(other.getNetworkTier())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -450,7 +403,7 @@ public int hashCode() { hash = (37 * hash) + NETWORK_TIER_FIELD_NUMBER; hash = (53 * hash) + getNetworkTier().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -579,17 +532,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ProjectsSetDefaultNetworkTierRequest.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 @@ -689,7 +635,7 @@ public Builder mergeFrom( networkTier_ = other.networkTier_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -704,19 +650,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ProjectsSetDefaultNetworkTierRequest 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 -155784550: + { + networkTier_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -155784550 + 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.compute.v1.ProjectsSetDefaultNetworkTierRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -882,7 +846,18 @@ public ProjectsSetDefaultNetworkTierRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProjectsSetDefaultNetworkTierRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefix.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefix.java index 9502b2968498..e93c49d9429f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefix.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefix.java @@ -62,140 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PublicAdvertisedPrefix( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 784938578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - ipCidrRange_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - status_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - fingerprint_ = s; - break; - } - case 1928091050: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - dnsVerificationIp_ = s; - break; - } - case -1239507374: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - sharedSecret_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -888473510: - { - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - publicDelegatedPrefixs_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.PublicAdvertisedPrefixPublicDelegatedPrefix>(); - mutable_bitField0_ |= 0x00000100; - } - publicDelegatedPrefixs_.add( - input.readMessage( - com.google.cloud.compute.v1.PublicAdvertisedPrefixPublicDelegatedPrefix - .parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = 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_ & 0x00000100) != 0)) { - publicDelegatedPrefixs_ = java.util.Collections.unmodifiableList(publicDelegatedPrefixs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PublicAdvertisedPrefix_descriptor; @@ -1292,7 +1158,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1341,7 +1207,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1403,7 +1269,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1462,7 +1328,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1591,19 +1457,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PublicAdvertisedPrefix.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) { - getPublicDelegatedPrefixsFieldBuilder(); - } } @java.lang.Override @@ -1627,10 +1484,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000080); if (publicDelegatedPrefixsBuilder_ == null) { publicDelegatedPrefixs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); } else { + publicDelegatedPrefixs_ = null; publicDelegatedPrefixsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000100); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00000200); sharedSecret_ = ""; @@ -1850,7 +1708,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PublicAdvertisedPrefix othe status_ = other.status_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1865,18 +1723,112 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PublicAdvertisedPrefix 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 784938578: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 784938578 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1450082194 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1877428002 + case 1928091050: + { + dnsVerificationIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1928091050 + case -1239507374: + { + sharedSecret_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -1239507374 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -888473510: + { + com.google.cloud.compute.v1.PublicAdvertisedPrefixPublicDelegatedPrefix m = + input.readMessage( + com.google.cloud.compute.v1.PublicAdvertisedPrefixPublicDelegatedPrefix + .parser(), + extensionRegistry); + if (publicDelegatedPrefixsBuilder_ == null) { + ensurePublicDelegatedPrefixsIsMutable(); + publicDelegatedPrefixs_.add(m); + } else { + publicDelegatedPrefixsBuilder_.addMessage(m); + } + break; + } // case -888473510 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -645248918 + 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.compute.v1.PublicAdvertisedPrefix) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3603,7 +3555,18 @@ public PublicAdvertisedPrefix parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PublicAdvertisedPrefix(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefixList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefixList.java index df88607fd7cd..4a690b811f16 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefixList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefixList.java @@ -55,106 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PublicAdvertisedPrefixList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.PublicAdvertisedPrefix.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PublicAdvertisedPrefixList_descriptor; @@ -574,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -601,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -638,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -673,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -825,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1004,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PublicAdvertisedPrefixList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1019,18 +920,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PublicAdvertisedPrefixList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.PublicAdvertisedPrefix m = + input.readMessage( + com.google.cloud.compute.v1.PublicAdvertisedPrefix.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.PublicAdvertisedPrefixList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2087,7 +2045,18 @@ public PublicAdvertisedPrefixList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PublicAdvertisedPrefixList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefixPublicDelegatedPrefix.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefixPublicDelegatedPrefix.java index 5faf9206f5ba..bdf515905509 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefixPublicDelegatedPrefix.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicAdvertisedPrefixPublicDelegatedPrefix.java @@ -58,81 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PublicAdvertisedPrefixPublicDelegatedPrefix( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - name_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - region_ = s; - break; - } - case 1160741162: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - ipRange_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - status_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PublicAdvertisedPrefixPublicDelegatedPrefix_descriptor; @@ -498,7 +423,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -522,7 +447,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -558,7 +483,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -589,7 +514,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -722,17 +647,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PublicAdvertisedPrefixPublicDelegatedPrefix.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 @@ -880,7 +798,7 @@ public Builder mergeFrom( status_ = other.status_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -895,19 +813,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PublicAdvertisedPrefixPublicDelegatedPrefix 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26989658 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1111570338 + case 1160741162: + { + ipRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1160741162 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1450082194 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1820481738 + 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.compute.v1.PublicAdvertisedPrefixPublicDelegatedPrefix) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1549,7 +1509,19 @@ public PublicAdvertisedPrefixPublicDelegatedPrefix parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PublicAdvertisedPrefixPublicDelegatedPrefix(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefix.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefix.java index 7ac925bc3313..b4e245670e55 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefix.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefix.java @@ -62,148 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PublicDelegatedPrefix( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - name_ = s; - break; - } - case 121871930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - parentPrefix_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 784938578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - ipCidrRange_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - region_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - status_ = s; - break; - } - case 1511520354: - { - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - publicDelegatedSubPrefixs_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .PublicDelegatedPrefixPublicDelegatedSubPrefix>(); - mutable_bitField0_ |= 0x00000200; - } - publicDelegatedSubPrefixs_.add( - input.readMessage( - com.google.cloud.compute.v1.PublicDelegatedPrefixPublicDelegatedSubPrefix - .parser(), - extensionRegistry)); - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - fingerprint_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - selfLink_ = s; - break; - } - case -200376448: - { - bitField0_ |= 0x00000020; - isLiveMigration_ = 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 { - if (((mutable_bitField0_ & 0x00000200) != 0)) { - publicDelegatedSubPrefixs_ = - java.util.Collections.unmodifiableList(publicDelegatedSubPrefixs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PublicDelegatedPrefix_descriptor; @@ -1270,7 +1128,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { output.writeBool(511823856, isLiveMigration_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1321,7 +1179,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(511823856, isLiveMigration_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1387,7 +1245,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1450,7 +1308,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1579,19 +1437,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.PublicDelegatedPrefix.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) { - getPublicDelegatedSubPrefixsFieldBuilder(); - } } @java.lang.Override @@ -1617,10 +1466,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000100); if (publicDelegatedSubPrefixsBuilder_ == null) { publicDelegatedSubPrefixs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); } else { + publicDelegatedSubPrefixs_ = null; publicDelegatedSubPrefixsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000200); region_ = ""; bitField0_ = (bitField0_ & ~0x00000400); selfLink_ = ""; @@ -1848,7 +1698,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PublicDelegatedPrefix other status_ = other.status_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1863,18 +1713,118 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PublicDelegatedPrefix 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 121871930: + { + parentPrefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 121871930 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 784938578: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 784938578 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1111570338 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 1450082194 + case 1511520354: + { + com.google.cloud.compute.v1.PublicDelegatedPrefixPublicDelegatedSubPrefix m = + input.readMessage( + com.google.cloud.compute.v1.PublicDelegatedPrefixPublicDelegatedSubPrefix + .parser(), + extensionRegistry); + if (publicDelegatedSubPrefixsBuilder_ == null) { + ensurePublicDelegatedSubPrefixsIsMutable(); + publicDelegatedSubPrefixs_.add(m); + } else { + publicDelegatedSubPrefixsBuilder_.addMessage(m); + } + break; + } // case 1511520354 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1877428002 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -645248918 + case -200376448: + { + isLiveMigration_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -200376448 + 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.compute.v1.PublicDelegatedPrefix) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3671,7 +3621,18 @@ public PublicDelegatedPrefix parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PublicDelegatedPrefix(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixAggregatedList.java index 1b7718352928..45e77210b891 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixAggregatedList.java @@ -57,120 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PublicDelegatedPrefixAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.compute.v1.PublicDelegatedPrefixesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PublicDelegatedPrefixAggregatedList_descriptor; @@ -720,7 +606,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -765,7 +651,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -803,7 +689,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -842,7 +728,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1174,7 +1060,7 @@ public Builder mergeFrom( if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1189,19 +1075,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PublicDelegatedPrefixAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.compute.v1.PublicDelegatedPrefixesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.PublicDelegatedPrefixAggregatedList) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2266,7 +2213,18 @@ public PublicDelegatedPrefixAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PublicDelegatedPrefixAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixList.java index 7db7623429b8..ee5266e11b70 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixList.java @@ -55,106 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PublicDelegatedPrefixList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.PublicDelegatedPrefix.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PublicDelegatedPrefixList_descriptor; @@ -574,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -601,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -638,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -673,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -825,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1004,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PublicDelegatedPrefixList o if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1019,18 +920,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PublicDelegatedPrefixList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.PublicDelegatedPrefix m = + input.readMessage( + com.google.cloud.compute.v1.PublicDelegatedPrefix.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.PublicDelegatedPrefixList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2085,7 +2043,18 @@ public PublicDelegatedPrefixList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PublicDelegatedPrefixList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixPublicDelegatedSubPrefix.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixPublicDelegatedSubPrefix.java index b5286d199adc..75f3d1754ed1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixPublicDelegatedSubPrefix.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixPublicDelegatedSubPrefix.java @@ -59,94 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PublicDelegatedPrefixPublicDelegatedSubPrefix( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - name_ = s; - break; - } - case 784938578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - ipCidrRange_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - region_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - status_ = s; - break; - } - case -1474023688: - { - bitField0_ |= 0x00000008; - isAddress_ = input.readBool(); - break; - } - case -976082222: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - delegateeProject_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_PublicDelegatedPrefixPublicDelegatedSubPrefix_descriptor; @@ -748,7 +660,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -779,7 +691,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -824,7 +736,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -863,7 +775,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -996,17 +908,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.PublicDelegatedPrefixPublicDelegatedSubPrefix.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 @@ -1175,7 +1080,7 @@ public Builder mergeFrom( status_ = other.status_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1190,20 +1095,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PublicDelegatedPrefixPublicDelegatedSubPrefix 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26989658 + case 784938578: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 784938578 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1111570338 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1450082194 + case -1474023688: + { + isAddress_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case -1474023688 + case -976082222: + { + delegateeProject_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -976082222 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + 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.compute.v1.PublicDelegatedPrefixPublicDelegatedSubPrefix) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2038,7 +1996,19 @@ public PublicDelegatedPrefixPublicDelegatedSubPrefix parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PublicDelegatedPrefixPublicDelegatedSubPrefix(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixesScopedList.java index 2f8a00b6f6ed..17d1fad67dee 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/PublicDelegatedPrefixesScopedList.java @@ -52,78 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PublicDelegatedPrefixesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1772877646: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - publicDelegatedPrefixes_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - publicDelegatedPrefixes_.add( - input.readMessage( - com.google.cloud.compute.v1.PublicDelegatedPrefix.parser(), - extensionRegistry)); - 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)) { - publicDelegatedPrefixes_ = java.util.Collections.unmodifiableList(publicDelegatedPrefixes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_PublicDelegatedPrefixesScopedList_descriptor; @@ -288,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < publicDelegatedPrefixes_.size(); i++) { output.writeMessage(315261206, publicDelegatedPrefixes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -305,7 +233,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 315261206, publicDelegatedPrefixes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -327,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -346,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -496,10 +424,11 @@ public Builder clear() { super.clear(); if (publicDelegatedPrefixesBuilder_ == null) { publicDelegatedPrefixes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + publicDelegatedPrefixes_ = null; publicDelegatedPrefixesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -636,7 +565,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.PublicDelegatedPrefixesScop if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -651,19 +580,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.PublicDelegatedPrefixesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1772877646: + { + com.google.cloud.compute.v1.PublicDelegatedPrefix m = + input.readMessage( + com.google.cloud.compute.v1.PublicDelegatedPrefix.parser(), + extensionRegistry); + if (publicDelegatedPrefixesBuilder_ == null) { + ensurePublicDelegatedPrefixesIsMutable(); + publicDelegatedPrefixes_.add(m); + } else { + publicDelegatedPrefixesBuilder_.addMessage(m); + } + break; + } // case -1772877646 + 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.compute.v1.PublicDelegatedPrefixesScopedList) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1288,7 +1249,18 @@ public PublicDelegatedPrefixesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PublicDelegatedPrefixesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Quota.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Quota.java index 669be012f071..0127a66a5598 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Quota.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Quota.java @@ -53,72 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Quota( - 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 823811545: - { - bitField0_ |= 0x00000001; - limit_ = input.readDouble(); - break; - } - case 849319322: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - owner_ = s; - break; - } - case 892595465: - { - bitField0_ |= 0x00000008; - usage_ = input.readDouble(); - break; - } - case -30429822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - metric_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Quota_descriptor; @@ -1296,7 +1230,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 533067184, metric_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1317,7 +1251,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(533067184, metric_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1350,7 +1284,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Double.doubleToLongBits(getUsage()) != java.lang.Double.doubleToLongBits(other.getUsage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1383,7 +1317,7 @@ public int hashCode() { + com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getUsage())); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1511,17 +1445,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Quota.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 @@ -1645,7 +1572,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Quota other) { if (other.hasUsage()) { setUsage(other.getUsage()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1660,17 +1587,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Quota 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 823811545: + { + limit_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 823811545 + case 849319322: + { + owner_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 849319322 + case 892595465: + { + usage_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 892595465 + case -30429822: + { + metric_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -30429822 + 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.compute.v1.Quota) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2088,7 +2053,18 @@ public Quota parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Quota(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RawDisk.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RawDisk.java index 9640eda64931..638c5af9dbae 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RawDisk.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RawDisk.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RawDisk( - 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 1417887962: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - source_ = s; - break; - } - case -1779412502: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - sha1Checksum_ = s; - break; - } - case -1744494142: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - containerType_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RawDisk_descriptor; @@ -468,7 +407,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 318809144, containerType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +425,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(318809144, containerType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -513,7 +452,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSource()) { if (!getSource().equals(other.getSource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -536,7 +475,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -664,17 +603,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RawDisk.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 @@ -791,7 +723,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RawDisk other) { source_ = other.source_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -806,17 +738,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RawDisk 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 1417887962: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1417887962 + case -1779412502: + { + sha1Checksum_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1779412502 + case -1744494142: + { + containerType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1744494142 + 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.compute.v1.RawDisk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1220,7 +1184,18 @@ public RawDisk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RawDisk(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RecreateInstancesInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RecreateInstancesInstanceGroupManagerRequest.java index 8720e1dc6d7a..a568c0cce758 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RecreateInstancesInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RecreateInstancesInstanceGroupManagerRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RecreateInstancesInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 171247618: - { - com.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequest.Builder - subBuilder = null; - if (instanceGroupManagersRecreateInstancesRequestResource_ != null) { - subBuilder = instanceGroupManagersRecreateInstancesRequestResource_.toBuilder(); - } - instanceGroupManagersRecreateInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagersRecreateInstancesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagersRecreateInstancesRequestResource_); - instanceGroupManagersRecreateInstancesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RecreateInstancesInstanceGroupManagerRequest_descriptor; @@ -469,7 +382,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -497,7 +410,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -527,7 +440,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -552,7 +465,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -685,17 +598,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest.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 @@ -837,7 +743,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -852,19 +758,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RecreateInstancesInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 171247618: + { + input.readMessage( + getInstanceGroupManagersRecreateInstancesRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 171247618 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.RecreateInstancesInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1587,7 +1538,19 @@ public RecreateInstancesInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RecreateInstancesInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RecreateInstancesRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RecreateInstancesRegionInstanceGroupManagerRequest.java index b79bc54b8a41..794bb0775d22 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RecreateInstancesRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RecreateInstancesRegionInstanceGroupManagerRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RecreateInstancesRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1367994530: - { - com.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequest.Builder - subBuilder = null; - if (regionInstanceGroupManagersRecreateRequestResource_ != null) { - subBuilder = regionInstanceGroupManagersRecreateRequestResource_.toBuilder(); - } - regionInstanceGroupManagersRecreateRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupManagersRecreateRequestResource_); - regionInstanceGroupManagersRecreateRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RecreateInstancesRegionInstanceGroupManagerRequest_descriptor; @@ -470,7 +383,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -498,7 +411,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -529,7 +442,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -554,7 +467,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -693,17 +606,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerRequest.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 @@ -847,7 +753,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -862,20 +768,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RecreateInstancesRegionInstanceGroupManagerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1367994530: + { + input.readMessage( + getRegionInstanceGroupManagersRecreateRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 1367994530 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.RecreateInstancesRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1601,8 +1551,19 @@ public RecreateInstancesRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RecreateInstancesRegionInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Reference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Reference.java index 7e808acce046..d288f8795f4f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Reference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Reference.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Reference( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - kind_ = s; - break; - } - case 1542687882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - target_ = s; - break; - } - case 1980169586: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - referenceType_ = s; - break; - } - case -1485577990: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - referrer_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Reference_descriptor; @@ -421,7 +353,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 351173663, referrer_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -442,7 +374,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(351173663, referrer_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -473,7 +405,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTarget()) { if (!getTarget().equals(other.getTarget())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -500,7 +432,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_FIELD_NUMBER; hash = (53 * hash) + getTarget().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -628,17 +560,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Reference.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 @@ -767,7 +692,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Reference other) { target_ = other.target_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -782,17 +707,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Reference 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26336418 + case 1542687882: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1542687882 + case 1980169586: + { + referenceType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1980169586 + case -1485577990: + { + referrer_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1485577990 + 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.compute.v1.Reference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1310,7 +1273,18 @@ public Reference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Reference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Region.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Region.java index 5919e3815cef..78114b2d6b21 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Region.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Region.java @@ -59,142 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Region( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 671865712: - { - bitField0_ |= 0x00000100; - supportsPzs_ = input.readBool(); - break; - } - case 928682554: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - zones_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000400; - } - zones_.add(s); - break; - } - case 1002735578: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - quotas_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - quotas_.add( - input.readMessage(com.google.cloud.compute.v1.Quota.parser(), extensionRegistry)); - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - status_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - selfLink_ = s; - break; - } - case -173855334: - { - com.google.cloud.compute.v1.DeprecationStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = deprecated_.toBuilder(); - } - deprecated_ = - input.readMessage( - com.google.cloud.compute.v1.DeprecationStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deprecated_); - deprecated_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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_ & 0x00000400) != 0)) { - zones_ = zones_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - quotas_ = java.util.Collections.unmodifiableList(quotas_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Region_descriptor; @@ -1016,7 +880,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(515138995, getDeprecated()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1064,7 +928,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(515138995, getDeprecated()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1117,7 +981,7 @@ public boolean equals(final java.lang.Object obj) { if (getSupportsPzs() != other.getSupportsPzs()) return false; } if (!getZonesList().equals(other.getZonesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1172,7 +1036,7 @@ public int hashCode() { hash = (37 * hash) + ZONES_FIELD_NUMBER; hash = (53 * hash) + getZonesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1337,10 +1201,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000020); if (quotasBuilder_ == null) { quotas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + quotas_ = null; quotasBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00000080); status_ = ""; @@ -1557,7 +1422,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Region other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1572,17 +1437,105 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Region 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 671865712: + { + supportsPzs_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 671865712 + case 928682554: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureZonesIsMutable(); + zones_.add(s); + break; + } // case 928682554 + case 1002735578: + { + com.google.cloud.compute.v1.Quota m = + input.readMessage( + com.google.cloud.compute.v1.Quota.parser(), extensionRegistry); + if (quotasBuilder_ == null) { + ensureQuotasIsMutable(); + quotas_.add(m); + } else { + quotasBuilder_.addMessage(m); + } + break; + } // case 1002735578 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 1450082194 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -645248918 + case -173855334: + { + input.readMessage(getDeprecatedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -173855334 + 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.compute.v1.Region) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3181,7 +3134,18 @@ public Region parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Region(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerList.java index d1b977e5991b..e2723b81fccb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionAutoscalerList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionAutoscalerList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionAutoscalerList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RegionAutoscalerList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,17 +921,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionAutoscalerList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Autoscaler m = + input.readMessage( + com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.RegionAutoscalerList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2080,7 +2040,18 @@ public RegionAutoscalerList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionAutoscalerList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDiskTypeList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDiskTypeList.java index 445ee3aab78c..f8ac4b76a502 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDiskTypeList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDiskTypeList.java @@ -55,104 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionDiskTypeList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.DiskType.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionDiskTypeList_descriptor; @@ -572,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -822,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1000,7 +903,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RegionDiskTypeList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1015,17 +918,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionDiskTypeList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.DiskType m = + input.readMessage( + com.google.cloud.compute.v1.DiskType.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.RegionDiskTypeList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2077,7 +2037,18 @@ public RegionDiskTypeList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionDiskTypeList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksAddResourcePoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksAddResourcePoliciesRequest.java index 70a7608d010d..7c81bf847332 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksAddResourcePoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksAddResourcePoliciesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionDisksAddResourcePoliciesRequest( - 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 177763082: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - resourcePolicies_.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)) { - resourcePolicies_ = resourcePolicies_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionDisksAddResourcePoliciesRequest_descriptor; @@ -200,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 22220385, resourcePolicies_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -217,7 +164,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getResourcePoliciesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -234,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequest) obj; if (!getResourcePoliciesList().equals(other.getResourcePoliciesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -249,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_POLICIES_FIELD_NUMBER; hash = (53 * hash) + getResourcePoliciesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -380,17 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequest.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 @@ -494,7 +434,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -509,19 +449,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionDisksAddResourcePoliciesRequest 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 177763082: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 177763082 + 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.compute.v1.RegionDisksAddResourcePoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -729,7 +688,18 @@ public RegionDisksAddResourcePoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionDisksAddResourcePoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksRemoveResourcePoliciesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksRemoveResourcePoliciesRequest.java index 4725cb44211f..87a43b6ffe74 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksRemoveResourcePoliciesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksRemoveResourcePoliciesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionDisksRemoveResourcePoliciesRequest( - 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 177763082: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourcePolicies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - resourcePolicies_.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)) { - resourcePolicies_ = resourcePolicies_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionDisksRemoveResourcePoliciesRequest_descriptor; @@ -200,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 22220385, resourcePolicies_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -217,7 +164,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getResourcePoliciesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -234,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequest) obj; if (!getResourcePoliciesList().equals(other.getResourcePoliciesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -249,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_POLICIES_FIELD_NUMBER; hash = (53 * hash) + getResourcePoliciesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -380,17 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequest.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 @@ -496,7 +436,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -511,19 +451,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequest 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 177763082: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(s); + break; + } // case 177763082 + 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.compute.v1.RegionDisksRemoveResourcePoliciesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -731,7 +690,18 @@ public RegionDisksRemoveResourcePoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionDisksRemoveResourcePoliciesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksResizeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksResizeRequest.java index bffa98200d33..037c3e58bb43 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksResizeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionDisksResizeRequest.java @@ -49,52 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionDisksResizeRequest( - 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 -335532344: - { - bitField0_ |= 0x00000001; - sizeGb_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionDisksResizeRequest_descriptor; @@ -161,7 +115,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(494929369, sizeGb_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -173,7 +127,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(494929369, sizeGb_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -193,7 +147,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSizeGb()) { if (getSizeGb() != other.getSizeGb()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -208,7 +162,7 @@ public int hashCode() { hash = (37 * hash) + SIZE_GB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSizeGb()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -336,17 +290,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RegionDisksResizeRequest.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 @@ -441,7 +388,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RegionDisksResizeRequest ot if (other.hasSizeGb()) { setSizeGb(other.getSizeGb()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -456,18 +403,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionDisksResizeRequest 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 -335532344: + { + sizeGb_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case -335532344 + 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.compute.v1.RegionDisksResizeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -572,7 +538,18 @@ public RegionDisksResizeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionDisksResizeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupList.java index 55c94751ed23..5104596f6f39 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceGroup.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RegionInstanceGroupList oth if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,18 +921,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InstanceGroup m = + input.readMessage( + com.google.cloud.compute.v1.InstanceGroup.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.RegionInstanceGroupList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2081,7 +2040,18 @@ public RegionInstanceGroupList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerDeleteInstanceConfigReq.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerDeleteInstanceConfigReq.java index 2fa5cedfdf5f..474223ce4403 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerDeleteInstanceConfigReq.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerDeleteInstanceConfigReq.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagerDeleteInstanceConfigReq( - 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 836680258: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - names_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - names_.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)) { - names_ = names_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerDeleteInstanceConfigReq_descriptor; @@ -201,7 +148,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < names_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 104585032, names_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -218,7 +165,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getNamesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq) obj; if (!getNamesList().equals(other.getNamesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -251,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + NAMES_FIELD_NUMBER; hash = (53 * hash) + getNamesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -389,17 +336,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq.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 @@ -509,7 +449,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -524,20 +464,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq 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 836680258: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNamesIsMutable(); + names_.add(s); + break; + } // case 836680258 + 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.compute.v1.RegionInstanceGroupManagerDeleteInstanceConfigReq) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -748,8 +706,19 @@ public RegionInstanceGroupManagerDeleteInstanceConfigReq parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagerDeleteInstanceConfigReq( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerList.java index a0218db6242b..956f2ef093d4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerList.java @@ -57,106 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagerList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManager.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerList_descriptor; @@ -576,7 +476,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -603,7 +503,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -640,7 +540,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -675,7 +575,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -828,10 +728,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1007,7 +908,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RegionInstanceGroupManagerL if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1022,18 +923,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagerList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InstanceGroupManager m = + input.readMessage( + com.google.cloud.compute.v1.InstanceGroupManager.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.RegionInstanceGroupManagerList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2087,7 +2045,18 @@ public RegionInstanceGroupManagerList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagerList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerPatchInstanceConfigReq.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerPatchInstanceConfigReq.java index 095681680153..ee2b49e40aad 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerPatchInstanceConfigReq.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerPatchInstanceConfigReq.java @@ -54,61 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagerPatchInstanceConfigReq( - 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 -84847286: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - perInstanceConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - perInstanceConfigs_.add( - input.readMessage( - com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry)); - 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)) { - perInstanceConfigs_ = java.util.Collections.unmodifiableList(perInstanceConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerPatchInstanceConfigReq_descriptor; @@ -217,7 +162,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < perInstanceConfigs_.size(); i++) { output.writeMessage(526265001, perInstanceConfigs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -231,7 +176,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 526265001, perInstanceConfigs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -249,7 +194,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq) obj; if (!getPerInstanceConfigsList().equals(other.getPerInstanceConfigsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -264,7 +209,7 @@ public int hashCode() { hash = (37 * hash) + PER_INSTANCE_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + getPerInstanceConfigsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -402,19 +347,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq.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) { - getPerInstanceConfigsFieldBuilder(); - } } @java.lang.Override @@ -422,10 +358,11 @@ public Builder clear() { super.clear(); if (perInstanceConfigsBuilder_ == null) { perInstanceConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + perInstanceConfigs_ = null; perInstanceConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -548,7 +485,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -563,20 +500,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq 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 -84847286: + { + com.google.cloud.compute.v1.PerInstanceConfig m = + input.readMessage( + com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry); + if (perInstanceConfigsBuilder_ == null) { + ensurePerInstanceConfigsIsMutable(); + perInstanceConfigs_.add(m); + } else { + perInstanceConfigsBuilder_.addMessage(m); + } + break; + } // case -84847286 + 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.compute.v1.RegionInstanceGroupManagerPatchInstanceConfigReq) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -998,7 +959,19 @@ public RegionInstanceGroupManagerPatchInstanceConfigReq parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagerPatchInstanceConfigReq(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerUpdateInstanceConfigReq.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerUpdateInstanceConfigReq.java index c52fdc89ab51..295a507b960e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerUpdateInstanceConfigReq.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagerUpdateInstanceConfigReq.java @@ -54,61 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagerUpdateInstanceConfigReq( - 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 -84847286: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - perInstanceConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - perInstanceConfigs_.add( - input.readMessage( - com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry)); - 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)) { - perInstanceConfigs_ = java.util.Collections.unmodifiableList(perInstanceConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagerUpdateInstanceConfigReq_descriptor; @@ -217,7 +162,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < perInstanceConfigs_.size(); i++) { output.writeMessage(526265001, perInstanceConfigs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -231,7 +176,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 526265001, perInstanceConfigs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -249,7 +194,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReq) obj; if (!getPerInstanceConfigsList().equals(other.getPerInstanceConfigsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -264,7 +209,7 @@ public int hashCode() { hash = (37 * hash) + PER_INSTANCE_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + getPerInstanceConfigsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -402,19 +347,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReq.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) { - getPerInstanceConfigsFieldBuilder(); - } } @java.lang.Override @@ -422,10 +358,11 @@ public Builder clear() { super.clear(); if (perInstanceConfigsBuilder_ == null) { perInstanceConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + perInstanceConfigs_ = null; perInstanceConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -549,7 +486,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -564,20 +501,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReq 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 -84847286: + { + com.google.cloud.compute.v1.PerInstanceConfig m = + input.readMessage( + com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry); + if (perInstanceConfigsBuilder_ == null) { + ensurePerInstanceConfigsIsMutable(); + perInstanceConfigs_.add(m); + } else { + perInstanceConfigsBuilder_.addMessage(m); + } + break; + } // case -84847286 + 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.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReq) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -999,8 +960,19 @@ public RegionInstanceGroupManagerUpdateInstanceConfigReq parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagerUpdateInstanceConfigReq( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersAbandonInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersAbandonInstancesRequest.java index 754f95d46adf..7951b478b293 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersAbandonInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersAbandonInstancesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagersAbandonInstancesRequest( - 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 232780786: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.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)) { - instances_ = instances_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersAbandonInstancesRequest_descriptor; @@ -200,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 29097598, instances_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -217,7 +164,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getInstancesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest) obj; if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -251,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -389,17 +336,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest.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 @@ -509,7 +449,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -524,20 +464,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest 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 232780786: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstancesIsMutable(); + instances_.add(s); + break; + } // case 232780786 + 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.compute.v1.RegionInstanceGroupManagersAbandonInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -750,8 +708,19 @@ public RegionInstanceGroupManagersAbandonInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagersAbandonInstancesRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersApplyUpdatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersApplyUpdatesRequest.java index 30d2da0d897d..984449167fde 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersApplyUpdatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersApplyUpdatesRequest.java @@ -56,79 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagersApplyUpdatesRequest( - 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 232780786: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - instances_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - instances_.add(s); - break; - } - case 528824426: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - mostDisruptiveAllowedAction_ = s; - break; - } - case -2130430814: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - minimalAction_ = s; - break; - } - case -1065555200: - { - bitField0_ |= 0x00000001; - allInstances_ = 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 { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - instances_ = instances_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersApplyUpdatesRequest_descriptor; @@ -648,7 +575,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(403676512, allInstances_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -676,7 +603,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(403676512, allInstances_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -707,7 +634,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMostDisruptiveAllowedAction().equals(other.getMostDisruptiveAllowedAction())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -734,7 +661,7 @@ public int hashCode() { hash = (37 * hash) + MOST_DISRUPTIVE_ALLOWED_ACTION_FIELD_NUMBER; hash = (53 * hash) + getMostDisruptiveAllowedAction().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -872,17 +799,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequest.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 @@ -1024,7 +944,7 @@ public Builder mergeFrom( mostDisruptiveAllowedAction_ = other.mostDisruptiveAllowedAction_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1039,20 +959,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequest 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 232780786: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstancesIsMutable(); + instances_.add(s); + break; + } // case 232780786 + case 528824426: + { + mostDisruptiveAllowedAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 528824426 + case -2130430814: + { + minimalAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -2130430814 + case -1065555200: + { + allInstances_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1065555200 + 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.compute.v1.RegionInstanceGroupManagersApplyUpdatesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1581,7 +1537,19 @@ public RegionInstanceGroupManagersApplyUpdatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagersApplyUpdatesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersCreateInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersCreateInstancesRequest.java index 3251013046d1..d1bcaa64e675 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersCreateInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersCreateInstancesRequest.java @@ -54,61 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagersCreateInstancesRequest( - 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 232780786: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage( - com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry)); - 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)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersCreateInstancesRequest_descriptor; @@ -211,7 +156,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { output.writeMessage(29097598, instances_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -223,7 +168,7 @@ public int getSerializedSize() { for (int i = 0; i < instances_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(29097598, instances_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -241,7 +186,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest) obj; if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -256,7 +201,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -394,19 +339,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest.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) { - getInstancesFieldBuilder(); - } } @java.lang.Override @@ -414,10 +350,11 @@ public Builder clear() { super.clear(); if (instancesBuilder_ == null) { instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instances_ = null; instancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -541,7 +478,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -556,20 +493,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest 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 232780786: + { + com.google.cloud.compute.v1.PerInstanceConfig m = + input.readMessage( + com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 232780786 + 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.compute.v1.RegionInstanceGroupManagersCreateInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -963,8 +924,19 @@ public RegionInstanceGroupManagersCreateInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagersCreateInstancesRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersDeleteInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersDeleteInstancesRequest.java index e4528517712b..beccb574a2bc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersDeleteInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersDeleteInstancesRequest.java @@ -53,65 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagersDeleteInstancesRequest( - 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 232780786: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add(s); - break; - } - case 325048584: - { - bitField0_ |= 0x00000001; - skipInstancesOnValidationError_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = instances_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersDeleteInstancesRequest_descriptor; @@ -243,7 +184,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(40631073, skipInstancesOnValidationError_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -265,7 +206,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 40631073, skipInstancesOnValidationError_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -289,7 +230,7 @@ public boolean equals(final java.lang.Object obj) { if (getSkipInstancesOnValidationError() != other.getSkipInstancesOnValidationError()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -310,7 +251,7 @@ public int hashCode() { (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipInstancesOnValidationError()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -447,17 +388,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest.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 @@ -578,7 +512,7 @@ public Builder mergeFrom( if (other.hasSkipInstancesOnValidationError()) { setSkipInstancesOnValidationError(other.getSkipInstancesOnValidationError()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -593,20 +527,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest 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 232780786: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstancesIsMutable(); + instances_.add(s); + break; + } // case 232780786 + case 325048584: + { + skipInstancesOnValidationError_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 325048584 + 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.compute.v1.RegionInstanceGroupManagersDeleteInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -884,8 +842,19 @@ public RegionInstanceGroupManagersDeleteInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagersDeleteInstancesRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListErrorsResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListErrorsResponse.java index 4872074f4580..c5c528519e49 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListErrorsResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListErrorsResponse.java @@ -54,70 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagersListErrorsResponse( - 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 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - items_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.InstanceManagedByIgmError>(); - mutable_bitField0_ |= 0x00000001; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceManagedByIgmError.parser(), - extensionRegistry)); - 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)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListErrorsResponse_descriptor; @@ -289,7 +225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < items_.size(); i++) { output.writeMessage(100526016, items_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +240,7 @@ public int getSerializedSize() { for (int i = 0; i < items_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(100526016, items_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -326,7 +262,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNextPageToken()) { if (!getNextPageToken().equals(other.getNextPageToken())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -345,7 +281,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; } @@ -477,19 +413,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagersListErrorsResponse.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) { - getItemsFieldBuilder(); - } } @java.lang.Override @@ -497,10 +424,11 @@ public Builder clear() { super.clear(); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -636,7 +564,7 @@ public Builder mergeFrom( nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -651,20 +579,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagersListErrorsResponse 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 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InstanceManagedByIgmError m = + input.readMessage( + com.google.cloud.compute.v1.InstanceManagedByIgmError.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + 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.compute.v1.RegionInstanceGroupManagersListErrorsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1184,7 +1143,19 @@ public RegionInstanceGroupManagersListErrorsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagersListErrorsResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListInstanceConfigsResp.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListInstanceConfigsResp.java index 5363400c8efe..305e1126c036 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListInstanceConfigsResp.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListInstanceConfigsResp.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagersListInstanceConfigsResp( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry)); - 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)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListInstanceConfigsResp_descriptor; @@ -350,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < items_.size(); i++) { output.writeMessage(100526016, items_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -368,7 +291,7 @@ public int getSerializedSize() { for (int i = 0; i < items_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(100526016, items_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -395,7 +318,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -418,7 +341,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -577,10 +500,11 @@ public Builder clear() { super.clear(); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; bitField0_ = (bitField0_ & ~0x00000002); if (warningBuilder_ == null) { @@ -734,7 +658,7 @@ public Builder mergeFrom( if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,20 +673,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagersListInstanceConfigsResp 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.PerInstanceConfig m = + input.readMessage( + com.google.cloud.compute.v1.PerInstanceConfig.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + 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.compute.v1.RegionInstanceGroupManagersListInstanceConfigsResp) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1462,8 +1422,19 @@ public RegionInstanceGroupManagersListInstanceConfigsResp parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagersListInstanceConfigsResp( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListInstancesResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListInstancesResponse.java index 4be69cae8d5f..6223d38d00d0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListInstancesResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersListInstancesResponse.java @@ -54,68 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagersListInstancesResponse( - 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 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - nextPageToken_ = s; - break; - } - case -1605210382: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - managedInstances_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - managedInstances_.add( - input.readMessage( - com.google.cloud.compute.v1.ManagedInstance.parser(), extensionRegistry)); - 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)) { - managedInstances_ = java.util.Collections.unmodifiableList(managedInstances_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersListInstancesResponse_descriptor; @@ -287,7 +225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < managedInstances_.size(); i++) { output.writeMessage(336219614, managedInstances_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +242,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 336219614, managedInstances_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -326,7 +264,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNextPageToken()) { if (!getNextPageToken().equals(other.getNextPageToken())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -345,7 +283,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; } @@ -482,19 +420,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagersListInstancesResponse.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) { - getManagedInstancesFieldBuilder(); - } } @java.lang.Override @@ -502,10 +431,11 @@ public Builder clear() { super.clear(); if (managedInstancesBuilder_ == null) { managedInstances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + managedInstances_ = null; managedInstancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -641,7 +571,7 @@ public Builder mergeFrom( nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -656,20 +586,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagersListInstancesResponse 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 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 638380202 + case -1605210382: + { + com.google.cloud.compute.v1.ManagedInstance m = + input.readMessage( + com.google.cloud.compute.v1.ManagedInstance.parser(), extensionRegistry); + if (managedInstancesBuilder_ == null) { + ensureManagedInstancesIsMutable(); + managedInstances_.add(m); + } else { + managedInstancesBuilder_.addMessage(m); + } + break; + } // case -1605210382 + 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.compute.v1.RegionInstanceGroupManagersListInstancesResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1191,7 +1151,19 @@ public RegionInstanceGroupManagersListInstancesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagersListInstancesResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersRecreateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersRecreateRequest.java index 0dbefa89fda7..77557bea73f9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersRecreateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersRecreateRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagersRecreateRequest( - 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 232780786: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.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)) { - instances_ = instances_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersRecreateRequest_descriptor; @@ -199,7 +146,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 29097598, instances_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -216,7 +163,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getInstancesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -233,7 +180,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequest) obj; if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -248,7 +195,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -379,17 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequest.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 @@ -496,7 +436,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -511,19 +451,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagersRecreateRequest 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 232780786: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstancesIsMutable(); + instances_.add(s); + break; + } // case 232780786 + 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.compute.v1.RegionInstanceGroupManagersRecreateRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -732,7 +691,19 @@ public RegionInstanceGroupManagersRecreateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagersRecreateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersSetTargetPoolsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersSetTargetPoolsRequest.java index 8849df4b161e..8ed0aeb5990e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersSetTargetPoolsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersSetTargetPoolsRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagersSetTargetPoolsRequest( - 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 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - fingerprint_ = s; - break; - } - case -1606386358: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - targetPools_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - targetPools_.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_ & 0x00000002) != 0)) { - targetPools_ = targetPools_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersSetTargetPoolsRequest_descriptor; @@ -276,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < targetPools_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 336072617, targetPools_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -296,7 +236,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getTargetPoolsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -318,7 +258,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFingerprint().equals(other.getFingerprint())) return false; } if (!getTargetPoolsList().equals(other.getTargetPoolsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -337,7 +277,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_POOLS_FIELD_NUMBER; hash = (53 * hash) + getTargetPoolsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -474,17 +414,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequest.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 @@ -606,7 +539,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -621,20 +554,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequest 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 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1877428002 + case -1606386358: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTargetPoolsIsMutable(); + targetPools_.add(s); + break; + } // case -1606386358 + 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.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -965,7 +922,19 @@ public RegionInstanceGroupManagersSetTargetPoolsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagersSetTargetPoolsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersSetTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersSetTemplateRequest.java index 83c82d7c9487..db3ea4bd925c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersSetTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupManagersSetTemplateRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupManagersSetTemplateRequest( - 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 -1820981470: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - instanceTemplate_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupManagersSetTemplateRequest_descriptor; @@ -198,7 +151,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 309248228, instanceTemplate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -211,7 +164,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(309248228, instanceTemplate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -232,7 +185,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInstanceTemplate()) { if (!getInstanceTemplate().equals(other.getInstanceTemplate())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -247,7 +200,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCE_TEMPLATE_FIELD_NUMBER; hash = (53 * hash) + getInstanceTemplate().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -379,17 +332,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTemplateRequest.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 @@ -494,7 +440,7 @@ public Builder mergeFrom( instanceTemplate_ = other.instanceTemplate_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -509,20 +455,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTemplateRequest 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 -1820981470: + { + instanceTemplate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1820981470 + 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.compute.v1.RegionInstanceGroupManagersSetTemplateRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -684,7 +647,19 @@ public RegionInstanceGroupManagersSetTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupManagersSetTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsListInstances.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsListInstances.java index 4fd795eb70a9..195f9253a216 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsListInstances.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsListInstances.java @@ -56,106 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupsListInstances( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceWithNamedPorts.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupsListInstances_descriptor; @@ -575,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -602,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -639,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -674,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -826,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1007,7 +908,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RegionInstanceGroupsListIns if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1022,19 +923,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupsListInstances 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.InstanceWithNamedPorts m = + input.readMessage( + com.google.cloud.compute.v1.InstanceWithNamedPorts.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.RegionInstanceGroupsListInstances) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2092,7 +2049,18 @@ public RegionInstanceGroupsListInstances parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupsListInstances(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsListInstancesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsListInstancesRequest.java index f64fb0a3d68d..2fa33367af1c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsListInstancesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsListInstancesRequest.java @@ -54,60 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupsListInstancesRequest( - 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 332274762: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - portName_ = s; - break; - } - case 737788730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - instanceState_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupsListInstancesRequest_descriptor; @@ -435,7 +381,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 92223591, instanceState_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -450,7 +396,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(92223591, instanceState_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -474,7 +420,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPortName()) { if (!getPortName().equals(other.getPortName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -493,7 +439,7 @@ public int hashCode() { hash = (37 * hash) + PORT_NAME_FIELD_NUMBER; hash = (53 * hash) + getPortName().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -624,17 +570,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupsListInstancesRequest.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 @@ -747,7 +686,7 @@ public Builder mergeFrom( portName_ = other.portName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -762,19 +701,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupsListInstancesRequest 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 332274762: + { + portName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 332274762 + case 737788730: + { + instanceState_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 737788730 + 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.compute.v1.RegionInstanceGroupsListInstancesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1060,7 +1023,18 @@ public RegionInstanceGroupsListInstancesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupsListInstancesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsSetNamedPortsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsSetNamedPortsRequest.java index f4038704976c..4d633aadc6ac 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsSetNamedPortsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionInstanceGroupsSetNamedPortsRequest.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionInstanceGroupsSetNamedPortsRequest( - 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 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - fingerprint_ = s; - break; - } - case -874177438: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - namedPorts_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - namedPorts_.add( - input.readMessage( - com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry)); - 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_ & 0x00000002) != 0)) { - namedPorts_ = java.util.Collections.unmodifiableList(namedPorts_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionInstanceGroupsSetNamedPortsRequest_descriptor; @@ -284,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < namedPorts_.size(); i++) { output.writeMessage(427598732, namedPorts_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -300,7 +239,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(427598732, namedPorts_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -321,7 +260,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFingerprint().equals(other.getFingerprint())) return false; } if (!getNamedPortsList().equals(other.getNamedPortsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -340,7 +279,7 @@ public int hashCode() { hash = (37 * hash) + NAMED_PORTS_FIELD_NUMBER; hash = (53 * hash) + getNamedPortsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -471,19 +410,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionInstanceGroupsSetNamedPortsRequest.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) { - getNamedPortsFieldBuilder(); - } } @java.lang.Override @@ -493,10 +423,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (namedPortsBuilder_ == null) { namedPorts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + namedPorts_ = null; namedPortsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -627,7 +558,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -642,19 +573,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionInstanceGroupsSetNamedPortsRequest 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 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1877428002 + case -874177438: + { + com.google.cloud.compute.v1.NamedPort m = + input.readMessage( + com.google.cloud.compute.v1.NamedPort.parser(), extensionRegistry); + if (namedPortsBuilder_ == null) { + ensureNamedPortsIsMutable(); + namedPorts_.add(m); + } else { + namedPortsBuilder_.addMessage(m); + } + break; + } // case -874177438 + 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.compute.v1.RegionInstanceGroupsSetNamedPortsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1163,7 +1125,18 @@ public RegionInstanceGroupsSetNamedPortsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionInstanceGroupsSetNamedPortsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionList.java index 5ec5ed00f3f2..aed040454273 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Region.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -823,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RegionList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Region m = + input.readMessage( + com.google.cloud.compute.v1.Region.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.RegionList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2076,7 +2036,18 @@ public RegionList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.java index 548e52eb29c9..a3c9171c2172 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.java @@ -55,80 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse( - 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 -2117002342: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - firewalls_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - firewalls_.add( - input.readMessage( - com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry)); - break; - } - case -1007080942: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - firewallPolicys_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy>(); - mutable_bitField0_ |= 0x00000001; - } - firewallPolicys_.add( - input.readMessage( - com.google.cloud.compute.v1 - .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy - .parser(), - extensionRegistry)); - 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_ & 0x00000002) != 0)) { - firewalls_ = java.util.Collections.unmodifiableList(firewalls_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - firewallPolicys_ = java.util.Collections.unmodifiableList(firewallPolicys_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse_descriptor; @@ -327,7 +253,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < firewallPolicys_.size(); i++) { output.writeMessage(410985794, firewallPolicys_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -345,7 +271,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 410985794, firewallPolicys_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -366,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFirewallPolicysList().equals(other.getFirewallPolicysList())) return false; if (!getFirewallsList().equals(other.getFirewallsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -385,7 +311,7 @@ public int hashCode() { hash = (37 * hash) + FIREWALLS_FIELD_NUMBER; hash = (53 * hash) + getFirewallsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -538,20 +464,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse.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) { - getFirewallPolicysFieldBuilder(); - getFirewallsFieldBuilder(); - } } @java.lang.Override @@ -559,16 +475,18 @@ public Builder clear() { super.clear(); if (firewallPolicysBuilder_ == null) { firewallPolicys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + firewallPolicys_ = null; firewallPolicysBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (firewallsBuilder_ == null) { firewalls_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + firewalls_ = null; firewallsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -733,7 +651,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -748,20 +666,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse - 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 -2117002342: + { + com.google.cloud.compute.v1.Firewall m = + input.readMessage( + com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry); + if (firewallsBuilder_ == null) { + ensureFirewallsIsMutable(); + firewalls_.add(m); + } else { + firewallsBuilder_.addMessage(m); + } + break; + } // case -2117002342 + case -1007080942: + { + com.google.cloud.compute.v1 + .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy + m = + input.readMessage( + com.google.cloud.compute.v1 + .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy + .parser(), + extensionRegistry); + if (firewallPolicysBuilder_ == null) { + ensureFirewallPolicysIsMutable(); + firewallPolicys_.add(m); + } else { + firewallPolicysBuilder_.addMessage(m); + } + break; + } // case -1007080942 + 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.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1618,8 +1578,19 @@ public RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse parsePartialFr com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponse( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java index c1c0ee394f8e..0e62c4cc8f69 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.java @@ -59,81 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - name_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - type_ = s; - break; - } - case 35790658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - displayName_ = s; - break; - } - case 870991802: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - rules_.add( - input.readMessage( - com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry)); - 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_ & 0x00000004) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy_descriptor; @@ -586,7 +511,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < rules_.size(); i++) { output.writeMessage(108873975, rules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -607,7 +532,7 @@ public int getSerializedSize() { for (int i = 0; i < rules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(108873975, rules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -643,7 +568,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -670,7 +595,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -826,19 +751,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy.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) { - getRulesFieldBuilder(); - } } @java.lang.Override @@ -850,10 +766,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); type_ = ""; bitField0_ = (bitField0_ & ~0x00000008); return this; @@ -1024,7 +941,7 @@ public Builder mergeFrom( type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1039,22 +956,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1 - .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy - 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26989658 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 28604882 + case 35790658: + { + displayName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 35790658 + case 870991802: + { + com.google.cloud.compute.v1.FirewallPolicyRule m = + input.readMessage( + com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 870991802 + 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.compute.v1 - .RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1818,8 +1775,19 @@ public final Builder mergeUnknownFields( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicy( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionSetLabelsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionSetLabelsRequest.java index 8f67a65faad9..99ef662c79e6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionSetLabelsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionSetLabelsRequest.java @@ -51,66 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionSetLabelsRequest( - 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 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - labelFingerprint_ = s; - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionSetLabelsRequest_descriptor; @@ -319,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +282,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -363,7 +303,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLabelFingerprint().equals(other.getLabelFingerprint())) return false; } if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +470,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.RegionSetLabelsRequest.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 @@ -641,7 +574,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RegionSetLabelsRequest othe onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -656,18 +589,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionSetLabelsRequest 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 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1424998602 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.RegionSetLabelsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -983,7 +946,18 @@ public RegionSetLabelsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionSetLabelsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionSetPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionSetPolicyRequest.java index b18de5c4a8a0..c5a04dcae139 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionSetPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionSetPolicyRequest.java @@ -52,82 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionSetPolicyRequest( - 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 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 728574354: - { - com.google.cloud.compute.v1.Policy.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage(com.google.cloud.compute.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -1068952462: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bindings_.add( - input.readMessage( - com.google.cloud.compute.v1.Binding.parser(), extensionRegistry)); - 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)) { - bindings_ = java.util.Collections.unmodifiableList(bindings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionSetPolicyRequest_descriptor; @@ -346,7 +270,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < bindings_.size(); i++) { output.writeMessage(403251854, bindings_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -364,7 +288,7 @@ public int getSerializedSize() { for (int i = 0; i < bindings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(403251854, bindings_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -389,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -412,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -561,10 +485,11 @@ public Builder clear() { super.clear(); if (bindingsBuilder_ == null) { bindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bindings_ = null; bindingsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); etag_ = ""; bitField0_ = (bitField0_ & ~0x00000002); if (policyBuilder_ == null) { @@ -709,7 +634,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RegionSetPolicyRequest othe if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -724,18 +649,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionSetPolicyRequest 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 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 24987818 + case 728574354: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 728574354 + case -1068952462: + { + com.google.cloud.compute.v1.Binding m = + input.readMessage( + com.google.cloud.compute.v1.Binding.parser(), extensionRegistry); + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(m); + } else { + bindingsBuilder_.addMessage(m); + } + break; + } // case -1068952462 + 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.compute.v1.RegionSetPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1423,7 +1386,18 @@ public RegionSetPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionSetPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpsProxiesSetSslCertificatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpsProxiesSetSslCertificatesRequest.java index 3f4400698244..f259d523bf34 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpsProxiesSetSslCertificatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionTargetHttpsProxiesSetSslCertificatesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionTargetHttpsProxiesSetSslCertificatesRequest( - 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 -1366914950: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sslCertificates_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sslCertificates_.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)) { - sslCertificates_ = sslCertificates_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionTargetHttpsProxiesSetSslCertificatesRequest_descriptor; @@ -201,7 +148,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 366006543, sslCertificates_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -218,7 +165,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getSslCertificatesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequest) obj; if (!getSslCertificatesList().equals(other.getSslCertificatesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -251,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + SSL_CERTIFICATES_FIELD_NUMBER; hash = (53 * hash) + getSslCertificatesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -388,17 +335,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequest.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 @@ -508,7 +448,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -523,20 +463,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequest 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 -1366914950: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSslCertificatesIsMutable(); + sslCertificates_.add(s); + break; + } // case -1366914950 + 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.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -747,8 +705,19 @@ public RegionTargetHttpsProxiesSetSslCertificatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionTargetHttpsProxiesSetSslCertificatesRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionUrlMapsValidateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionUrlMapsValidateRequest.java index 845a7406d556..2fe7e21f9e83 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionUrlMapsValidateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RegionUrlMapsValidateRequest.java @@ -49,61 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RegionUrlMapsValidateRequest( - 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 1566449778: - { - com.google.cloud.compute.v1.UrlMap.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = resource_.toBuilder(); - } - resource_ = - input.readMessage(com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RegionUrlMapsValidateRequest_descriptor; @@ -183,7 +128,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(195806222, getResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +140,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(195806222, getResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -215,7 +160,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResource()) { if (!getResource().equals(other.getResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -230,7 +175,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -474,7 +419,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RegionUrlMapsValidateReques if (other.hasResource()) { mergeResource(other.getResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -489,18 +434,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RegionUrlMapsValidateRequest 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 1566449778: + { + input.readMessage(getResourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1566449778 + 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.compute.v1.RegionUrlMapsValidateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -724,7 +688,18 @@ public RegionUrlMapsValidateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RegionUrlMapsValidateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationFirewallPolicyRequest.java index fdef61feeb57..2b02baf77fe1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationFirewallPolicyRequest.java @@ -56,67 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveAssociationFirewallPolicyRequest( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveAssociationFirewallPolicyRequest_descriptor; @@ -333,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -351,7 +290,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -376,7 +315,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -529,17 +468,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest.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 @@ -659,7 +591,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -674,19 +606,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveAssociationFirewallPolicyRequest 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.RemoveAssociationFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1072,7 +1034,18 @@ public RemoveAssociationFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveAssociationFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationNetworkFirewallPolicyRequest.java index 5a255434367a..58a4e16664df 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationNetworkFirewallPolicyRequest.java @@ -57,74 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveAssociationNetworkFirewallPolicyRequest( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveAssociationNetworkFirewallPolicyRequest_descriptor; @@ -398,7 +330,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -419,7 +351,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +378,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +401,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -602,17 +534,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest.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 @@ -742,7 +667,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -757,20 +682,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.RemoveAssociationNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1274,7 +1234,19 @@ public RemoveAssociationNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveAssociationNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationRegionNetworkFirewallPolicyRequest.java index a8ec3c169eb3..28540be7f429 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveAssociationRegionNetworkFirewallPolicyRequest.java @@ -58,81 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveAssociationRegionNetworkFirewallPolicyRequest( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveAssociationRegionNetworkFirewallPolicyRequest_descriptor; @@ -462,7 +387,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +411,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -515,7 +440,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -540,7 +465,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -679,17 +604,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RemoveAssociationRegionNetworkFirewallPolicyRequest.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 @@ -828,7 +746,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -843,20 +761,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveAssociationRegionNetworkFirewallPolicyRequest - 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.RemoveAssociationRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1479,8 +1438,19 @@ public RemoveAssociationRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveAssociationRegionNetworkFirewallPolicyRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveHealthCheckTargetPoolRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveHealthCheckTargetPoolRequest.java index 64d9a5d826e8..e2ec2a7367fe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveHealthCheckTargetPoolRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveHealthCheckTargetPoolRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveHealthCheckTargetPoolRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 502370386: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetPool_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1855087206: - { - com.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequest.Builder subBuilder = - null; - if (targetPoolsRemoveHealthCheckRequestResource_ != null) { - subBuilder = targetPoolsRemoveHealthCheckRequestResource_.toBuilder(); - } - targetPoolsRemoveHealthCheckRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetPoolsRemoveHealthCheckRequestResource_); - targetPoolsRemoveHealthCheckRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveHealthCheckTargetPoolRequest_descriptor; @@ -464,7 +378,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetPoolsRemoveHealthCheckRequestResource_ != null) { output.writeMessage(304985011, getTargetPoolsRemoveHealthCheckRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -490,7 +404,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 304985011, getTargetPoolsRemoveHealthCheckRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -519,7 +433,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTargetPoolsRemoveHealthCheckRequestResource() .equals(other.getTargetPoolsRemoveHealthCheckRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -544,7 +458,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_POOLS_REMOVE_HEALTH_CHECK_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetPoolsRemoveHealthCheckRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -674,17 +588,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RemoveHealthCheckTargetPoolRequest.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 @@ -821,7 +728,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RemoveHealthCheckTargetPool mergeTargetPoolsRemoveHealthCheckRequestResource( other.getTargetPoolsRemoveHealthCheckRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -836,19 +743,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveHealthCheckTargetPoolRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 502370386: + { + targetPool_ = input.readStringRequireUtf8(); + + break; + } // case 502370386 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1855087206: + { + input.readMessage( + getTargetPoolsRemoveHealthCheckRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1855087206 + 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.compute.v1.RemoveHealthCheckTargetPoolRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1560,7 +1511,18 @@ public RemoveHealthCheckTargetPoolRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveHealthCheckTargetPoolRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveInstanceTargetPoolRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveInstanceTargetPoolRequest.java index 08ecb1ac2846..e9d29d5831c0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveInstanceTargetPoolRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveInstanceTargetPoolRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveInstanceTargetPoolRequest( - 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 236388378: - { - com.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequest.Builder subBuilder = - null; - if (targetPoolsRemoveInstanceRequestResource_ != null) { - subBuilder = targetPoolsRemoveInstanceRequestResource_.toBuilder(); - } - targetPoolsRemoveInstanceRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetPoolsRemoveInstanceRequestResource_); - targetPoolsRemoveInstanceRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 502370386: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetPool_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveInstanceTargetPoolRequest_descriptor; @@ -463,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +403,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTargetPoolsRemoveInstanceRequestResource() .equals(other.getTargetPoolsRemoveInstanceRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +457,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_POOLS_REMOVE_INSTANCE_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetPoolsRemoveInstanceRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RemoveInstanceTargetPoolRequest.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 @@ -818,7 +725,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RemoveInstanceTargetPoolReq mergeTargetPoolsRemoveInstanceRequestResource( other.getTargetPoolsRemoveInstanceRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -833,18 +740,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveInstanceTargetPoolRequest 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 236388378: + { + input.readMessage( + getTargetPoolsRemoveInstanceRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 236388378 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 502370386: + { + targetPool_ = input.readStringRequireUtf8(); + + break; + } // case 502370386 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.RemoveInstanceTargetPoolRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1552,7 +1504,18 @@ public RemoveInstanceTargetPoolRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveInstanceTargetPoolRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveInstancesInstanceGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveInstancesInstanceGroupRequest.java index 9e413ae21a80..a19df8f2f1fc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveInstancesInstanceGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveInstancesInstanceGroupRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveInstancesInstanceGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 648762026: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroup_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1167112758: - { - com.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequest.Builder subBuilder = - null; - if (instanceGroupsRemoveInstancesRequestResource_ != null) { - subBuilder = instanceGroupsRemoveInstancesRequestResource_.toBuilder(); - } - instanceGroupsRemoveInstancesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupsRemoveInstancesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupsRemoveInstancesRequestResource_); - instanceGroupsRemoveInstancesRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveInstancesInstanceGroupRequest_descriptor; @@ -465,7 +379,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupsRemoveInstancesRequestResource_ != null) { output.writeMessage(390981817, getInstanceGroupsRemoveInstancesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -491,7 +405,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 390981817, getInstanceGroupsRemoveInstancesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -520,7 +434,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -545,7 +459,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -675,17 +589,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest.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 @@ -823,7 +730,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -838,19 +745,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveInstancesInstanceGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 648762026: + { + instanceGroup_ = input.readStringRequireUtf8(); + + break; + } // case 648762026 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1167112758: + { + input.readMessage( + getInstanceGroupsRemoveInstancesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1167112758 + 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.compute.v1.RemoveInstancesInstanceGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1562,7 +1513,18 @@ public RemoveInstancesInstanceGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveInstancesInstanceGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemovePeeringNetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemovePeeringNetworkRequest.java index 93e7f04614b1..95f16750e4df 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemovePeeringNetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemovePeeringNetworkRequest.java @@ -54,84 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemovePeeringNetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = s; - break; - } - case -925667342: - { - com.google.cloud.compute.v1.NetworksRemovePeeringRequest.Builder subBuilder = null; - if (networksRemovePeeringRequestResource_ != null) { - subBuilder = networksRemovePeeringRequestResource_.toBuilder(); - } - networksRemovePeeringRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworksRemovePeeringRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networksRemovePeeringRequestResource_); - networksRemovePeeringRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemovePeeringNetworkRequest_descriptor; @@ -397,7 +319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (networksRemovePeeringRequestResource_ != null) { output.writeMessage(421162494, getNetworksRemovePeeringRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +342,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 421162494, getNetworksRemovePeeringRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -448,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -471,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -601,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RemovePeeringNetworkRequest.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 @@ -737,7 +652,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RemovePeeringNetworkRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,18 +667,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemovePeeringNetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 1862979954 + case -925667342: + { + input.readMessage( + getNetworksRemovePeeringRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -925667342 + 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.compute.v1.RemovePeeringNetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1355,7 +1309,18 @@ public RemovePeeringNetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemovePeeringNetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesDiskRequest.java index ca1f91a0152e..d87eaed1dfa8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesDiskRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveResourcePoliciesDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -800913550: - { - com.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequest.Builder subBuilder = - null; - if (disksRemoveResourcePoliciesRequestResource_ != null) { - subBuilder = disksRemoveResourcePoliciesRequestResource_.toBuilder(); - } - disksRemoveResourcePoliciesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.DisksRemoveResourcePoliciesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(disksRemoveResourcePoliciesRequestResource_); - disksRemoveResourcePoliciesRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveResourcePoliciesDiskRequest_descriptor; @@ -463,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (disksRemoveResourcePoliciesRequestResource_ != null) { output.writeMessage(436756718, getDisksRemoveResourcePoliciesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +403,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 436756718, getDisksRemoveResourcePoliciesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +457,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RemoveResourcePoliciesDiskRequest.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 @@ -820,7 +727,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RemoveResourcePoliciesDiskR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -835,19 +742,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveResourcePoliciesDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -800913550: + { + input.readMessage( + getDisksRemoveResourcePoliciesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -800913550 + 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.compute.v1.RemoveResourcePoliciesDiskRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1556,7 +1507,18 @@ public RemoveResourcePoliciesDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveResourcePoliciesDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesInstanceRequest.java index 00bb3379df71..2594780db1c3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesInstanceRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveResourcePoliciesInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 393836466: - { - com.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequest.Builder - subBuilder = null; - if (instancesRemoveResourcePoliciesRequestResource_ != null) { - subBuilder = instancesRemoveResourcePoliciesRequestResource_.toBuilder(); - } - instancesRemoveResourcePoliciesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstancesRemoveResourcePoliciesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instancesRemoveResourcePoliciesRequestResource_); - instancesRemoveResourcePoliciesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveResourcePoliciesInstanceRequest_descriptor; @@ -465,7 +379,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -491,7 +405,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -520,7 +434,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -545,7 +459,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -677,17 +591,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest.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 @@ -825,7 +732,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -840,19 +747,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveResourcePoliciesInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 393836466: + { + input.readMessage( + getInstancesRemoveResourcePoliciesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 393836466 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.RemoveResourcePoliciesInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1567,7 +1518,18 @@ public RemoveResourcePoliciesInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveResourcePoliciesInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesRegionDiskRequest.java index 8c3515943d40..0232547b025d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveResourcePoliciesRegionDiskRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveResourcePoliciesRegionDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 69930266: - { - com.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequest.Builder - subBuilder = null; - if (regionDisksRemoveResourcePoliciesRequestResource_ != null) { - subBuilder = regionDisksRemoveResourcePoliciesRequestResource_.toBuilder(); - } - regionDisksRemoveResourcePoliciesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionDisksRemoveResourcePoliciesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionDisksRemoveResourcePoliciesRequestResource_); - regionDisksRemoveResourcePoliciesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveResourcePoliciesRegionDiskRequest_descriptor; @@ -465,7 +379,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -491,7 +405,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -520,7 +434,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -545,7 +459,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -677,17 +591,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RemoveResourcePoliciesRegionDiskRequest.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 @@ -827,7 +734,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -842,19 +749,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveResourcePoliciesRegionDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 69930266: + { + input.readMessage( + getRegionDisksRemoveResourcePoliciesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 69930266 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.RemoveResourcePoliciesRegionDiskRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1570,7 +1521,18 @@ public RemoveResourcePoliciesRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveResourcePoliciesRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleFirewallPolicyRequest.java index 72ee1dfb90c0..8de0c1dab8a9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleFirewallPolicyRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveRuleFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveRuleFirewallPolicyRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -342,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -363,7 +303,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -493,17 +433,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest.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 @@ -616,7 +549,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RemoveRuleFirewallPolicyReq requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -631,18 +564,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveRuleFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.RemoveRuleFirewallPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -973,7 +937,18 @@ public RemoveRuleFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveRuleFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleNetworkFirewallPolicyRequest.java index 8156e48ab5b1..6379b4d25367 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleNetworkFirewallPolicyRequest.java @@ -56,73 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveRuleNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveRuleNetworkFirewallPolicyRequest_descriptor; @@ -364,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -385,7 +318,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -411,7 +344,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -434,7 +367,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -566,17 +499,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest.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 @@ -701,7 +627,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -716,19 +642,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveRuleNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.RemoveRuleNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1177,7 +1139,18 @@ public RemoveRuleNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveRuleNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleRegionNetworkFirewallPolicyRequest.java index 7eccd165f7b7..e6ccf1f7eb4f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleRegionNetworkFirewallPolicyRequest.java @@ -57,80 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveRuleRegionNetworkFirewallPolicyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = input.readInt32(); - break; - } - case -309581174: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewallPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveRuleRegionNetworkFirewallPolicyRequest_descriptor; @@ -428,7 +354,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 498173265, firewallPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -452,7 +378,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewallPolicy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(498173265, firewallPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -480,7 +406,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -505,7 +431,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -638,17 +564,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.RemoveRuleRegionNetworkFirewallPolicyRequest.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 @@ -782,7 +701,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -797,19 +716,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveRuleRegionNetworkFirewallPolicyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + case -309581174: + { + firewallPolicy_ = input.readStringRequireUtf8(); + + break; + } // case -309581174 + 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.compute.v1.RemoveRuleRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1376,7 +1337,19 @@ public RemoveRuleRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveRuleRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleSecurityPolicyRequest.java index 9ea737d42f5e..55c0453bc968 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RemoveRuleSecurityPolicyRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveRuleSecurityPolicyRequest( - 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 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - - securityPolicy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000001; - priority_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RemoveRuleSecurityPolicyRequest_descriptor; @@ -288,7 +228,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(445151652, priority_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -306,7 +246,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(445151652, priority_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -328,7 +268,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getSecurityPolicy().equals(other.getSecurityPolicy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -347,7 +287,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + SECURITY_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,17 +417,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RemoveRuleSecurityPolicyReq securityPolicy_ = other.securityPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RemoveRuleSecurityPolicyRequest 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 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + + break; + } // case 1368660106 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -733754080 + 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.compute.v1.RemoveRuleSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -949,7 +913,18 @@ public RemoveRuleSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveRuleSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RequestMirrorPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RequestMirrorPolicy.java index c94c54cb7afe..f2b00a945a58 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RequestMirrorPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RequestMirrorPolicy.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RequestMirrorPolicy( - 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 -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - backendService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RequestMirrorPolicy_descriptor; @@ -196,7 +149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -208,7 +161,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -228,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { if (hasBackendService()) { if (!getBackendService().equals(other.getBackendService())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -243,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + BACKEND_SERVICE_FIELD_NUMBER; hash = (53 * hash) + getBackendService().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -372,17 +325,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RequestMirrorPolicy.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 @@ -479,7 +425,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RequestMirrorPolicy other) backendService_ = other.backendService_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -494,17 +440,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RequestMirrorPolicy 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 -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1839398830 + 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.compute.v1.RequestMirrorPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -662,7 +628,18 @@ public RequestMirrorPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RequestMirrorPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Reservation.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Reservation.java index a7b260f9923d..d53c2fb2cf2f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Reservation.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Reservation.java @@ -59,154 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Reservation( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - zone_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - status_ = s; - break; - } - case 1812405496: - { - bitField0_ |= 0x00000400; - specificReservationRequired_ = input.readBool(); - break; - } - case 2133345306: - { - com.google.cloud.compute.v1.ShareSettings.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = shareSettings_.toBuilder(); - } - shareSettings_ = - input.readMessage( - com.google.cloud.compute.v1.ShareSettings.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shareSettings_); - shareSettings_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case -1055751686: - { - com.google.cloud.compute.v1.AllocationSpecificSKUReservation.Builder subBuilder = - null; - if (((bitField0_ & 0x00000200) != 0)) { - subBuilder = specificReservation_.toBuilder(); - } - specificReservation_ = - input.readMessage( - com.google.cloud.compute.v1.AllocationSpecificSKUReservation.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(specificReservation_); - specificReservation_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000200; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - selfLink_ = s; - break; - } - case -447253160: - { - bitField0_ |= 0x00000040; - satisfiesPzs_ = input.readBool(); - break; - } - case -437888854: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - commitment_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Reservation_descriptor; @@ -1204,7 +1056,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 482134805, commitment_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1258,7 +1110,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(482134805, commitment_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1325,7 +1177,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1389,7 +1241,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1765,7 +1617,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Reservation other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1780,17 +1632,110 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Reservation 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 29957474 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1450082194 + case 1812405496: + { + specificReservationRequired_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 1812405496 + case 2133345306: + { + input.readMessage(getShareSettingsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 2133345306 + case -1055751686: + { + input.readMessage( + getSpecificReservationFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case -1055751686 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -645248918 + case -447253160: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case -447253160 + case -437888854: + { + commitment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -437888854 + 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.compute.v1.Reservation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3394,7 +3339,18 @@ public Reservation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Reservation(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationAffinity.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationAffinity.java index 80a7271ac8a0..e31940fd9a02 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationAffinity.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationAffinity.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReservationAffinity( - 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 848634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - key_ = s; - break; - } - case 1999431954: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - values_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - values_.add(s); - break; - } - case -1889071742: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - consumeReservationType_ = 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_ & 0x00000004) != 0)) { - values_ = values_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ReservationAffinity_descriptor; @@ -541,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 300736944, consumeReservationType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -566,7 +499,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 300736944, consumeReservationType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -591,7 +524,7 @@ public boolean equals(final java.lang.Object obj) { if (!getKey().equals(other.getKey())) return false; } if (!getValuesList().equals(other.getValuesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -614,7 +547,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; } @@ -743,17 +676,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ReservationAffinity.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 @@ -878,7 +804,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ReservationAffinity other) } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -893,17 +819,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ReservationAffinity 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 848634: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 848634 + case 1999431954: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 1999431954 + case -1889071742: + { + consumeReservationType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1889071742 + 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.compute.v1.ReservationAffinity) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1355,7 +1314,18 @@ public ReservationAffinity parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReservationAffinity(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationAggregatedList.java index 83d9cf3031f1..dc28fb9310f2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationAggregatedList.java @@ -56,119 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReservationAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.ReservationsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ReservationAggregatedList_descriptor; @@ -709,7 +596,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -753,7 +640,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -791,7 +678,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -830,7 +717,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1160,7 +1047,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ReservationAggregatedList o if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1175,18 +1062,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ReservationAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.ReservationsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.ReservationAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2237,7 +2185,18 @@ public ReservationAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReservationAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationList.java index 59b637ad3605..2de02a2273f9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationList.java @@ -55,104 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReservationList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Reservation.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ReservationList_descriptor; @@ -572,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -822,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1000,7 +903,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ReservationList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1015,17 +918,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ReservationList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Reservation m = + input.readMessage( + com.google.cloud.compute.v1.Reservation.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.ReservationList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2077,7 +2037,18 @@ public ReservationList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReservationList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationsResizeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationsResizeRequest.java index 2982c743881a..cdbc081d64c7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationsResizeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationsResizeRequest.java @@ -49,52 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReservationsResizeRequest( - 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 111125760: - { - bitField0_ |= 0x00000001; - specificSkuCount_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ReservationsResizeRequest_descriptor; @@ -161,7 +115,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(13890720, specificSkuCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -173,7 +127,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(13890720, specificSkuCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -193,7 +147,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSpecificSkuCount()) { if (getSpecificSkuCount() != other.getSpecificSkuCount()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -208,7 +162,7 @@ public int hashCode() { hash = (37 * hash) + SPECIFIC_SKU_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSpecificSkuCount()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -337,17 +291,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ReservationsResizeRequest.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 @@ -442,7 +389,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ReservationsResizeRequest o if (other.hasSpecificSkuCount()) { setSpecificSkuCount(other.getSpecificSkuCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -457,18 +404,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ReservationsResizeRequest 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 111125760: + { + specificSkuCount_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 111125760 + 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.compute.v1.ReservationsResizeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -573,7 +539,18 @@ public ReservationsResizeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReservationsResizeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationsScopedList.java index 6e0f84124904..9b4d6d5ad854 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ReservationsScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReservationsScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1097223878: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - reservations_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - reservations_.add( - input.readMessage( - com.google.cloud.compute.v1.Reservation.parser(), extensionRegistry)); - 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)) { - reservations_ = java.util.Collections.unmodifiableList(reservations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ReservationsScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < reservations_.size(); i++) { output.writeMessage(399717927, reservations_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(399717927, reservations_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (reservationsBuilder_ == null) { reservations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + reservations_ = null; reservationsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ReservationsScopedList othe if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,18 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ReservationsScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1097223878: + { + com.google.cloud.compute.v1.Reservation m = + input.readMessage( + com.google.cloud.compute.v1.Reservation.parser(), extensionRegistry); + if (reservationsBuilder_ == null) { + ensureReservationsIsMutable(); + reservations_.add(m); + } else { + reservationsBuilder_.addMessage(m); + } + break; + } // case -1097223878 + 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.compute.v1.ReservationsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1215,7 +1178,18 @@ public ReservationsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReservationsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResetInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResetInstanceRequest.java index aac4729fabbc..78949535d526 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResetInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResetInstanceRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResetInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResetInstanceRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResetInstanceRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResetInstanceRequest other) zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,17 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResetInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.ResetInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1190,18 @@ public ResetInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResetInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeDiskRequest.java index d22184f9d7a0..301293d73ffe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeDiskRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResizeDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 626460930: - { - com.google.cloud.compute.v1.DisksResizeRequest.Builder subBuilder = null; - if (disksResizeRequestResource_ != null) { - subBuilder = disksResizeRequestResource_.toBuilder(); - } - disksResizeRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.DisksResizeRequest.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(disksResizeRequestResource_); - disksResizeRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResizeDiskRequest_descriptor; @@ -458,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +400,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -512,7 +428,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -537,7 +453,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -666,17 +582,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResizeDiskRequest.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 @@ -807,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResizeDiskRequest other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -822,17 +731,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResizeDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 626460930: + { + input.readMessage( + getDisksResizeRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 626460930 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.ResizeDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1490,18 @@ public ResizeDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResizeDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeInstanceGroupManagerRequest.java index 4181bcc18c73..eb54beeb2c92 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeInstanceGroupManagerRequest.java @@ -56,79 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResizeInstanceGroupManagerRequest( - 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 28246024: - { - size_ = input.readInt32(); - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResizeInstanceGroupManagerRequest_descriptor; @@ -413,7 +340,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -439,7 +366,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -463,7 +390,7 @@ public boolean equals(final java.lang.Object obj) { } if (getSize() != other.getSize()) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -486,7 +413,7 @@ public int hashCode() { hash = (53 * hash) + getSize(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -616,17 +543,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest.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 @@ -752,7 +672,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResizeInstanceGroupManagerR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -767,19 +687,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResizeInstanceGroupManagerRequest 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 28246024: + { + size_ = input.readInt32(); + + break; + } // case 28246024 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.ResizeInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1333,7 +1295,18 @@ public ResizeInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResizeInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeRegionDiskRequest.java index ef3dd496bf47..539b250bbfd3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeRegionDiskRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResizeRegionDiskRequest( - 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 24669418: - { - java.lang.String s = input.readStringRequireUtf8(); - - disk_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -721901398: - { - com.google.cloud.compute.v1.RegionDisksResizeRequest.Builder subBuilder = null; - if (regionDisksResizeRequestResource_ != null) { - subBuilder = regionDisksResizeRequestResource_.toBuilder(); - } - regionDisksResizeRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionDisksResizeRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionDisksResizeRequestResource_); - regionDisksResizeRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResizeRegionDiskRequest_descriptor; @@ -460,7 +375,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionDisksResizeRequestResource_ != null) { output.writeMessage(446633237, getRegionDisksResizeRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +401,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 446633237, getRegionDisksResizeRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -515,7 +430,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -540,7 +455,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -669,17 +584,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResizeRegionDiskRequest.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 @@ -811,7 +719,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResizeRegionDiskRequest oth requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -826,18 +734,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResizeRegionDiskRequest 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 24669418: + { + disk_ = input.readStringRequireUtf8(); + + break; + } // case 24669418 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -721901398: + { + input.readMessage( + getRegionDisksResizeRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -721901398 + 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.compute.v1.ResizeRegionDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1544,7 +1497,18 @@ public ResizeRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResizeRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeRegionInstanceGroupManagerRequest.java index 971da85872e8..6caecc0664b6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeRegionInstanceGroupManagerRequest.java @@ -57,79 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResizeRegionInstanceGroupManagerRequest( - 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 28246024: - { - size_ = input.readInt32(); - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResizeRegionInstanceGroupManagerRequest_descriptor; @@ -414,7 +341,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -440,7 +367,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -464,7 +391,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (getSize() != other.getSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -487,7 +414,7 @@ public int hashCode() { } hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + getSize(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -619,17 +546,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerRequest.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 @@ -758,7 +678,7 @@ public Builder mergeFrom( if (other.getSize() != 0) { setSize(other.getSize()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -773,19 +693,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResizeRegionInstanceGroupManagerRequest 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 28246024: + { + size_ = input.readInt32(); + + break; + } // case 28246024 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.ResizeRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1340,7 +1302,18 @@ public ResizeRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResizeRegionInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeReservationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeReservationRequest.java index 3494b7307993..b1b07093524f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeReservationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResizeReservationRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResizeReservationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 380247650: - { - java.lang.String s = input.readStringRequireUtf8(); - - reservation_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1180864886: - { - com.google.cloud.compute.v1.ReservationsResizeRequest.Builder subBuilder = null; - if (reservationsResizeRequestResource_ != null) { - subBuilder = reservationsResizeRequestResource_.toBuilder(); - } - reservationsResizeRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.ReservationsResizeRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reservationsResizeRequestResource_); - reservationsResizeRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResizeReservationRequest_descriptor; @@ -460,7 +375,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (reservationsResizeRequestResource_ != null) { output.writeMessage(389262801, getReservationsResizeRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +401,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 389262801, getReservationsResizeRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -515,7 +430,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getReservationsResizeRequestResource())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -540,7 +455,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -669,17 +584,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResizeReservationRequest.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 @@ -812,7 +720,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResizeReservationRequest ot zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -827,18 +735,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResizeReservationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 380247650: + { + reservation_ = input.readStringRequireUtf8(); + + break; + } // case 380247650 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1180864886: + { + input.readMessage( + getReservationsResizeRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1180864886 + 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.compute.v1.ResizeReservationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1546,7 +1499,18 @@ public ResizeReservationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResizeReservationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourceCommitment.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourceCommitment.java index d6efea51c14d..33e53b3bafc0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourceCommitment.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourceCommitment.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourceCommitment( - 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 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - type_ = s; - break; - } - case 1104249970: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - acceleratorType_ = s; - break; - } - case 1574077120: - { - bitField0_ |= 0x00000002; - amount_ = input.readInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourceCommitment_descriptor; @@ -459,7 +399,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeInt64(196759640, amount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -477,7 +417,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(196759640, amount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -505,7 +445,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -528,7 +468,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -657,17 +597,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResourceCommitment.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 @@ -783,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourceCommitment other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -798,17 +731,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourceCommitment 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 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 28604882 + case 1104249970: + { + acceleratorType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1104249970 + case 1574077120: + { + amount_ = input.readInt64(); + bitField0_ |= 0x00000002; + break; + } // case 1574077120 + 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.compute.v1.ResourceCommitment) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1159,7 +1124,18 @@ public ResourceCommitment parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourceCommitment(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourceGroupReference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourceGroupReference.java index b433ce4d92e4..c9f2513cc751 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourceGroupReference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourceGroupReference.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourceGroupReference( - 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 789033978: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - group_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourceGroupReference_descriptor; @@ -195,7 +148,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 98629247, group_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +160,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(98629247, group_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +180,7 @@ public boolean equals(final java.lang.Object obj) { if (hasGroup()) { if (!getGroup().equals(other.getGroup())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +195,7 @@ public int hashCode() { hash = (37 * hash) + GROUP_FIELD_NUMBER; hash = (53 * hash) + getGroup().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -370,17 +323,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResourceGroupReference.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 @@ -477,7 +423,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourceGroupReference othe group_ = other.group_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -492,18 +438,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourceGroupReference 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 789033978: + { + group_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 789033978 + 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.compute.v1.ResourceGroupReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -661,7 +626,18 @@ public ResourceGroupReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourceGroupReference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePoliciesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePoliciesScopedList.java index 6504ae5171d0..971e30fa1c38 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePoliciesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePoliciesScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePoliciesScopedList( - 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 177763082: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - resourcePolicies_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - resourcePolicies_.add( - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicy.parser(), extensionRegistry)); - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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)) { - resourcePolicies_ = java.util.Collections.unmodifiableList(resourcePolicies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePoliciesScopedList_descriptor; @@ -274,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(50704284, getWarning()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +220,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(50704284, getWarning()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,10 +410,11 @@ public Builder clear() { super.clear(); if (resourcePoliciesBuilder_ == null) { resourcePolicies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + resourcePolicies_ = null; resourcePoliciesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -618,7 +548,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePoliciesScopedList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,18 +563,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePoliciesScopedList 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 177763082: + { + com.google.cloud.compute.v1.ResourcePolicy m = + input.readMessage( + com.google.cloud.compute.v1.ResourcePolicy.parser(), extensionRegistry); + if (resourcePoliciesBuilder_ == null) { + ensureResourcePoliciesIsMutable(); + resourcePolicies_.add(m); + } else { + resourcePoliciesBuilder_.addMessage(m); + } + break; + } // case 177763082 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + 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.compute.v1.ResourcePoliciesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1189,18 @@ public ResourcePoliciesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePoliciesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicy.java index 932fdfee3764..2ba787b903c6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicy.java @@ -58,172 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicy( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 87452770: - { - com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.Builder subBuilder = - null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = groupPlacementPolicy_.toBuilder(); - } - groupPlacementPolicy_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(groupPlacementPolicy_); - groupPlacementPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - region_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - status_ = s; - break; - } - case 1745050362: - { - com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.Builder subBuilder = - null; - if (((bitField0_ & 0x00000400) != 0)) { - subBuilder = snapshotSchedulePolicy_.toBuilder(); - } - snapshotSchedulePolicy_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(snapshotSchedulePolicy_); - snapshotSchedulePolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000400; - break; - } - case 1995434522: - { - com.google.cloud.compute.v1.ResourcePolicyResourceStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = resourceStatus_.toBuilder(); - } - resourceStatus_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicyResourceStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resourceStatus_); - resourceStatus_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case -1535950462: - { - com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.Builder subBuilder = - null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = instanceSchedulePolicy_.toBuilder(); - } - instanceSchedulePolicy_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceSchedulePolicy_); - instanceSchedulePolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicy_descriptor; @@ -1175,7 +1009,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1228,7 +1062,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1292,7 +1126,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1351,7 +1185,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1734,7 +1568,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePolicy other) { status_ = other.status_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1749,17 +1583,106 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicy 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26989658 + case 87452770: + { + input.readMessage( + getGroupPlacementPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 87452770 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1111570338 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1450082194 + case 1745050362: + { + input.readMessage( + getSnapshotSchedulePolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 1745050362 + case 1995434522: + { + input.readMessage(getResourceStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 1995434522 + case -1535950462: + { + input.readMessage( + getInstanceSchedulePolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case -1535950462 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -645248918 + 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.compute.v1.ResourcePolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3489,7 +3412,18 @@ public ResourcePolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyAggregatedList.java index 7a83f8ae4e9c..0bec4650b1ee 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyAggregatedList.java @@ -57,126 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - id_ = s; - break; - } - case 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.ResourcePoliciesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - selfLink_ = 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_ & 0x00000040) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyAggregatedList_descriptor; @@ -768,7 +648,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -816,7 +696,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -858,7 +738,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -901,7 +781,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1242,7 +1122,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePolicyAggregatedLis if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1257,18 +1137,85 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26842 + case 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24987818 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.ResourcePoliciesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -645248918 + 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.compute.v1.ResourcePolicyAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2410,7 +2357,18 @@ public ResourcePolicyAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyDailyCycle.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyDailyCycle.java index 9ef23310f245..9aadfa82acbc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyDailyCycle.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyDailyCycle.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyDailyCycle( - 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 299738194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - startTime_ = s; - break; - } - case 1243770018: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - duration_ = s; - break; - } - case -1336647264: - { - bitField0_ |= 0x00000001; - daysInCycle_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyDailyCycle_descriptor; @@ -313,7 +253,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(369790004, daysInCycle_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -331,7 +271,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(369790004, daysInCycle_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStartTime()) { if (!getStartTime().equals(other.getStartTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + START_TIME_FIELD_NUMBER; hash = (53 * hash) + getStartTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -511,17 +451,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResourcePolicyDailyCycle.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 @@ -638,7 +571,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePolicyDailyCycle ot startTime_ = other.startTime_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -653,18 +586,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyDailyCycle 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 299738194: + { + startTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 299738194 + case 1243770018: + { + duration_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1243770018 + case -1336647264: + { + daysInCycle_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -1336647264 + 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.compute.v1.ResourcePolicyDailyCycle) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1009,7 +973,18 @@ public ResourcePolicyDailyCycle parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyDailyCycle(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyGroupPlacementPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyGroupPlacementPolicy.java index fb2c18961923..ec3af2f2af11 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyGroupPlacementPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyGroupPlacementPolicy.java @@ -53,65 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyGroupPlacementPolicy( - 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 99627456: - { - bitField0_ |= 0x00000001; - availabilityDomainCount_ = input.readInt32(); - break; - } - case 2091707448: - { - bitField0_ |= 0x00000004; - vmCount_ = input.readInt32(); - break; - } - case -205715030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - collocation_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyGroupPlacementPolicy_descriptor; @@ -411,7 +352,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 511156533, collocation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -431,7 +372,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(511156533, collocation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -459,7 +400,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVmCount()) { if (getVmCount() != other.getVmCount()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -482,7 +423,7 @@ public int hashCode() { hash = (37 * hash) + VM_COUNT_FIELD_NUMBER; hash = (53 * hash) + getVmCount(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -612,17 +553,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy.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 @@ -739,7 +673,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePolicyGroupPlacemen if (other.hasVmCount()) { setVmCount(other.getVmCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -754,19 +688,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyGroupPlacementPolicy 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 99627456: + { + availabilityDomainCount_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 99627456 + case 2091707448: + { + vmCount_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 2091707448 + case -205715030: + { + collocation_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -205715030 + 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.compute.v1.ResourcePolicyGroupPlacementPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1066,7 +1030,18 @@ public ResourcePolicyGroupPlacementPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyGroupPlacementPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyHourlyCycle.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyHourlyCycle.java index 6b34a7b54a6f..b8035b6edfaf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyHourlyCycle.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyHourlyCycle.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyHourlyCycle( - 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 299738194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - startTime_ = s; - break; - } - case 1243770018: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - duration_ = s; - break; - } - case -80862240: - { - bitField0_ |= 0x00000002; - hoursInCycle_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyHourlyCycle_descriptor; @@ -313,7 +253,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeInt32(526763132, hoursInCycle_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -331,7 +271,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(526763132, hoursInCycle_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStartTime()) { if (!getStartTime().equals(other.getStartTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + START_TIME_FIELD_NUMBER; hash = (53 * hash) + getStartTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -512,17 +452,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResourcePolicyHourlyCycle.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 @@ -639,7 +572,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePolicyHourlyCycle o startTime_ = other.startTime_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -654,18 +587,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyHourlyCycle 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 299738194: + { + startTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 299738194 + case 1243770018: + { + duration_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1243770018 + case -80862240: + { + hoursInCycle_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case -80862240 + 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.compute.v1.ResourcePolicyHourlyCycle) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1010,7 +974,18 @@ public ResourcePolicyHourlyCycle parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyHourlyCycle(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyInstanceSchedulePolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyInstanceSchedulePolicy.java index 477dab57c1b8..743e2cd89334 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyInstanceSchedulePolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyInstanceSchedulePolicy.java @@ -56,105 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyInstanceSchedulePolicy( - 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 142099170: - { - com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicySchedule.Builder - subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = vmStartSchedule_.toBuilder(); - } - vmStartSchedule_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicySchedule - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(vmStartSchedule_); - vmStartSchedule_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 294784754: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - timeZone_ = s; - break; - } - case 299738194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - startTime_ = s; - break; - } - case 1842393834: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - expirationTime_ = s; - break; - } - case -885025438: - { - com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicySchedule.Builder - subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = vmStopSchedule_.toBuilder(); - } - vmStopSchedule_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicySchedule - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(vmStopSchedule_); - vmStopSchedule_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyInstanceSchedulePolicy_descriptor; @@ -512,7 +413,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(426242732, getVmStopSchedule()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -538,7 +439,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(426242732, getVmStopSchedule()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -574,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVmStopSchedule()) { if (!getVmStopSchedule().equals(other.getVmStopSchedule())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -605,7 +506,7 @@ public int hashCode() { hash = (37 * hash) + VM_STOP_SCHEDULE_FIELD_NUMBER; hash = (53 * hash) + getVmStopSchedule().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -904,7 +805,7 @@ public Builder mergeFrom( if (other.hasVmStopSchedule()) { mergeVmStopSchedule(other.getVmStopSchedule()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -919,19 +820,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicy 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 142099170: + { + input.readMessage(getVmStartScheduleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 142099170 + case 294784754: + { + timeZone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 294784754 + case 299738194: + { + startTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 299738194 + case 1842393834: + { + expirationTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1842393834 + case -885025438: + { + input.readMessage(getVmStopScheduleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case -885025438 + 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.compute.v1.ResourcePolicyInstanceSchedulePolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1765,7 +1708,18 @@ public ResourcePolicyInstanceSchedulePolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyInstanceSchedulePolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyInstanceSchedulePolicySchedule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyInstanceSchedulePolicySchedule.java index 1458f9efba0c..599ce92bc5ce 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyInstanceSchedulePolicySchedule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyInstanceSchedulePolicySchedule.java @@ -54,53 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyInstanceSchedulePolicySchedule( - 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 -1288399686: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - schedule_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyInstanceSchedulePolicySchedule_descriptor; @@ -198,7 +151,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 375820951, schedule_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -210,7 +163,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(375820951, schedule_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -231,7 +184,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSchedule()) { if (!getSchedule().equals(other.getSchedule())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -246,7 +199,7 @@ public int hashCode() { hash = (37 * hash) + SCHEDULE_FIELD_NUMBER; hash = (53 * hash) + getSchedule().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -379,17 +332,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicySchedule.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 @@ -493,7 +439,7 @@ public Builder mergeFrom( schedule_ = other.schedule_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -508,19 +454,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyInstanceSchedulePolicySchedule 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 -1288399686: + { + schedule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1288399686 + 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.compute.v1.ResourcePolicyInstanceSchedulePolicySchedule) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -682,7 +646,19 @@ public ResourcePolicyInstanceSchedulePolicySchedule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyInstanceSchedulePolicySchedule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyList.java index 5105a045d346..b52d4d6c614f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyList.java @@ -56,111 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - id_ = s; - break; - } - case 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicy.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - selfLink_ = 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_ & 0x00000004) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyList_descriptor; @@ -629,7 +524,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -659,7 +554,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -700,7 +595,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -739,7 +634,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -892,10 +787,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000008); nextPageToken_ = ""; @@ -1079,7 +975,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePolicyList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1094,17 +990,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26842 + case 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24987818 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.ResourcePolicy m = + input.readMessage( + com.google.cloud.compute.v1.ResourcePolicy.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -645248918 + 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.compute.v1.ResourcePolicyList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2241,7 +2200,18 @@ public ResourcePolicyList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyResourceStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyResourceStatus.java index f422ace11acb..66aaade6a427 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyResourceStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyResourceStatus.java @@ -50,66 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyResourceStatus( - 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 -1535950462: - { - com.google.cloud.compute.v1.ResourcePolicyResourceStatusInstanceSchedulePolicyStatus - .Builder - subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = instanceSchedulePolicy_.toBuilder(); - } - instanceSchedulePolicy_ = - input.readMessage( - com.google.cloud.compute.v1 - .ResourcePolicyResourceStatusInstanceSchedulePolicyStatus.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceSchedulePolicy_); - instanceSchedulePolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyResourceStatus_descriptor; @@ -205,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(344877104, getInstanceSchedulePolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +159,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 344877104, getInstanceSchedulePolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -239,7 +179,7 @@ public boolean equals(final java.lang.Object obj) { if (hasInstanceSchedulePolicy()) { if (!getInstanceSchedulePolicy().equals(other.getInstanceSchedulePolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -254,7 +194,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCE_SCHEDULE_POLICY_FIELD_NUMBER; hash = (53 * hash) + getInstanceSchedulePolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -499,7 +439,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePolicyResourceStatu if (other.hasInstanceSchedulePolicy()) { mergeInstanceSchedulePolicy(other.getInstanceSchedulePolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -514,18 +454,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyResourceStatus 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 -1535950462: + { + input.readMessage( + getInstanceSchedulePolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -1535950462 + 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.compute.v1.ResourcePolicyResourceStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -792,7 +752,18 @@ public ResourcePolicyResourceStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyResourceStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyResourceStatusInstanceSchedulePolicyStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyResourceStatusInstanceSchedulePolicyStatus.java index cc4848e4d270..c38b22bd00a7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyResourceStatusInstanceSchedulePolicyStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyResourceStatusInstanceSchedulePolicyStatus.java @@ -55,60 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyResourceStatusInstanceSchedulePolicyStatus( - 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 -1870414790: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - lastRunStartTime_ = s; - break; - } - case -1745826734: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - nextRunStartTime_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyResourceStatusInstanceSchedulePolicyStatus_descriptor; @@ -275,7 +221,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 318642570, nextRunStartTime_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -292,7 +238,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(318642570, nextRunStartTime_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -318,7 +264,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNextRunStartTime()) { if (!getNextRunStartTime().equals(other.getNextRunStartTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -337,7 +283,7 @@ public int hashCode() { hash = (37 * hash) + NEXT_RUN_START_TIME_FIELD_NUMBER; hash = (53 * hash) + getNextRunStartTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -478,17 +424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ResourcePolicyResourceStatusInstanceSchedulePolicyStatus.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 @@ -609,7 +548,7 @@ public Builder mergeFrom( nextRunStartTime_ = other.nextRunStartTime_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -624,20 +563,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyResourceStatusInstanceSchedulePolicyStatus - 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 -1870414790: + { + lastRunStartTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1870414790 + case -1745826734: + { + nextRunStartTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1745826734 + 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.compute.v1.ResourcePolicyResourceStatusInstanceSchedulePolicyStatus) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -922,8 +884,19 @@ public ResourcePolicyResourceStatusInstanceSchedulePolicyStatus parsePartialFrom com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyResourceStatusInstanceSchedulePolicyStatus( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicy.java index ea8906d07b19..37c12430d05a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicy.java @@ -52,105 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicySnapshotSchedulePolicy( - 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 549006234: - { - com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy - .Builder - subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = retentionPolicy_.toBuilder(); - } - retentionPolicy_ = - input.readMessage( - com.google.cloud.compute.v1 - .ResourcePolicySnapshotSchedulePolicyRetentionPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(retentionPolicy_); - retentionPolicy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1482970226: - { - com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotProperties - .Builder - subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = snapshotProperties_.toBuilder(); - } - snapshotProperties_ = - input.readMessage( - com.google.cloud.compute.v1 - .ResourcePolicySnapshotSchedulePolicySnapshotProperties.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(snapshotProperties_); - snapshotProperties_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -1288399686: - { - com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySchedule.Builder - subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = schedule_.toBuilder(); - } - schedule_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySchedule - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(schedule_); - schedule_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicy_descriptor; @@ -371,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(375820951, getSchedule()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -392,7 +293,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(375820951, getSchedule()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -420,7 +321,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSnapshotProperties()) { if (!getSnapshotProperties().equals(other.getSnapshotProperties())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -443,7 +344,7 @@ public int hashCode() { hash = (37 * hash) + SNAPSHOT_PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + getSnapshotProperties().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -727,7 +628,7 @@ public Builder mergeFrom( if (other.hasSnapshotProperties()) { mergeSnapshotProperties(other.getSnapshotProperties()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -742,19 +643,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicy 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 549006234: + { + input.readMessage(getRetentionPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 549006234 + case 1482970226: + { + input.readMessage( + getSnapshotPropertiesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 1482970226 + case -1288399686: + { + input.readMessage(getScheduleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1288399686 + 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.compute.v1.ResourcePolicySnapshotSchedulePolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1455,7 +1387,18 @@ public ResourcePolicySnapshotSchedulePolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicySnapshotSchedulePolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicyRetentionPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicyRetentionPolicy.java index c4df51e37442..bcab5904d9ea 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicyRetentionPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicyRetentionPolicy.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicySnapshotSchedulePolicyRetentionPolicy( - 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 -1719323062: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - onSourceDiskDelete_ = s; - break; - } - case -1700591464: - { - bitField0_ |= 0x00000001; - maxRetentionDays_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicyRetentionPolicy_descriptor; @@ -382,7 +329,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(324296979, maxRetentionDays_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -398,7 +345,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(324296979, maxRetentionDays_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +371,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOnSourceDiskDelete()) { if (!getOnSourceDiskDelete().equals(other.getOnSourceDiskDelete())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -443,7 +390,7 @@ public int hashCode() { hash = (37 * hash) + ON_SOURCE_DISK_DELETE_FIELD_NUMBER; hash = (53 * hash) + getOnSourceDiskDelete().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -582,17 +529,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy.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 @@ -708,7 +648,7 @@ public Builder mergeFrom( onSourceDiskDelete_ = other.onSourceDiskDelete_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -723,20 +663,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy - 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 -1719323062: + { + onSourceDiskDelete_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1719323062 + case -1700591464: + { + maxRetentionDays_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case -1700591464 + 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.compute.v1.ResourcePolicySnapshotSchedulePolicyRetentionPolicy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -974,8 +937,19 @@ public ResourcePolicySnapshotSchedulePolicyRetentionPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicySnapshotSchedulePolicyRetentionPolicy( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicySchedule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicySchedule.java index 3aa2053066ab..028b9439f218 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicySchedule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicySchedule.java @@ -52,97 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicySnapshotSchedulePolicySchedule( - 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 306627882: - { - com.google.cloud.compute.v1.ResourcePolicyHourlyCycle.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = hourlySchedule_.toBuilder(); - } - hourlySchedule_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicyHourlyCycle.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hourlySchedule_); - hourlySchedule_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 689278954: - { - com.google.cloud.compute.v1.ResourcePolicyDailyCycle.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = dailySchedule_.toBuilder(); - } - dailySchedule_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicyDailyCycle.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dailySchedule_); - dailySchedule_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1418582870: - { - com.google.cloud.compute.v1.ResourcePolicyWeeklyCycle.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = weeklySchedule_.toBuilder(); - } - weeklySchedule_ = - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicyWeeklyCycle.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(weeklySchedule_); - weeklySchedule_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicySchedule_descriptor; @@ -289,7 +198,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(359548053, getWeeklySchedule()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -310,7 +219,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(359548053, getWeeklySchedule()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -339,7 +248,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWeeklySchedule()) { if (!getWeeklySchedule().equals(other.getWeeklySchedule())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -362,7 +271,7 @@ public int hashCode() { hash = (37 * hash) + WEEKLY_SCHEDULE_FIELD_NUMBER; hash = (53 * hash) + getWeeklySchedule().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -653,7 +562,7 @@ public Builder mergeFrom( if (other.hasWeeklySchedule()) { mergeWeeklySchedule(other.getWeeklySchedule()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -668,19 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySchedule 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 306627882: + { + input.readMessage(getHourlyScheduleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 306627882 + case 689278954: + { + input.readMessage(getDailyScheduleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 689278954 + case -1418582870: + { + input.readMessage(getWeeklyScheduleFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -1418582870 + 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.compute.v1.ResourcePolicySnapshotSchedulePolicySchedule) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1167,7 +1106,19 @@ public ResourcePolicySnapshotSchedulePolicySchedule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicySnapshotSchedulePolicySchedule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicySnapshotProperties.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicySnapshotProperties.java index 1eab02606ff7..a26b7e5edf82 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicySnapshotProperties.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicySnapshotSchedulePolicySnapshotProperties.java @@ -56,85 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicySnapshotSchedulePolicySnapshotProperties( - 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 549153354: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - chainName_ = s; - break; - } - case -1670925102: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - storageLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - storageLocations_.add(s); - break; - } - case -1210560792: - { - bitField0_ |= 0x00000002; - guestFlush_ = input.readBool(); - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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_ & 0x00000008) != 0)) { - storageLocations_ = storageLocations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicySnapshotSchedulePolicySnapshotProperties_descriptor; @@ -446,7 +367,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -479,7 +400,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -507,7 +428,7 @@ public boolean equals(final java.lang.Object obj) { } if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getStorageLocationsList().equals(other.getStorageLocationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -534,7 +455,7 @@ public int hashCode() { hash = (37 * hash) + STORAGE_LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getStorageLocationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -695,17 +616,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { // Construct using // com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotProperties.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 @@ -844,7 +758,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -859,20 +773,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotProperties - 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 549153354: + { + chainName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 549153354 + case -1670925102: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureStorageLocationsIsMutable(); + storageLocations_.add(s); + break; + } // case -1670925102 + case -1210560792: + { + guestFlush_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1210560792 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.ResourcePolicySnapshotSchedulePolicySnapshotProperties) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1430,8 +1385,19 @@ public ResourcePolicySnapshotSchedulePolicySnapshotProperties parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicySnapshotSchedulePolicySnapshotProperties( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycle.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycle.java index facd323ef2c9..b8f9e23b984c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycle.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycle.java @@ -52,63 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyWeeklyCycle( - 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 2062974674: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - dayOfWeeks_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek>(); - mutable_bitField0_ |= 0x00000001; - } - dayOfWeeks_.add( - input.readMessage( - com.google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek.parser(), - extensionRegistry)); - 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)) { - dayOfWeeks_ = java.util.Collections.unmodifiableList(dayOfWeeks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyWeeklyCycle_descriptor; @@ -224,7 +167,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < dayOfWeeks_.size(); i++) { output.writeMessage(257871834, dayOfWeeks_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -237,7 +180,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(257871834, dayOfWeeks_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -254,7 +197,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.ResourcePolicyWeeklyCycle) obj; if (!getDayOfWeeksList().equals(other.getDayOfWeeksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -269,7 +212,7 @@ public int hashCode() { hash = (37 * hash) + DAY_OF_WEEKS_FIELD_NUMBER; hash = (53 * hash) + getDayOfWeeksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -399,19 +342,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResourcePolicyWeeklyCycle.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) { - getDayOfWeeksFieldBuilder(); - } } @java.lang.Override @@ -419,10 +353,11 @@ public Builder clear() { super.clear(); if (dayOfWeeksBuilder_ == null) { dayOfWeeks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + dayOfWeeks_ = null; dayOfWeeksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -537,7 +472,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePolicyWeeklyCycle o } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -552,18 +487,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyWeeklyCycle 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 2062974674: + { + com.google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek m = + input.readMessage( + com.google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek.parser(), + extensionRegistry); + if (dayOfWeeksBuilder_ == null) { + ensureDayOfWeeksIsMutable(); + dayOfWeeks_.add(m); + } else { + dayOfWeeksBuilder_.addMessage(m); + } + break; + } // case 2062974674 + 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.compute.v1.ResourcePolicyWeeklyCycle) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1004,7 +966,18 @@ public ResourcePolicyWeeklyCycle parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyWeeklyCycle(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycleDayOfWeek.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycleDayOfWeek.java index 41b3dda4b066..f75944e266aa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycleDayOfWeek.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResourcePolicyWeeklyCycleDayOfWeek.java @@ -54,67 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResourcePolicyWeeklyCycleDayOfWeek( - 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 793826: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - day_ = s; - break; - } - case 299738194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - startTime_ = s; - break; - } - case 1243770018: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - duration_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResourcePolicyWeeklyCycleDayOfWeek_descriptor; @@ -512,7 +451,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 155471252, duration_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -530,7 +469,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(155471252, duration_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -558,7 +497,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStartTime()) { if (!getStartTime().equals(other.getStartTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -581,7 +520,7 @@ public int hashCode() { hash = (37 * hash) + START_TIME_FIELD_NUMBER; hash = (53 * hash) + getStartTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -710,17 +649,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek.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 @@ -841,7 +773,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResourcePolicyWeeklyCycleDa startTime_ = other.startTime_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -856,19 +788,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek 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 793826: + { + day_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 793826 + case 299738194: + { + startTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 299738194 + case 1243770018: + { + duration_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1243770018 + 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.compute.v1.ResourcePolicyWeeklyCycleDayOfWeek) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1274,7 +1236,18 @@ public ResourcePolicyWeeklyCycleDayOfWeek parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResourcePolicyWeeklyCycleDayOfWeek(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResumeInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResumeInstanceRequest.java index 7734f92595b2..3cd941b854bd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResumeInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ResumeInstanceRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResumeInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ResumeInstanceRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ResumeInstanceRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ResumeInstanceRequest other zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ResumeInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.ResumeInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public ResumeInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResumeInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Route.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Route.java index 9a3a2dbc0453..647856cf24e5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Route.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Route.java @@ -70,211 +70,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Route( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 28418250: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00080000) != 0)) { - tags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00080000; - } - tags_.add(s); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 882556234: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - nextHopIp_ = s; - break; - } - case 1100551434: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - asPaths_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - asPaths_.add( - input.readMessage( - com.google.cloud.compute.v1.RouteAsPath.parser(), extensionRegistry)); - break; - } - case 1589439210: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - nextHopIlb_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - network_ = s; - break; - } - case 2098366306: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - nextHopNetwork_ = s; - break; - } - case -1287857278: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - routeType_ = s; - break; - } - case -1277564910: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - nextHopGateway_ = s; - break; - } - case -1244345598: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - destRange_ = s; - break; - } - case -1146901318: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - nextHopInstance_ = s; - break; - } - case -993505294: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - nextHopPeering_ = s; - break; - } - case -949668542: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - routeStatus_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00004000; - priority_ = input.readUInt32(); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - selfLink_ = s; - break; - } - case -310238534: - { - if (!((mutable_bitField0_ & 0x00100000) != 0)) { - warnings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00100000; - } - warnings_.add( - input.readMessage( - com.google.cloud.compute.v1.Warnings.parser(), extensionRegistry)); - break; - } - case -136211286: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - nextHopVpnTunnel_ = 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_ & 0x00080000) != 0)) { - tags_ = tags_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - asPaths_ = java.util.Collections.unmodifiableList(asPaths_); - } - if (((mutable_bitField0_ & 0x00100000) != 0)) { - warnings_ = java.util.Collections.unmodifiableList(warnings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Route_descriptor; @@ -2001,7 +1796,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00002000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 519844501, nextHopVpnTunnel_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2080,7 +1875,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(519844501, nextHopVpnTunnel_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2170,7 +1965,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getTagsList().equals(other.getTagsList())) return false; if (!getWarningsList().equals(other.getWarningsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2265,7 +2060,7 @@ public int hashCode() { hash = (37 * hash) + WARNINGS_FIELD_NUMBER; hash = (53 * hash) + getWarningsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2393,20 +2188,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Route.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) { - getAsPathsFieldBuilder(); - getWarningsFieldBuilder(); - } } @java.lang.Override @@ -2414,10 +2199,11 @@ public Builder clear() { super.clear(); if (asPathsBuilder_ == null) { asPaths_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + asPaths_ = null; asPathsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); creationTimestamp_ = ""; bitField0_ = (bitField0_ & ~0x00000002); description_ = ""; @@ -2458,10 +2244,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00080000); if (warningsBuilder_ == null) { warnings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00100000); } else { + warnings_ = null; warningsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00100000); return this; } @@ -2785,7 +2572,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Route other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2800,17 +2587,172 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Route 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26989658 + case 28418250: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 28418250 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 882556234: + { + nextHopIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 882556234 + case 1100551434: + { + com.google.cloud.compute.v1.RouteAsPath m = + input.readMessage( + com.google.cloud.compute.v1.RouteAsPath.parser(), extensionRegistry); + if (asPathsBuilder_ == null) { + ensureAsPathsIsMutable(); + asPaths_.add(m); + } else { + asPathsBuilder_.addMessage(m); + } + break; + } // case 1100551434 + case 1589439210: + { + nextHopIlb_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1589439210 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1862979954 + case 2098366306: + { + nextHopNetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 2098366306 + case -1287857278: + { + routeType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case -1287857278 + case -1277564910: + { + nextHopGateway_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -1277564910 + case -1244345598: + { + destRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -1244345598 + case -1146901318: + { + nextHopInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -1146901318 + case -993505294: + { + nextHopPeering_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case -993505294 + case -949668542: + { + routeStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case -949668542 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -733754080: + { + priority_ = input.readUInt32(); + bitField0_ |= 0x00008000; + break; + } // case -733754080 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case -645248918 + case -310238534: + { + com.google.cloud.compute.v1.Warnings m = + input.readMessage( + com.google.cloud.compute.v1.Warnings.parser(), extensionRegistry); + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.add(m); + } else { + warningsBuilder_.addMessage(m); + } + break; + } // case -310238534 + case -136211286: + { + nextHopVpnTunnel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -136211286 + 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.compute.v1.Route) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5778,7 +5720,18 @@ public Route parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Route(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouteAsPath.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouteAsPath.java index 08f47a2293f2..a21169e09175 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouteAsPath.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouteAsPath.java @@ -52,79 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouteAsPath( - 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 1072900672: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - asLists_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - asLists_.addInt(input.readUInt32()); - break; - } - case 1072900674: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - asLists_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - asLists_.addInt(input.readUInt32()); - } - input.popLimit(limit); - break; - } - case -187247358: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - pathSegmentType_ = 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)) { - asLists_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouteAsPath_descriptor; @@ -421,7 +348,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 513464992, pathSegmentType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -446,7 +373,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(513464992, pathSegmentType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -466,7 +393,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPathSegmentType()) { if (!getPathSegmentType().equals(other.getPathSegmentType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -485,7 +412,7 @@ public int hashCode() { hash = (37 * hash) + PATH_SEGMENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + getPathSegmentType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -613,17 +540,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouteAsPath.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 @@ -736,7 +656,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouteAsPath other) { pathSegmentType_ = other.pathSegmentType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -751,17 +671,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouteAsPath 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 1072900672: + { + int v = input.readUInt32(); + ensureAsListsIsMutable(); + asLists_.addInt(v); + break; + } // case 1072900672 + case 1072900674: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureAsListsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + asLists_.addInt(input.readUInt32()); + } + input.popLimit(limit); + break; + } // case 1072900674 + case -187247358: + { + pathSegmentType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -187247358 + 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.compute.v1.RouteAsPath) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1051,7 +1009,18 @@ public RouteAsPath parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouteAsPath(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouteList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouteList.java index 3c6ac2097d5a..5bc6c6a4d1e9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouteList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouteList.java @@ -56,103 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouteList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage(com.google.cloud.compute.v1.Route.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouteList_descriptor; @@ -572,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -635,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -670,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -821,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -999,7 +903,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouteList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1014,17 +918,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouteList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Route m = + input.readMessage( + com.google.cloud.compute.v1.Route.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.RouteList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2074,7 +2035,18 @@ public RouteList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouteList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Router.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Router.java index 123e894c0518..393e5f7d76ea 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Router.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Router.java @@ -61,166 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Router( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 779866: - { - com.google.cloud.compute.v1.RouterBgp.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = bgp_.toBuilder(); - } - bgp_ = - input.readMessage( - com.google.cloud.compute.v1.RouterBgp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(bgp_); - bgp_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 26991506: - { - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - nats_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - nats_.add( - input.readMessage( - com.google.cloud.compute.v1.RouterNat.parser(), extensionRegistry)); - break; - } - case 96588498: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - interfaces_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - interfaces_.add( - input.readMessage( - com.google.cloud.compute.v1.RouterInterface.parser(), extensionRegistry)); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - region_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - network_ = s; - break; - } - case -1910994696: - { - bitField0_ |= 0x00000008; - encryptedInterconnectRouter_ = input.readBool(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -673401110: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - bgpPeers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - bgpPeers_.add( - input.readMessage( - com.google.cloud.compute.v1.RouterBgpPeer.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - selfLink_ = 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_ & 0x00000200) != 0)) { - nats_ = java.util.Collections.unmodifiableList(nats_); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - interfaces_ = java.util.Collections.unmodifiableList(interfaces_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - bgpPeers_ = java.util.Collections.unmodifiableList(bgpPeers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Router_descriptor; @@ -1057,7 +897,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1109,7 +949,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1167,7 +1007,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSelfLink()) { if (!getSelfLink().equals(other.getSelfLink())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1231,7 +1071,7 @@ public int hashCode() { hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; hash = (53 * hash) + getSelfLink().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1388,10 +1228,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (bgpPeersBuilder_ == null) { bgpPeers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + bgpPeers_ = null; bgpPeersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); creationTimestamp_ = ""; bitField0_ = (bitField0_ & ~0x00000004); description_ = ""; @@ -1402,20 +1243,22 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000020); if (interfacesBuilder_ == null) { interfaces_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + interfaces_ = null; interfacesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000080); name_ = ""; bitField0_ = (bitField0_ & ~0x00000100); if (natsBuilder_ == null) { nats_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000200); } else { + nats_ = null; natsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000200); network_ = ""; bitField0_ = (bitField0_ & ~0x00000400); region_ = ""; @@ -1696,7 +1539,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Router other) { selfLink_ = other.selfLink_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1711,17 +1554,130 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Router 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 779866: + { + input.readMessage(getBgpFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 779866 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26989658 + case 26991506: + { + com.google.cloud.compute.v1.RouterNat m = + input.readMessage( + com.google.cloud.compute.v1.RouterNat.parser(), extensionRegistry); + if (natsBuilder_ == null) { + ensureNatsIsMutable(); + nats_.add(m); + } else { + natsBuilder_.addMessage(m); + } + break; + } // case 26991506 + case 96588498: + { + com.google.cloud.compute.v1.RouterInterface m = + input.readMessage( + com.google.cloud.compute.v1.RouterInterface.parser(), extensionRegistry); + if (interfacesBuilder_ == null) { + ensureInterfacesIsMutable(); + interfaces_.add(m); + } else { + interfacesBuilder_.addMessage(m); + } + break; + } // case 96588498 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 244202930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 1111570338 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1862979954 + case -1910994696: + { + encryptedInterconnectRouter_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case -1910994696 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -673401110: + { + com.google.cloud.compute.v1.RouterBgpPeer m = + input.readMessage( + com.google.cloud.compute.v1.RouterBgpPeer.parser(), extensionRegistry); + if (bgpPeersBuilder_ == null) { + ensureBgpPeersIsMutable(); + bgpPeers_.add(m); + } else { + bgpPeersBuilder_.addMessage(m); + } + break; + } // case -673401110 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case -645248918 + 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.compute.v1.Router) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3963,7 +3919,18 @@ public Router parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Router(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterAdvertisedIpRange.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterAdvertisedIpRange.java index 42e53159e903..02028718259c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterAdvertisedIpRange.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterAdvertisedIpRange.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterAdvertisedIpRange( - 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 866241002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - range_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - description_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterAdvertisedIpRange_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRange()) { if (!getRange().equals(other.getRange())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +275,7 @@ public int hashCode() { hash = (37 * hash) + RANGE_FIELD_NUMBER; hash = (53 * hash) + getRange().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouterAdvertisedIpRange.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 @@ -576,7 +515,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterAdvertisedIpRange oth range_ = other.range_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -591,18 +530,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterAdvertisedIpRange 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 866241002: + { + range_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 866241002 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -911466526 + 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.compute.v1.RouterAdvertisedIpRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -880,7 +844,18 @@ public RouterAdvertisedIpRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterAdvertisedIpRange(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterAggregatedList.java index e27f8500ef4d..b21fecb09ca5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterAggregatedList.java @@ -56,119 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.RoutersScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterAggregatedList_descriptor; @@ -704,7 +591,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -747,7 +634,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -785,7 +672,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -824,7 +711,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1153,7 +1040,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterAggregatedList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1168,17 +1055,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.RoutersScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.RouterAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2220,7 +2169,18 @@ public RouterAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgp.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgp.java index 5edac236bdf5..353e9fd1aade 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgp.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgp.java @@ -53,94 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterBgp( - 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 775136: - { - bitField0_ |= 0x00000002; - asn_ = input.readUInt32(); - break; - } - case 168524210: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - advertisedGroups_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - advertisedGroups_.add(s); - break; - } - case 283599458: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - advertisedIpRanges_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - advertisedIpRanges_.add( - input.readMessage( - com.google.cloud.compute.v1.RouterAdvertisedIpRange.parser(), - extensionRegistry)); - break; - } - case -2080795168: - { - bitField0_ |= 0x00000004; - keepaliveInterval_ = input.readUInt32(); - break; - } - case -1797892646: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - advertiseMode_ = 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_ & 0x00000002) != 0)) { - advertisedGroups_ = advertisedGroups_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - advertisedIpRanges_ = java.util.Collections.unmodifiableList(advertisedIpRanges_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterBgp_descriptor; @@ -727,7 +639,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 312134331, advertiseMode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -759,7 +671,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(312134331, advertiseMode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -788,7 +700,7 @@ public boolean equals(final java.lang.Object obj) { if (hasKeepaliveInterval()) { if (getKeepaliveInterval() != other.getKeepaliveInterval()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -819,7 +731,7 @@ public int hashCode() { hash = (37 * hash) + KEEPALIVE_INTERVAL_FIELD_NUMBER; hash = (53 * hash) + getKeepaliveInterval(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -946,19 +858,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouterBgp.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) { - getAdvertisedIpRangesFieldBuilder(); - } } @java.lang.Override @@ -970,10 +873,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (advertisedIpRangesBuilder_ == null) { advertisedIpRanges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + advertisedIpRanges_ = null; advertisedIpRangesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); asn_ = 0; bitField0_ = (bitField0_ & ~0x00000008); keepaliveInterval_ = 0; @@ -1131,7 +1035,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterBgp other) { if (other.hasKeepaliveInterval()) { setKeepaliveInterval(other.getKeepaliveInterval()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1146,17 +1050,70 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterBgp 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 775136: + { + asn_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 775136 + case 168524210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAdvertisedGroupsIsMutable(); + advertisedGroups_.add(s); + break; + } // case 168524210 + case 283599458: + { + com.google.cloud.compute.v1.RouterAdvertisedIpRange m = + input.readMessage( + com.google.cloud.compute.v1.RouterAdvertisedIpRange.parser(), + extensionRegistry); + if (advertisedIpRangesBuilder_ == null) { + ensureAdvertisedIpRangesIsMutable(); + advertisedIpRanges_.add(m); + } else { + advertisedIpRangesBuilder_.addMessage(m); + } + break; + } // case 283599458 + case -2080795168: + { + keepaliveInterval_ = input.readUInt32(); + bitField0_ |= 0x00000010; + break; + } // case -2080795168 + case -1797892646: + { + advertiseMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1797892646 + 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.compute.v1.RouterBgp) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2031,7 +1988,18 @@ public RouterBgp parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterBgp(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgpPeer.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgpPeer.java index ce77361d589f..0432c48243ae 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgpPeer.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgpPeer.java @@ -62,179 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterBgpPeer( - 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 779522: - { - com.google.cloud.compute.v1.RouterBgpPeerBfd.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = bfd_.toBuilder(); - } - bfd_ = - input.readMessage( - com.google.cloud.compute.v1.RouterBgpPeerBfd.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(bfd_); - bfd_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - name_ = s; - break; - } - case 168524210: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - advertisedGroups_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - advertisedGroups_.add(s); - break; - } - case 223745690: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - ipv6NexthopAddress_ = s; - break; - } - case 283599458: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - advertisedIpRanges_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - advertisedIpRanges_.add( - input.readMessage( - com.google.cloud.compute.v1.RouterAdvertisedIpRange.parser(), - extensionRegistry)); - break; - } - case 556585208: - { - bitField0_ |= 0x00000400; - peerAsn_ = input.readUInt32(); - break; - } - case 1389628850: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - managementType_ = s; - break; - } - case 1451743512: - { - bitField0_ |= 0x00000010; - enableIpv6_ = input.readBool(); - break; - } - case 1491890656: - { - bitField0_ |= 0x00000002; - advertisedRoutePriority_ = input.readUInt32(); - break; - } - case 1661886154: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - peerIpAddress_ = s; - break; - } - case -1800852454: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - enable_ = s; - break; - } - case -1797892646: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - advertiseMode_ = s; - break; - } - case -1044789534: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - ipAddress_ = s; - break; - } - case -792129910: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - interfaceName_ = s; - break; - } - case -548463382: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - routerApplianceInstance_ = s; - break; - } - case -363074430: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - peerIpv6NexthopAddress_ = 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_ & 0x00000002) != 0)) { - advertisedGroups_ = advertisedGroups_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - advertisedIpRanges_ = java.util.Collections.unmodifiableList(advertisedIpRanges_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterBgpPeer_descriptor; @@ -1799,7 +1626,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 491486608, peerIpv6NexthopAddress_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1870,7 +1697,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 491486608, peerIpv6NexthopAddress_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1944,7 +1771,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRouterApplianceInstance()) { if (!getRouterApplianceInstance().equals(other.getRouterApplianceInstance())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2019,7 +1846,7 @@ public int hashCode() { hash = (37 * hash) + ROUTER_APPLIANCE_INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getRouterApplianceInstance().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2172,10 +1999,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (advertisedIpRangesBuilder_ == null) { advertisedIpRanges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + advertisedIpRanges_ = null; advertisedIpRangesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); advertisedRoutePriority_ = 0; bitField0_ = (bitField0_ & ~0x00000008); if (bfdBuilder_ == null) { @@ -2458,7 +2286,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterBgpPeer other) { routerApplianceInstance_ = other.routerApplianceInstance_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2473,17 +2301,136 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterBgpPeer 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 779522: + { + input.readMessage(getBfdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 779522 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 26989658 + case 168524210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAdvertisedGroupsIsMutable(); + advertisedGroups_.add(s); + break; + } // case 168524210 + case 223745690: + { + ipv6NexthopAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 223745690 + case 283599458: + { + com.google.cloud.compute.v1.RouterAdvertisedIpRange m = + input.readMessage( + com.google.cloud.compute.v1.RouterAdvertisedIpRange.parser(), + extensionRegistry); + if (advertisedIpRangesBuilder_ == null) { + ensureAdvertisedIpRangesIsMutable(); + advertisedIpRanges_.add(m); + } else { + advertisedIpRangesBuilder_.addMessage(m); + } + break; + } // case 283599458 + case 556585208: + { + peerAsn_ = input.readUInt32(); + bitField0_ |= 0x00001000; + break; + } // case 556585208 + case 1389628850: + { + managementType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1389628850 + case 1451743512: + { + enableIpv6_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 1451743512 + case 1491890656: + { + advertisedRoutePriority_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case 1491890656 + case 1661886154: + { + peerIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 1661886154 + case -1800852454: + { + enable_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -1800852454 + case -1797892646: + { + advertiseMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1797892646 + case -1044789534: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -1044789534 + case -792129910: + { + interfaceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -792129910 + case -548463382: + { + routerApplianceInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case -548463382 + case -363074430: + { + peerIpv6NexthopAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -363074430 + 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.compute.v1.RouterBgpPeer) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4703,7 +4650,18 @@ public RouterBgpPeer parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterBgpPeer(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgpPeerBfd.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgpPeerBfd.java index 149e022f98cb..6674eb44891c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgpPeerBfd.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterBgpPeerBfd.java @@ -51,71 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterBgpPeerBfd( - 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 847656394: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - sessionInitializationMode_ = s; - break; - } - case 1495852912: - { - bitField0_ |= 0x00000001; - minReceiveInterval_ = input.readUInt32(); - break; - } - case 1530654216: - { - bitField0_ |= 0x00000004; - multiplier_ = input.readUInt32(); - break; - } - case -108706248: - { - bitField0_ |= 0x00000002; - minTransmitInterval_ = input.readUInt32(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterBgpPeerBfd_descriptor; @@ -459,7 +394,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeUInt32(523282631, minTransmitInterval_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +419,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(523282631, minTransmitInterval_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -517,7 +452,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSessionInitializationMode().equals(other.getSessionInitializationMode())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -544,7 +479,7 @@ public int hashCode() { hash = (37 * hash) + SESSION_INITIALIZATION_MODE_FIELD_NUMBER; hash = (53 * hash) + getSessionInitializationMode().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -672,17 +607,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouterBgpPeerBfd.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 @@ -805,7 +733,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterBgpPeerBfd other) { sessionInitializationMode_ = other.sessionInitializationMode_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -820,17 +748,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterBgpPeerBfd 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 847656394: + { + sessionInitializationMode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 847656394 + case 1495852912: + { + minReceiveInterval_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 1495852912 + case 1530654216: + { + multiplier_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case 1530654216 + case -108706248: + { + minTransmitInterval_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case -108706248 + 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.compute.v1.RouterBgpPeerBfd) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1195,7 +1161,18 @@ public RouterBgpPeerBfd parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterBgpPeerBfd(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterInterface.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterInterface.java index d61688a1204d..6aecdeebf923 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterInterface.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterInterface.java @@ -58,102 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterInterface( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - name_ = s; - break; - } - case 806832322: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - privateIpAddress_ = s; - break; - } - case 1160741162: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - ipRange_ = s; - break; - } - case 1389628850: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - managementType_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - subnetwork_ = s; - break; - } - case -1476591670: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - linkedVpnTunnel_ = s; - break; - } - case -286283150: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - linkedInterconnectAttachment_ = s; - break; - } - case -109468870: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - redundantInterface_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterInterface_descriptor; @@ -881,7 +785,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 523187303, redundantInterface_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -918,7 +822,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(523187303, redundantInterface_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -967,7 +871,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSubnetwork()) { if (!getSubnetwork().equals(other.getSubnetwork())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1010,7 +914,7 @@ public int hashCode() { hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; hash = (53 * hash) + getSubnetwork().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1138,17 +1042,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouterInterface.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 @@ -1321,7 +1218,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterInterface other) { subnetwork_ = other.subnetwork_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1336,17 +1233,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterInterface 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26989658 + case 806832322: + { + privateIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 806832322 + case 1160741162: + { + ipRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1160741162 + case 1389628850: + { + managementType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1389628850 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -1832345742 + case -1476591670: + { + linkedVpnTunnel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1476591670 + case -286283150: + { + linkedInterconnectAttachment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -286283150 + case -109468870: + { + redundantInterface_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -109468870 + 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.compute.v1.RouterInterface) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2350,7 +2309,18 @@ public RouterInterface parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterInterface(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterList.java index 4e19d821477e..5df1a3d8a968 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Router.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -823,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Router m = + input.readMessage( + com.google.cloud.compute.v1.Router.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.RouterList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2076,7 +2036,18 @@ public RouterList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNat.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNat.java index 1a44d58df7ea..4942ce339785 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNat.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNat.java @@ -59,206 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterNat( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 29180496: - { - bitField0_ |= 0x00000004; - icmpIdleTimeoutSec_ = input.readInt32(); - break; - } - case 519359024: - { - bitField0_ |= 0x00001000; - udpIdleTimeoutSec_ = input.readInt32(); - break; - } - case 870991802: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - rules_.add( - input.readMessage( - com.google.cloud.compute.v1.RouterNatRule.parser(), extensionRegistry)); - break; - } - case 941080690: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - natIps_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000400; - } - natIps_.add(s); - break; - } - case 1489548696: - { - bitField0_ |= 0x00000020; - minPortsPerVm_ = input.readInt32(); - break; - } - case 1640230192: - { - bitField0_ |= 0x00000800; - tcpTransitoryIdleTimeoutSec_ = input.readInt32(); - break; - } - case 1784786792: - { - bitField0_ |= 0x00000200; - tcpEstablishedIdleTimeoutSec_ = input.readInt32(); - break; - } - case 2000496392: - { - bitField0_ |= 0x00000010; - maxPortsPerVm_ = input.readInt32(); - break; - } - case 2017705690: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - sourceSubnetworkIpRangesToNat_ = s; - break; - } - case 2075534552: - { - bitField0_ |= 0x00000002; - enableEndpointIndependentMapping_ = input.readBool(); - break; - } - case -1484569366: - { - com.google.cloud.compute.v1.RouterNatLogConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = logConfig_.toBuilder(); - } - logConfig_ = - input.readMessage( - com.google.cloud.compute.v1.RouterNatLogConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(logConfig_); - logConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case -968142294: - { - if (!((mutable_bitField0_ & 0x00002000) != 0)) { - subnetworks_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00002000; - } - subnetworks_.add( - input.readMessage( - com.google.cloud.compute.v1.RouterNatSubnetworkToNat.parser(), - extensionRegistry)); - break; - } - case -857152534: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - natIpAllocateOption_ = s; - break; - } - case -273896838: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - endpointTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - endpointTypes_.add(s); - break; - } - case -262339014: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - drainNatIps_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - drainNatIps_.add(s); - break; - } - case -186191896: - { - bitField0_ |= 0x00000400; - tcpTimeWaitTimeoutSec_ = input.readInt32(); - break; - } - case -38116080: - { - bitField0_ |= 0x00000001; - enableDynamicPortAllocation_ = 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 { - if (((mutable_bitField0_ & 0x00000800) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - if (((mutable_bitField0_ & 0x00000400) != 0)) { - natIps_ = natIps_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00002000) != 0)) { - subnetworks_ = java.util.Collections.unmodifiableList(subnetworks_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - endpointTypes_ = endpointTypes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - drainNatIps_ = drainNatIps_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterNat_descriptor; @@ -1707,7 +1507,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(532106402, enableDynamicPortAllocation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1798,7 +1598,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 532106402, enableDynamicPortAllocation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1875,7 +1675,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUdpIdleTimeoutSec()) { if (getUdpIdleTimeoutSec() != other.getUdpIdleTimeoutSec()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1961,7 +1761,7 @@ public int hashCode() { hash = (37 * hash) + UDP_IDLE_TIMEOUT_SEC_FIELD_NUMBER; hash = (53 * hash) + getUdpIdleTimeoutSec(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2137,18 +1937,20 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); sourceSubnetworkIpRangesToNat_ = ""; bitField0_ = (bitField0_ & ~0x00001000); if (subnetworksBuilder_ == null) { subnetworks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); } else { + subnetworks_ = null; subnetworksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00002000); tcpEstablishedIdleTimeoutSec_ = 0; bitField0_ = (bitField0_ & ~0x00004000); tcpTimeWaitTimeoutSec_ = 0; @@ -2454,7 +2256,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterNat other) { if (other.hasUdpIdleTimeoutSec()) { setUdpIdleTimeoutSec(other.getUdpIdleTimeoutSec()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2469,17 +2271,157 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterNat 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26989658 + case 29180496: + { + icmpIdleTimeoutSec_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 29180496 + case 519359024: + { + udpIdleTimeoutSec_ = input.readInt32(); + bitField0_ |= 0x00020000; + break; + } // case 519359024 + case 870991802: + { + com.google.cloud.compute.v1.RouterNatRule m = + input.readMessage( + com.google.cloud.compute.v1.RouterNatRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 870991802 + case 941080690: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNatIpsIsMutable(); + natIps_.add(s); + break; + } // case 941080690 + case 1489548696: + { + minPortsPerVm_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 1489548696 + case 1640230192: + { + tcpTransitoryIdleTimeoutSec_ = input.readInt32(); + bitField0_ |= 0x00010000; + break; + } // case 1640230192 + case 1784786792: + { + tcpEstablishedIdleTimeoutSec_ = input.readInt32(); + bitField0_ |= 0x00004000; + break; + } // case 1784786792 + case 2000496392: + { + maxPortsPerVm_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 2000496392 + case 2017705690: + { + sourceSubnetworkIpRangesToNat_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 2017705690 + case 2075534552: + { + enableEndpointIndependentMapping_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 2075534552 + case -1484569366: + { + input.readMessage(getLogConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case -1484569366 + case -968142294: + { + com.google.cloud.compute.v1.RouterNatSubnetworkToNat m = + input.readMessage( + com.google.cloud.compute.v1.RouterNatSubnetworkToNat.parser(), + extensionRegistry); + if (subnetworksBuilder_ == null) { + ensureSubnetworksIsMutable(); + subnetworks_.add(m); + } else { + subnetworksBuilder_.addMessage(m); + } + break; + } // case -968142294 + case -857152534: + { + natIpAllocateOption_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -857152534 + case -273896838: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEndpointTypesIsMutable(); + endpointTypes_.add(s); + break; + } // case -273896838 + case -262339014: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDrainNatIpsIsMutable(); + drainNatIps_.add(s); + break; + } // case -262339014 + case -186191896: + { + tcpTimeWaitTimeoutSec_ = input.readInt32(); + bitField0_ |= 0x00008000; + break; + } // case -186191896 + case -38116080: + { + enableDynamicPortAllocation_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -38116080 + 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.compute.v1.RouterNat) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4893,7 +4835,18 @@ public RouterNat parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterNat(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatLogConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatLogConfig.java index d79bfade8ac6..e85e6b71cec4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatLogConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatLogConfig.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterNatLogConfig( - 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 -1800852456: - { - bitField0_ |= 0x00000001; - enable_ = input.readBool(); - break; - } - case -1606001726: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterNatLogConfig_descriptor; @@ -420,7 +367,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 336120696, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -435,7 +382,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(336120696, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -459,7 +406,7 @@ public boolean equals(final java.lang.Object obj) { if (hasFilter()) { if (!getFilter().equals(other.getFilter())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -478,7 +425,7 @@ public int 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; } @@ -607,17 +554,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouterNatLogConfig.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 @@ -722,7 +662,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterNatLogConfig other) { filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -737,17 +677,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterNatLogConfig 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 -1800852456: + { + enable_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1800852456 + case -1606001726: + { + filter_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1606001726 + 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.compute.v1.RouterNatLogConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -978,7 +944,18 @@ public RouterNatLogConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterNatLogConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatRule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatRule.java index 10a5dcd16e17..fa4ff7d570ce 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatRule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatRule.java @@ -52,82 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterNatRule( - 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 829345322: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - match_ = s; - break; - } - case 1501295026: - { - com.google.cloud.compute.v1.RouterNatRuleAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = action_.toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.compute.v1.RouterNatRuleAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(action_); - action_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -13275296: - { - bitField0_ |= 0x00000008; - ruleNumber_ = input.readUInt32(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterNatRule_descriptor; @@ -381,7 +305,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeUInt32(535211500, ruleNumber_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -402,7 +326,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(535211500, ruleNumber_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -434,7 +358,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRuleNumber()) { if (getRuleNumber() != other.getRuleNumber()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -461,7 +385,7 @@ public int hashCode() { hash = (37 * hash) + RULE_NUMBER_FIELD_NUMBER; hash = (53 * hash) + getRuleNumber(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -734,7 +658,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterNatRule other) { if (other.hasRuleNumber()) { setRuleNumber(other.getRuleNumber()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,17 +673,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterNatRule 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 829345322: + { + match_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 829345322 + case 1501295026: + { + input.readMessage(getActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1501295026 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -13275296: + { + ruleNumber_ = input.readUInt32(); + bitField0_ |= 0x00000008; + break; + } // case -13275296 + 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.compute.v1.RouterNatRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1291,7 +1253,18 @@ public RouterNatRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterNatRule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatRuleAction.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatRuleAction.java index f89556ae005a..22da751d2458 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatRuleAction.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatRuleAction.java @@ -52,72 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterNatRuleAction( - 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 1683025834: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sourceNatActiveIps_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sourceNatActiveIps_.add(s); - break; - } - case -1568467686: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - sourceNatDrainIps_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - sourceNatDrainIps_.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)) { - sourceNatActiveIps_ = sourceNatActiveIps_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - sourceNatDrainIps_ = sourceNatDrainIps_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterNatRuleAction_descriptor; @@ -277,7 +211,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 340812451, sourceNatDrainIps_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -302,7 +236,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getSourceNatDrainIpsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +254,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceNatActiveIpsList().equals(other.getSourceNatActiveIpsList())) return false; if (!getSourceNatDrainIpsList().equals(other.getSourceNatDrainIpsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -339,7 +273,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_NAT_DRAIN_IPS_FIELD_NUMBER; hash = (53 * hash) + getSourceNatDrainIpsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -467,17 +401,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouterNatRuleAction.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 @@ -595,7 +522,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterNatRuleAction other) } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,17 +537,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterNatRuleAction 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 1683025834: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourceNatActiveIpsIsMutable(); + sourceNatActiveIps_.add(s); + break; + } // case 1683025834 + case -1568467686: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourceNatDrainIpsIsMutable(); + sourceNatDrainIps_.add(s); + break; + } // case -1568467686 + 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.compute.v1.RouterNatRuleAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -994,7 +949,18 @@ public RouterNatRuleAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterNatRuleAction(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatSubnetworkToNat.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatSubnetworkToNat.java index 9e52487f4b65..324d6d47f34c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatSubnetworkToNat.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterNatSubnetworkToNat.java @@ -54,79 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterNatSubnetworkToNat( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 2114520778: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - secondaryIpRangeNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - secondaryIpRangeNames_.add(s); - break; - } - case -1188484206: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - sourceIpRangesToNat_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - sourceIpRangesToNat_.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_ & 0x00000002) != 0)) { - secondaryIpRangeNames_ = secondaryIpRangeNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - sourceIpRangesToNat_ = sourceIpRangesToNat_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterNatSubnetworkToNat_descriptor; @@ -541,7 +468,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 388310386, sourceIpRangesToNat_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -569,7 +496,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getSourceIpRangesToNatList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -591,7 +518,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getSecondaryIpRangeNamesList().equals(other.getSecondaryIpRangeNamesList())) return false; if (!getSourceIpRangesToNatList().equals(other.getSourceIpRangesToNatList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -614,7 +541,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_IP_RANGES_TO_NAT_FIELD_NUMBER; hash = (53 * hash) + getSourceIpRangesToNatList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -743,17 +670,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouterNatSubnetworkToNat.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 @@ -884,7 +804,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterNatSubnetworkToNat ot } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -899,18 +819,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterNatSubnetworkToNat 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 2114520778: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSecondaryIpRangeNamesIsMutable(); + secondaryIpRangeNames_.add(s); + break; + } // case 2114520778 + case -1188484206: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSourceIpRangesToNatIsMutable(); + sourceIpRangesToNat_.add(s); + break; + } // case -1188484206 + 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.compute.v1.RouterNatSubnetworkToNat) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1414,7 +1367,18 @@ public RouterNatSubnetworkToNat parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterNatSubnetworkToNat(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatus.java index 71b03995d26b..ca6f0f15075f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatus.java @@ -55,112 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterStatus( - 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 504784514: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - natStatus_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - natStatus_.add( - input.readMessage( - com.google.cloud.compute.v1.RouterStatusNatStatus.parser(), - extensionRegistry)); - break; - } - case 955117514: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - bestRoutesForRouter_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - bestRoutesForRouter_.add( - input.readMessage(com.google.cloud.compute.v1.Route.parser(), extensionRegistry)); - break; - } - case 1747673050: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - bgpPeerStatus_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.RouterStatusBgpPeerStatus>(); - mutable_bitField0_ |= 0x00000004; - } - bgpPeerStatus_.add( - input.readMessage( - com.google.cloud.compute.v1.RouterStatusBgpPeerStatus.parser(), - extensionRegistry)); - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - network_ = s; - break; - } - case -1128353750: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bestRoutes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bestRoutes_.add( - input.readMessage(com.google.cloud.compute.v1.Route.parser(), extensionRegistry)); - 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_ & 0x00000008) != 0)) { - natStatus_ = java.util.Collections.unmodifiableList(natStatus_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - bestRoutesForRouter_ = java.util.Collections.unmodifiableList(bestRoutesForRouter_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - bgpPeerStatus_ = java.util.Collections.unmodifiableList(bgpPeerStatus_); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - bestRoutes_ = java.util.Collections.unmodifiableList(bestRoutes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterStatus_descriptor; @@ -484,7 +378,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < bestRoutes_.size(); i++) { output.writeMessage(395826693, bestRoutes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -513,7 +407,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(395826693, bestRoutes_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -536,7 +430,7 @@ public boolean equals(final java.lang.Object obj) { if (hasNetwork()) { if (!getNetwork().equals(other.getNetwork())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -567,7 +461,7 @@ public int hashCode() { hash = (37 * hash) + NETWORK_FIELD_NUMBER; hash = (53 * hash) + getNetwork().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -695,22 +589,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouterStatus.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) { - getBestRoutesFieldBuilder(); - getBestRoutesForRouterFieldBuilder(); - getBgpPeerStatusFieldBuilder(); - getNatStatusFieldBuilder(); - } } @java.lang.Override @@ -718,28 +600,32 @@ public Builder clear() { super.clear(); if (bestRoutesBuilder_ == null) { bestRoutes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bestRoutes_ = null; bestRoutesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (bestRoutesForRouterBuilder_ == null) { bestRoutesForRouter_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + bestRoutesForRouter_ = null; bestRoutesForRouterBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (bgpPeerStatusBuilder_ == null) { bgpPeerStatus_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + bgpPeerStatus_ = null; bgpPeerStatusBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (natStatusBuilder_ == null) { natStatus_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + natStatus_ = null; natStatusBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); network_ = ""; bitField0_ = (bitField0_ & ~0x00000010); return this; @@ -974,7 +860,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterStatus other) { network_ = other.network_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -989,17 +875,91 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterStatus 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 504784514: + { + com.google.cloud.compute.v1.RouterStatusNatStatus m = + input.readMessage( + com.google.cloud.compute.v1.RouterStatusNatStatus.parser(), + extensionRegistry); + if (natStatusBuilder_ == null) { + ensureNatStatusIsMutable(); + natStatus_.add(m); + } else { + natStatusBuilder_.addMessage(m); + } + break; + } // case 504784514 + case 955117514: + { + com.google.cloud.compute.v1.Route m = + input.readMessage( + com.google.cloud.compute.v1.Route.parser(), extensionRegistry); + if (bestRoutesForRouterBuilder_ == null) { + ensureBestRoutesForRouterIsMutable(); + bestRoutesForRouter_.add(m); + } else { + bestRoutesForRouterBuilder_.addMessage(m); + } + break; + } // case 955117514 + case 1747673050: + { + com.google.cloud.compute.v1.RouterStatusBgpPeerStatus m = + input.readMessage( + com.google.cloud.compute.v1.RouterStatusBgpPeerStatus.parser(), + extensionRegistry); + if (bgpPeerStatusBuilder_ == null) { + ensureBgpPeerStatusIsMutable(); + bgpPeerStatus_.add(m); + } else { + bgpPeerStatusBuilder_.addMessage(m); + } + break; + } // case 1747673050 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1862979954 + case -1128353750: + { + com.google.cloud.compute.v1.Route m = + input.readMessage( + com.google.cloud.compute.v1.Route.parser(), extensionRegistry); + if (bestRoutesBuilder_ == null) { + ensureBestRoutesIsMutable(); + bestRoutes_.add(m); + } else { + bestRoutesBuilder_.addMessage(m); + } + break; + } // case -1128353750 + 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.compute.v1.RouterStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2399,7 +2359,18 @@ public RouterStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusBgpPeerStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusBgpPeerStatus.java index 11441c22a6f7..7cdfe9a805f0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusBgpPeerStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusBgpPeerStatus.java @@ -60,144 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterStatusBgpPeerStatus( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - name_ = s; - break; - } - case 837888322: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - uptimeSeconds_ = s; - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - state_ = s; - break; - } - case 1083660280: - { - bitField0_ |= 0x00000010; - numLearnedRoutes_ = input.readUInt32(); - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - status_ = s; - break; - } - case 1661886154: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - peerIpAddress_ = s; - break; - } - case 1883037506: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - uptime_ = s; - break; - } - case -1627822750: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - advertisedRoutes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - advertisedRoutes_.add( - input.readMessage(com.google.cloud.compute.v1.Route.parser(), extensionRegistry)); - break; - } - case -1476591670: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - linkedVpnTunnel_ = s; - break; - } - case -1129913462: - { - com.google.cloud.compute.v1.BfdStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = bfdStatus_.toBuilder(); - } - bfdStatus_ = - input.readMessage( - com.google.cloud.compute.v1.BfdStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(bfdStatus_); - bfdStatus_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1044789534: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - ipAddress_ = s; - break; - } - case -548463382: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - routerApplianceInstance_ = 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)) { - advertisedRoutes_ = java.util.Collections.unmodifiableList(advertisedRoutes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterStatusBgpPeerStatus_descriptor; @@ -1109,7 +971,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 468312989, routerApplianceInstance_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1158,7 +1020,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 468312989, routerApplianceInstance_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1219,7 +1081,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUptimeSeconds()) { if (!getUptimeSeconds().equals(other.getUptimeSeconds())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1278,7 +1140,7 @@ public int hashCode() { hash = (37 * hash) + UPTIME_SECONDS_FIELD_NUMBER; hash = (53 * hash) + getUptimeSeconds().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1428,10 +1290,11 @@ public Builder clear() { super.clear(); if (advertisedRoutesBuilder_ == null) { advertisedRoutes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + advertisedRoutes_ = null; advertisedRoutesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (bfdStatusBuilder_ == null) { bfdStatus_ = null; } else { @@ -1673,7 +1536,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterStatusBgpPeerStatus o uptimeSeconds_ = other.uptimeSeconds_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1688,18 +1551,110 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterStatusBgpPeerStatus 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26989658 + case 837888322: + { + uptimeSeconds_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 837888322 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 878060682 + case 1083660280: + { + numLearnedRoutes_ = input.readUInt32(); + bitField0_ |= 0x00000020; + break; + } // case 1083660280 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1450082194 + case 1661886154: + { + peerIpAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1661886154 + case 1883037506: + { + uptime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1883037506 + case -1627822750: + { + com.google.cloud.compute.v1.Route m = + input.readMessage( + com.google.cloud.compute.v1.Route.parser(), extensionRegistry); + if (advertisedRoutesBuilder_ == null) { + ensureAdvertisedRoutesIsMutable(); + advertisedRoutes_.add(m); + } else { + advertisedRoutesBuilder_.addMessage(m); + } + break; + } // case -1627822750 + case -1476591670: + { + linkedVpnTunnel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -1476591670 + case -1129913462: + { + input.readMessage(getBfdStatusFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1129913462 + case -1044789534: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1044789534 + case -548463382: + { + routerApplianceInstance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -548463382 + 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.compute.v1.RouterStatusBgpPeerStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3361,7 +3316,18 @@ public RouterStatusBgpPeerStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterStatusBgpPeerStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatus.java index 82e339c9db8c..800a46a3e706 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatus.java @@ -58,147 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterStatusNatStatus( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - name_ = s; - break; - } - case 1121785002: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - ruleStatus_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus>(); - mutable_bitField0_ |= 0x00000040; - } - ruleStatus_.add( - input.readMessage( - com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.parser(), - extensionRegistry)); - break; - } - case 1702209210: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - userAllocatedNatIpResources_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000080; - } - userAllocatedNatIpResources_.add(s); - break; - } - case -1852818870: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - drainUserAllocatedNatIps_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - drainUserAllocatedNatIps_.add(s); - break; - } - case -1821490838: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - drainAutoAllocatedNatIps_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - drainAutoAllocatedNatIps_.add(s); - break; - } - case -1368676592: - { - bitField0_ |= 0x00000001; - minExtraNatIpsNeeded_ = input.readInt32(); - break; - } - case -239941358: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - userAllocatedNatIps_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - userAllocatedNatIps_.add(s); - break; - } - case -208613326: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - autoAllocatedNatIps_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - autoAllocatedNatIps_.add(s); - break; - } - case -196027552: - { - bitField0_ |= 0x00000004; - numVmEndpointsWithNatMappings_ = 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 { - if (((mutable_bitField0_ & 0x00000040) != 0)) { - ruleStatus_ = java.util.Collections.unmodifiableList(ruleStatus_); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - userAllocatedNatIpResources_ = userAllocatedNatIpResources_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - drainUserAllocatedNatIps_ = drainUserAllocatedNatIps_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - drainAutoAllocatedNatIps_ = drainAutoAllocatedNatIps_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000100) != 0)) { - userAllocatedNatIps_ = userAllocatedNatIps_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - autoAllocatedNatIps_ = autoAllocatedNatIps_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterStatusNatStatus_descriptor; @@ -779,7 +638,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeInt32(512367468, numVmEndpointsWithNatMappings_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -844,7 +703,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeInt32Size( 512367468, numVmEndpointsWithNatMappings_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -883,7 +742,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUserAllocatedNatIpResourcesList().equals(other.getUserAllocatedNatIpResourcesList())) return false; if (!getUserAllocatedNatIpsList().equals(other.getUserAllocatedNatIpsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -930,7 +789,7 @@ public int hashCode() { hash = (37 * hash) + USER_ALLOCATED_NAT_IPS_FIELD_NUMBER; hash = (53 * hash) + getUserAllocatedNatIpsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1059,19 +918,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouterStatusNatStatus.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) { - getRuleStatusFieldBuilder(); - } } @java.lang.Override @@ -1091,10 +941,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000020); if (ruleStatusBuilder_ == null) { ruleStatus_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + ruleStatus_ = null; ruleStatusBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); userAllocatedNatIpResources_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000080); userAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -1313,7 +1164,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterStatusNatStatus other } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1328,18 +1179,98 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterStatusNatStatus 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26989658 + case 1121785002: + { + com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus m = + input.readMessage( + com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.parser(), + extensionRegistry); + if (ruleStatusBuilder_ == null) { + ensureRuleStatusIsMutable(); + ruleStatus_.add(m); + } else { + ruleStatusBuilder_.addMessage(m); + } + break; + } // case 1121785002 + case 1702209210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUserAllocatedNatIpResourcesIsMutable(); + userAllocatedNatIpResources_.add(s); + break; + } // case 1702209210 + case -1852818870: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDrainUserAllocatedNatIpsIsMutable(); + drainUserAllocatedNatIps_.add(s); + break; + } // case -1852818870 + case -1821490838: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDrainAutoAllocatedNatIpsIsMutable(); + drainAutoAllocatedNatIps_.add(s); + break; + } // case -1821490838 + case -1368676592: + { + minExtraNatIpsNeeded_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case -1368676592 + case -239941358: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUserAllocatedNatIpsIsMutable(); + userAllocatedNatIps_.add(s); + break; + } // case -239941358 + case -208613326: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAutoAllocatedNatIpsIsMutable(); + autoAllocatedNatIps_.add(s); + break; + } // case -208613326 + case -196027552: + { + numVmEndpointsWithNatMappings_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case -196027552 + 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.compute.v1.RouterStatusNatStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2877,7 +2808,18 @@ public RouterStatusNatStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterStatusNatStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatusNatRuleStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatusNatRuleStatus.java index 261376047b89..c67aeaf9efb6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatusNatRuleStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusNatStatusNatRuleStatus.java @@ -54,90 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterStatusNatStatusNatRuleStatus( - 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 1668136618: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - activeNatIps_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - activeNatIps_.add(s); - break; - } - case -1470945248: - { - bitField0_ |= 0x00000001; - minExtraIpsNeeded_ = input.readInt32(); - break; - } - case -262339014: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - drainNatIps_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - drainNatIps_.add(s); - break; - } - case -196027552: - { - bitField0_ |= 0x00000002; - numVmEndpointsWithNatMappings_ = input.readInt32(); - break; - } - case -13275296: - { - bitField0_ |= 0x00000004; - ruleNumber_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - activeNatIps_ = activeNatIps_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - drainNatIps_ = drainNatIps_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterStatusNatStatusNatRuleStatus_descriptor; @@ -405,7 +321,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeInt32(535211500, ruleNumber_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -441,7 +357,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(535211500, ruleNumber_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -473,7 +389,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRuleNumber()) { if (getRuleNumber() != other.getRuleNumber()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -504,7 +420,7 @@ public int hashCode() { hash = (37 * hash) + RULE_NUMBER_FIELD_NUMBER; hash = (53 * hash) + getRuleNumber(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -634,17 +550,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.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 @@ -793,7 +702,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterStatusNatStatusNatRul if (other.hasRuleNumber()) { setRuleNumber(other.getRuleNumber()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -808,19 +717,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus 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 1668136618: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureActiveNatIpsIsMutable(); + activeNatIps_.add(s); + break; + } // case 1668136618 + case -1470945248: + { + minExtraIpsNeeded_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case -1470945248 + case -262339014: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDrainNatIpsIsMutable(); + drainNatIps_.add(s); + break; + } // case -262339014 + case -196027552: + { + numVmEndpointsWithNatMappings_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case -196027552 + case -13275296: + { + ruleNumber_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case -13275296 + 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.compute.v1.RouterStatusNatStatusNatRuleStatus) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1397,7 +1350,18 @@ public RouterStatusNatStatusNatRuleStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterStatusNatStatusNatRuleStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusResponse.java index 17915659a08b..dd77fa7b2635 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RouterStatusResponse.java @@ -51,69 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RouterStatusResponse( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - kind_ = s; - break; - } - case 1114521834: - { - com.google.cloud.compute.v1.RouterStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = result_.toBuilder(); - } - result_ = - input.readMessage( - com.google.cloud.compute.v1.RouterStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(result_); - result_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RouterStatusResponse_descriptor; @@ -244,7 +181,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(139315229, getResult()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -259,7 +196,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(139315229, getResult()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -283,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResult()) { if (!getResult().equals(other.getResult())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -302,7 +239,7 @@ public int hashCode() { hash = (37 * hash) + RESULT_FIELD_NUMBER; hash = (53 * hash) + getResult().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -556,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RouterStatusResponse other) if (other.hasResult()) { mergeResult(other.getResult()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -571,17 +508,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RouterStatusResponse 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26336418 + case 1114521834: + { + input.readMessage(getResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 1114521834 + 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.compute.v1.RouterStatusResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -857,7 +820,18 @@ public RouterStatusResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RouterStatusResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RoutersPreviewResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RoutersPreviewResponse.java index bfe92dd02e88..a22c1b28c742 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RoutersPreviewResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RoutersPreviewResponse.java @@ -49,61 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RoutersPreviewResponse( - 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 1566449778: - { - com.google.cloud.compute.v1.Router.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = resource_.toBuilder(); - } - resource_ = - input.readMessage(com.google.cloud.compute.v1.Router.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_RoutersPreviewResponse_descriptor; @@ -183,7 +128,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(195806222, getResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +140,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(195806222, getResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -215,7 +160,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResource()) { if (!getResource().equals(other.getResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -230,7 +175,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -473,7 +418,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RoutersPreviewResponse othe if (other.hasResource()) { mergeResource(other.getResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -488,18 +433,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RoutersPreviewResponse 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 1566449778: + { + input.readMessage(getResourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1566449778 + 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.compute.v1.RoutersPreviewResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -723,7 +687,18 @@ public RoutersPreviewResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RoutersPreviewResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RoutersScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RoutersScopedList.java index 9b4d05ee324e..3d4a15701893 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RoutersScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/RoutersScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RoutersScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1799712174: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - routers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - routers_.add( - input.readMessage( - com.google.cloud.compute.v1.Router.parser(), extensionRegistry)); - 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)) { - routers_ = java.util.Collections.unmodifiableList(routers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_RoutersScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < routers_.size(); i++) { output.writeMessage(311906890, routers_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +217,7 @@ public int getSerializedSize() { for (int i = 0; i < routers_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(311906890, routers_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +238,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -327,7 +257,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -476,10 +406,11 @@ public Builder clear() { super.clear(); if (routersBuilder_ == null) { routers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + routers_ = null; routersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -612,7 +543,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.RoutersScopedList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -627,17 +558,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.RoutersScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1799712174: + { + com.google.cloud.compute.v1.Router m = + input.readMessage( + com.google.cloud.compute.v1.Router.parser(), extensionRegistry); + if (routersBuilder_ == null) { + ensureRoutersIsMutable(); + routers_.add(m); + } else { + routersBuilder_.addMessage(m); + } + break; + } // case -1799712174 + 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.compute.v1.RoutersScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1209,7 +1173,18 @@ public RoutersScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RoutersScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Rule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Rule.java index 01485660973a..b5cd7a2382af 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Rule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Rule.java @@ -58,127 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Rule( - 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 835442: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - ins_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - ins_.add(s); - break; - } - case 479700002: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - permissions_.add(s); - break; - } - case 1143059906: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - conditions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - conditions_.add( - input.readMessage( - com.google.cloud.compute.v1.Condition.parser(), extensionRegistry)); - break; - } - case 1222990770: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - logConfigs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - logConfigs_.add( - input.readMessage( - com.google.cloud.compute.v1.LogConfig.parser(), extensionRegistry)); - break; - } - case 1501295026: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - action_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -147422190: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - notIns_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - notIns_.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_ & 0x00000008) != 0)) { - ins_ = ins_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - permissions_ = permissions_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - conditions_ = java.util.Collections.unmodifiableList(conditions_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - logConfigs_ = java.util.Collections.unmodifiableList(logConfigs_); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - notIns_ = notIns_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Rule_descriptor; @@ -926,7 +805,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < notIns_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 518443138, notIns_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -973,7 +852,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getNotInsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1001,7 +880,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLogConfigsList().equals(other.getLogConfigsList())) return false; if (!getNotInsList().equals(other.getNotInsList())) return false; if (!getPermissionsList().equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1040,7 +919,7 @@ public int hashCode() { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1168,20 +1047,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Rule.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) { - getConditionsFieldBuilder(); - getLogConfigsFieldBuilder(); - } } @java.lang.Override @@ -1191,20 +1060,22 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (conditionsBuilder_ == null) { conditions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + conditions_ = null; conditionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); description_ = ""; bitField0_ = (bitField0_ & ~0x00000004); ins_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); if (logConfigsBuilder_ == null) { logConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + logConfigs_ = null; logConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); notIns_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000020); permissions_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -1422,7 +1293,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Rule other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1437,17 +1308,90 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Rule 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 835442: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInsIsMutable(); + ins_.add(s); + break; + } // case 835442 + case 479700002: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePermissionsIsMutable(); + permissions_.add(s); + break; + } // case 479700002 + case 1143059906: + { + com.google.cloud.compute.v1.Condition m = + input.readMessage( + com.google.cloud.compute.v1.Condition.parser(), extensionRegistry); + if (conditionsBuilder_ == null) { + ensureConditionsIsMutable(); + conditions_.add(m); + } else { + conditionsBuilder_.addMessage(m); + } + break; + } // case 1143059906 + case 1222990770: + { + com.google.cloud.compute.v1.LogConfig m = + input.readMessage( + com.google.cloud.compute.v1.LogConfig.parser(), extensionRegistry); + if (logConfigsBuilder_ == null) { + ensureLogConfigsIsMutable(); + logConfigs_.add(m); + } else { + logConfigsBuilder_.addMessage(m); + } + break; + } // case 1222990770 + case 1501295026: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1501295026 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -147422190: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNotInsIsMutable(); + notIns_.add(s); + break; + } // case -147422190 + 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.compute.v1.Rule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2932,7 +2876,18 @@ public Rule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Rule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SSLHealthCheck.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SSLHealthCheck.java index a696cc5622c9..4644c3d3af16 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SSLHealthCheck.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SSLHealthCheck.java @@ -55,87 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SSLHealthCheck( - 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 27575304: - { - bitField0_ |= 0x00000001; - port_ = input.readInt32(); - break; - } - case 175608954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - request_ = s; - break; - } - case 332274762: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - portName_ = s; - break; - } - case 412724778: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - portSpecification_ = s; - break; - } - case 1282993138: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - proxyHeader_ = s; - break; - } - case 1572381194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - response_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SSLHealthCheck_descriptor; @@ -850,7 +769,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 196547649, response_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -878,7 +797,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(196547649, response_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -918,7 +837,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResponse()) { if (!getResponse().equals(other.getResponse())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -953,7 +872,7 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_FIELD_NUMBER; hash = (53 * hash) + getResponse().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1081,17 +1000,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SSLHealthCheck.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 @@ -1240,7 +1152,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SSLHealthCheck other) { response_ = other.response_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1255,17 +1167,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SSLHealthCheck 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 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 27575304 + case 175608954: + { + request_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 175608954 + case 332274762: + { + portName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 332274762 + case 412724778: + { + portSpecification_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 412724778 + case 1282993138: + { + proxyHeader_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1282993138 + case 1572381194: + { + response_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1572381194 + 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.compute.v1.SSLHealthCheck) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1982,7 +1944,18 @@ public SSLHealthCheck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SSLHealthCheck(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SavedAttachedDisk.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SavedAttachedDisk.java index 4ad0bdee505d..3a61348526b9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SavedAttachedDisk.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SavedAttachedDisk.java @@ -61,177 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SavedAttachedDisk( - 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 24237968: - { - bitField0_ |= 0x00000002; - boot_ = input.readBool(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - kind_ = s; - break; - } - case 26856730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - mode_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - type_ = s; - break; - } - case 540333730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - deviceName_ = s; - break; - } - case 634356362: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - guestOsFeatures_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - guestOsFeatures_.add( - input.readMessage( - com.google.cloud.compute.v1.GuestOsFeature.parser(), extensionRegistry)); - break; - } - case 744072418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - diskType_ = s; - break; - } - case 802768528: - { - bitField0_ |= 0x00000040; - index_ = input.readInt32(); - break; - } - case 1417887962: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - source_ = s; - break; - } - case -2121681878: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = diskEncryptionKey_.toBuilder(); - } - diskEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diskEncryptionKey_); - diskEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case -1764857416: - { - bitField0_ |= 0x00000010; - diskSizeGb_ = input.readInt64(); - break; - } - case -1593826670: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - licenses_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000400; - } - licenses_.add(s); - break; - } - case -897913544: - { - bitField0_ |= 0x00000800; - storageBytes_ = input.readInt64(); - break; - } - case -576876072: - { - bitField0_ |= 0x00000001; - autoDelete_ = input.readBool(); - break; - } - case -369054638: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - storageBytesStatus_ = s; - break; - } - case -273978934: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - interface_ = 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_ & 0x00000040) != 0)) { - guestOsFeatures_ = java.util.Collections.unmodifiableList(guestOsFeatures_); - } - if (((mutable_bitField0_ & 0x00000400) != 0)) { - licenses_ = licenses_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SavedAttachedDisk_descriptor; @@ -1719,7 +1548,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 502623545, interface_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1786,7 +1615,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(502623545, interface_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1860,7 +1689,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1935,7 +1764,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2101,10 +1930,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000020); if (guestOsFeaturesBuilder_ == null) { guestOsFeatures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + guestOsFeatures_ = null; guestOsFeaturesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); index_ = 0; bitField0_ = (bitField0_ & ~0x00000080); interface_ = ""; @@ -2371,7 +2201,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SavedAttachedDisk other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2386,17 +2216,136 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SavedAttachedDisk 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 24237968: + { + boot_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 24237968 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26336418 + case 26856730: + { + mode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 26856730 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 28604882 + case 540333730: + { + deviceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 540333730 + case 634356362: + { + com.google.cloud.compute.v1.GuestOsFeature m = + input.readMessage( + com.google.cloud.compute.v1.GuestOsFeature.parser(), extensionRegistry); + if (guestOsFeaturesBuilder_ == null) { + ensureGuestOsFeaturesIsMutable(); + guestOsFeatures_.add(m); + } else { + guestOsFeaturesBuilder_.addMessage(m); + } + break; + } // case 634356362 + case 744072418: + { + diskType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 744072418 + case 802768528: + { + index_ = input.readInt32(); + bitField0_ |= 0x00000080; + break; + } // case 802768528 + case 1417887962: + { + source_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 1417887962 + case -2121681878: + { + input.readMessage( + getDiskEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -2121681878 + case -1764857416: + { + diskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case -1764857416 + case -1593826670: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicensesIsMutable(); + licenses_.add(s); + break; + } // case -1593826670 + case -897913544: + { + storageBytes_ = input.readInt64(); + bitField0_ |= 0x00002000; + break; + } // case -897913544 + case -576876072: + { + autoDelete_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -576876072 + case -369054638: + { + storageBytesStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -369054638 + case -273978934: + { + interface_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -273978934 + 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.compute.v1.SavedAttachedDisk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4483,7 +4432,18 @@ public SavedAttachedDisk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SavedAttachedDisk(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SavedDisk.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SavedDisk.java index f95e85542685..c205cfe9d7ec 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SavedDisk.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SavedDisk.java @@ -55,80 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SavedDisk( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case -1872541030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - architecture_ = s; - break; - } - case -897913544: - { - bitField0_ |= 0x00000008; - storageBytes_ = input.readInt64(); - break; - } - case -680936950: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - sourceDisk_ = s; - break; - } - case -369054638: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - storageBytesStatus_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SavedDisk_descriptor; @@ -776,7 +702,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 490739082, storageBytesStatus_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -801,7 +727,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(490739082, storageBytesStatus_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -836,7 +762,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStorageBytesStatus()) { if (!getStorageBytesStatus().equals(other.getStorageBytesStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -867,7 +793,7 @@ public int hashCode() { hash = (37 * hash) + STORAGE_BYTES_STATUS_FIELD_NUMBER; hash = (53 * hash) + getStorageBytesStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -995,17 +921,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SavedDisk.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 @@ -1143,7 +1062,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SavedDisk other) { storageBytesStatus_ = other.storageBytesStatus_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1158,17 +1077,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SavedDisk 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26336418 + case -1872541030: + { + architecture_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1872541030 + case -897913544: + { + storageBytes_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case -897913544 + case -680936950: + { + sourceDisk_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -680936950 + case -369054638: + { + storageBytesStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -369054638 + 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.compute.v1.SavedDisk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1765,7 +1728,18 @@ public SavedDisk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SavedDisk(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ScalingScheduleStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ScalingScheduleStatus.java index ca4e107aa2a0..8a37f2d0070f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ScalingScheduleStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ScalingScheduleStatus.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ScalingScheduleStatus( - 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 276360858: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - lastStartTime_ = s; - break; - } - case 778160818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - nextStartTime_ = s; - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - state_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ScalingScheduleStatus_descriptor; @@ -551,7 +490,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 109757585, state_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -569,7 +508,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(109757585, state_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -597,7 +536,7 @@ public boolean equals(final java.lang.Object obj) { if (hasState()) { if (!getState().equals(other.getState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -620,7 +559,7 @@ public int hashCode() { hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + getState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -748,17 +687,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ScalingScheduleStatus.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 @@ -877,7 +809,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ScalingScheduleStatus other state_ = other.state_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -892,18 +824,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ScalingScheduleStatus 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 276360858: + { + lastStartTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 276360858 + case 778160818: + { + nextStartTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 778160818 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 878060682 + 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.compute.v1.ScalingScheduleStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1307,7 +1270,18 @@ public ScalingScheduleStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ScalingScheduleStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Scheduling.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Scheduling.java index 6a0795c4a3b7..d9d334817d10 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Scheduling.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Scheduling.java @@ -56,108 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Scheduling( - 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 3955386: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - provisioningModel_ = s; - break; - } - case 516934370: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - onHostMaintenance_ = s; - break; - } - case 859045338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - instanceTerminationAction_ = s; - break; - } - case -1757113896: - { - bitField0_ |= 0x00000008; - minNodeCpus_ = input.readInt32(); - break; - } - case -1701341944: - { - bitField0_ |= 0x00000020; - preemptible_ = input.readBool(); - break; - } - case -1490811254: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - locationHint_ = s; - break; - } - case -1488396328: - { - bitField0_ |= 0x00000001; - automaticRestart_ = input.readBool(); - break; - } - case -600567526: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - nodeAffinities_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - nodeAffinities_.add( - input.readMessage( - com.google.cloud.compute.v1.SchedulingNodeAffinity.parser(), - extensionRegistry)); - 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_ & 0x00000010) != 0)) { - nodeAffinities_ = java.util.Collections.unmodifiableList(nodeAffinities_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Scheduling_descriptor; @@ -1155,7 +1053,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < nodeAffinities_.size(); i++) { output.writeMessage(461799971, nodeAffinities_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1193,7 +1091,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 461799971, nodeAffinities_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1238,7 +1136,7 @@ public boolean equals(final java.lang.Object obj) { if (hasProvisioningModel()) { if (!getProvisioningModel().equals(other.getProvisioningModel())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1281,7 +1179,7 @@ public int hashCode() { hash = (37 * hash) + PROVISIONING_MODEL_FIELD_NUMBER; hash = (53 * hash) + getProvisioningModel().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1410,19 +1308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Scheduling.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) { - getNodeAffinitiesFieldBuilder(); - } } @java.lang.Override @@ -1438,10 +1327,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000008); if (nodeAffinitiesBuilder_ == null) { nodeAffinities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + nodeAffinities_ = null; nodeAffinitiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); onHostMaintenance_ = ""; bitField0_ = (bitField0_ & ~0x00000020); preemptible_ = false; @@ -1620,7 +1510,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Scheduling other) { provisioningModel_ = other.provisioningModel_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1635,17 +1525,87 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Scheduling 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 3955386: + { + provisioningModel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 3955386 + case 516934370: + { + onHostMaintenance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 516934370 + case 859045338: + { + instanceTerminationAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 859045338 + case -1757113896: + { + minNodeCpus_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case -1757113896 + case -1701341944: + { + preemptible_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case -1701341944 + case -1490811254: + { + locationHint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1490811254 + case -1488396328: + { + automaticRestart_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1488396328 + case -600567526: + { + com.google.cloud.compute.v1.SchedulingNodeAffinity m = + input.readMessage( + com.google.cloud.compute.v1.SchedulingNodeAffinity.parser(), + extensionRegistry); + if (nodeAffinitiesBuilder_ == null) { + ensureNodeAffinitiesIsMutable(); + nodeAffinities_.add(m); + } else { + nodeAffinitiesBuilder_.addMessage(m); + } + break; + } // case -600567526 + 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.compute.v1.Scheduling) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2762,7 +2722,18 @@ public Scheduling parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Scheduling(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SchedulingNodeAffinity.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SchedulingNodeAffinity.java index e65afebaa3f0..79ab75f2cdd7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SchedulingNodeAffinity.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SchedulingNodeAffinity.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SchedulingNodeAffinity( - 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 848634: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - key_ = s; - break; - } - case 290538786: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - operator_ = s; - break; - } - case 1999431954: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - values_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - 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_ & 0x00000004) != 0)) { - values_ = values_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SchedulingNodeAffinity_descriptor; @@ -517,7 +450,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, 249928994, values_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -540,7 +473,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getValuesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -565,7 +498,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOperator().equals(other.getOperator())) return false; } if (!getValuesList().equals(other.getValuesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +521,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; } @@ -717,17 +650,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SchedulingNodeAffinity.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 @@ -852,7 +778,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SchedulingNodeAffinity othe } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -867,18 +793,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SchedulingNodeAffinity 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 848634: + { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 848634 + case 290538786: + { + operator_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 290538786 + case 1999431954: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureValuesIsMutable(); + values_.add(s); + break; + } // case 1999431954 + 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.compute.v1.SchedulingNodeAffinity) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1330,7 +1288,18 @@ public SchedulingNodeAffinity parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SchedulingNodeAffinity(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ScratchDisks.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ScratchDisks.java index e7881387320c..9f7e3feee269 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ScratchDisks.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ScratchDisks.java @@ -49,52 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ScratchDisks( - 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 487921128: - { - bitField0_ |= 0x00000001; - diskGb_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ScratchDisks_descriptor; @@ -161,7 +115,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(60990141, diskGb_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -173,7 +127,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(60990141, diskGb_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -192,7 +146,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDiskGb()) { if (getDiskGb() != other.getDiskGb()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -207,7 +161,7 @@ public int hashCode() { hash = (37 * hash) + DISK_GB_FIELD_NUMBER; hash = (53 * hash) + getDiskGb(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -335,17 +289,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ScratchDisks.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 @@ -439,7 +386,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ScratchDisks other) { if (other.hasDiskGb()) { setDiskGb(other.getDiskGb()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -454,17 +401,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ScratchDisks 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 487921128: + { + diskGb_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 487921128 + 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.compute.v1.ScratchDisks) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -569,7 +536,18 @@ public ScratchDisks parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ScratchDisks(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Screenshot.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Screenshot.java index 748cbb045a31..afedf454c0e1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Screenshot.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Screenshot.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Screenshot( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case -243607342: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - contents_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Screenshot_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 506419994, contents_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(506419994, contents_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (hasKind()) { if (!getKind().equals(other.getKind())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + KIND_FIELD_NUMBER; hash = (53 * hash) + getKind().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -457,17 +403,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Screenshot.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 @@ -574,7 +513,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Screenshot other) { kind_ = other.kind_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -589,17 +528,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Screenshot 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26336418 + case -243607342: + { + contents_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -243607342 + 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.compute.v1.Screenshot) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -877,7 +842,18 @@ public Screenshot parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Screenshot(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesAggregatedList.java index a127e8916780..072ba82812a9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesAggregatedList.java @@ -57,126 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPoliciesAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - id_ = s; - break; - } - case 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.SecurityPoliciesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - selfLink_ = 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_ & 0x00000040) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPoliciesAggregatedList_descriptor; @@ -768,7 +648,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -816,7 +696,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -858,7 +738,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -901,7 +781,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1241,7 +1121,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPoliciesAggregatedL if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1256,18 +1136,85 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPoliciesAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26842 + case 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24987818 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.SecurityPoliciesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -645248918 + 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.compute.v1.SecurityPoliciesAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2409,7 +2356,18 @@ public SecurityPoliciesAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPoliciesAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesListPreconfiguredExpressionSetsResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesListPreconfiguredExpressionSetsResponse.java index 66f716eb1fa0..8a20b375ad76 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesListPreconfiguredExpressionSetsResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesListPreconfiguredExpressionSetsResponse.java @@ -52,63 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPoliciesListPreconfiguredExpressionSetsResponse( - 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 -5360686: - { - com.google.cloud.compute.v1.SecurityPoliciesWafConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = preconfiguredExpressionSets_.toBuilder(); - } - preconfiguredExpressionSets_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPoliciesWafConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(preconfiguredExpressionSets_); - preconfiguredExpressionSets_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPoliciesListPreconfiguredExpressionSetsResponse_descriptor; @@ -183,7 +126,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(536200826, getPreconfiguredExpressionSets()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +140,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 536200826, getPreconfiguredExpressionSets()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -220,7 +163,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPreconfiguredExpressionSets().equals(other.getPreconfiguredExpressionSets())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -235,7 +178,7 @@ public int hashCode() { hash = (37 * hash) + PRECONFIGURED_EXPRESSION_SETS_FIELD_NUMBER; hash = (53 * hash) + getPreconfiguredExpressionSets().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -502,7 +445,7 @@ public Builder mergeFrom( if (other.hasPreconfiguredExpressionSets()) { mergePreconfiguredExpressionSets(other.getPreconfiguredExpressionSets()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -517,20 +460,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPoliciesListPreconfiguredExpressionSetsResponse - 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 -5360686: + { + input.readMessage( + getPreconfiguredExpressionSetsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -5360686 + 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.compute.v1.SecurityPoliciesListPreconfiguredExpressionSetsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -732,8 +693,19 @@ public SecurityPoliciesListPreconfiguredExpressionSetsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPoliciesListPreconfiguredExpressionSetsResponse( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesScopedList.java index 535771a77a57..8f10da29ac09 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPoliciesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1022270330: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - securityPolicies_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - securityPolicies_.add( - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicy.parser(), extensionRegistry)); - 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)) { - securityPolicies_ = java.util.Collections.unmodifiableList(securityPolicies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPoliciesScopedList_descriptor; @@ -274,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < securityPolicies_.size(); i++) { output.writeMessage(127783791, securityPolicies_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +220,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 127783791, securityPolicies_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,10 +410,11 @@ public Builder clear() { super.clear(); if (securityPoliciesBuilder_ == null) { securityPolicies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + securityPolicies_ = null; securityPoliciesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -618,7 +548,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPoliciesScopedList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,18 +563,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPoliciesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 1022270330: + { + com.google.cloud.compute.v1.SecurityPolicy m = + input.readMessage( + com.google.cloud.compute.v1.SecurityPolicy.parser(), extensionRegistry); + if (securityPoliciesBuilder_ == null) { + ensureSecurityPoliciesIsMutable(); + securityPolicies_.add(m); + } else { + securityPoliciesBuilder_.addMessage(m); + } + break; + } // case 1022270330 + 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.compute.v1.SecurityPoliciesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1189,18 @@ public SecurityPoliciesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPoliciesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesWafConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesWafConfig.java index 699b4576be21..5e65ac7e3ef5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesWafConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPoliciesWafConfig.java @@ -49,62 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPoliciesWafConfig( - 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 599199394: - { - com.google.cloud.compute.v1.PreconfiguredWafSet.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = wafRules_.toBuilder(); - } - wafRules_ = - input.readMessage( - com.google.cloud.compute.v1.PreconfiguredWafSet.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(wafRules_); - wafRules_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPoliciesWafConfig_descriptor; @@ -168,7 +112,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(74899924, getWafRules()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -180,7 +124,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(74899924, getWafRules()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -200,7 +144,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWafRules()) { if (!getWafRules().equals(other.getWafRules())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -215,7 +159,7 @@ public int hashCode() { hash = (37 * hash) + WAF_RULES_FIELD_NUMBER; hash = (53 * hash) + getWafRules().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPoliciesWafConfig o if (other.hasWafRules()) { mergeWafRules(other.getWafRules()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPoliciesWafConfig 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 599199394: + { + input.readMessage(getWafRulesFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 599199394 + 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.compute.v1.SecurityPoliciesWafConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -642,7 +605,18 @@ public SecurityPoliciesWafConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPoliciesWafConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicy.java index 6b566626aea2..eb6aea55c8b3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicy.java @@ -60,194 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicy( - 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 26840: - { - bitField0_ |= 0x00000040; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - name_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - type_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - creationTimestamp_ = s; - break; - } - case 402526826: - { - com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.Builder subBuilder = - null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = ddosProtectionConfig_.toBuilder(); - } - ddosProtectionConfig_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(ddosProtectionConfig_); - ddosProtectionConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 870991802: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - rules_.add( - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRule.parser(), extensionRegistry)); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - region_ = s; - break; - } - case 1201925882: - { - com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig.Builder - subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = adaptiveProtectionConfig_.toBuilder(); - } - adaptiveProtectionConfig_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(adaptiveProtectionConfig_); - adaptiveProtectionConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - fingerprint_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - description_ = s; - break; - } - case -700756478: - { - com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.Builder subBuilder = - null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = advancedOptionsConfig_.toBuilder(); - } - advancedOptionsConfig_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(advancedOptionsConfig_); - advancedOptionsConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - selfLink_ = s; - break; - } - case -142912806: - { - com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.Builder subBuilder = - null; - if (((bitField0_ & 0x00000200) != 0)) { - subBuilder = recaptchaOptionsConfig_.toBuilder(); - } - recaptchaOptionsConfig_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(recaptchaOptionsConfig_); - recaptchaOptionsConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000200; - 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_ & 0x00000800) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicy_descriptor; @@ -1228,7 +1040,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000200) != 0)) { output.writeMessage(519006811, getRecaptchaOptionsConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1288,7 +1100,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 519006811, getRecaptchaOptionsConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1357,7 +1169,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1424,7 +1236,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1615,10 +1427,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00001000); type_ = ""; @@ -1861,7 +1674,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicy other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1876,17 +1689,126 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicy 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000040; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26989658 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 28604882 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 244202930 + case 402526826: + { + input.readMessage( + getDdosProtectionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 402526826 + case 870991802: + { + com.google.cloud.compute.v1.SecurityPolicyRule m = + input.readMessage( + com.google.cloud.compute.v1.SecurityPolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 870991802 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1111570338 + case 1201925882: + { + input.readMessage( + getAdaptiveProtectionConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1201925882 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1877428002 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -911466526 + case -700756478: + { + input.readMessage( + getAdvancedOptionsConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -700756478 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case -645248918 + case -142912806: + { + input.readMessage( + getRecaptchaOptionsConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000200; + break; + } // case -142912806 + 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.compute.v1.SecurityPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3948,7 +3870,18 @@ public SecurityPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdaptiveProtectionConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdaptiveProtectionConfig.java index 0a751294e58b..d73b50d9204c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdaptiveProtectionConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdaptiveProtectionConfig.java @@ -52,66 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyAdaptiveProtectionConfig( - 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 -796433126: - { - com.google.cloud.compute.v1 - .SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig.Builder - subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = layer7DdosDefenseConfig_.toBuilder(); - } - layer7DdosDefenseConfig_ = - input.readMessage( - com.google.cloud.compute.v1 - .SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(layer7DdosDefenseConfig_); - layer7DdosDefenseConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyAdaptiveProtectionConfig_descriptor; @@ -207,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(437316771, getLayer7DdosDefenseConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -221,7 +161,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 437316771, getLayer7DdosDefenseConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -241,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLayer7DdosDefenseConfig()) { if (!getLayer7DdosDefenseConfig().equals(other.getLayer7DdosDefenseConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -256,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + LAYER7_DDOS_DEFENSE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getLayer7DdosDefenseConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,7 +448,7 @@ public Builder mergeFrom( if (other.hasLayer7DdosDefenseConfig()) { mergeLayer7DdosDefenseConfig(other.getLayer7DdosDefenseConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -523,19 +463,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig 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 -796433126: + { + input.readMessage( + getLayer7DdosDefenseConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -796433126 + 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.compute.v1.SecurityPolicyAdaptiveProtectionConfig) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -809,7 +768,18 @@ public SecurityPolicyAdaptiveProtectionConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyAdaptiveProtectionConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig.java index 49ade6a583cc..a7daae4f9a89 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig( - 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 -1800852456: - { - bitField0_ |= 0x00000001; - enable_ = input.readBool(); - break; - } - case -668900950: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - ruleVisibility_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig_descriptor; @@ -375,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 453258293, ruleVisibility_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -390,7 +337,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(453258293, ruleVisibility_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -420,7 +367,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRuleVisibility()) { if (!getRuleVisibility().equals(other.getRuleVisibility())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -439,7 +386,7 @@ public int hashCode() { hash = (37 * hash) + RULE_VISIBILITY_FIELD_NUMBER; hash = (53 * hash) + getRuleVisibility().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -593,17 +540,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig.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 @@ -726,7 +666,7 @@ public Builder mergeFrom( ruleVisibility_ = other.ruleVisibility_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -741,21 +681,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig - 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 -1800852456: + { + enable_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1800852456 + case -668900950: + { + ruleVisibility_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -668900950 + 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.compute.v1 - .SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -995,8 +957,19 @@ public SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig parsePartia com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyAdaptiveProtectionConfigLayer7DdosDefenseConfig( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdvancedOptionsConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdvancedOptionsConfig.java index 1a192d72bc54..ca8fb93d9104 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdvancedOptionsConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdvancedOptionsConfig.java @@ -54,80 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyAdvancedOptionsConfig( - 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 892560842: - { - com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigJsonCustomConfig - .Builder - subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = jsonCustomConfig_.toBuilder(); - } - jsonCustomConfig_ = - input.readMessage( - com.google.cloud.compute.v1 - .SecurityPolicyAdvancedOptionsConfigJsonCustomConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(jsonCustomConfig_); - jsonCustomConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1124660810: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - logLevel_ = s; - break; - } - case -2035019062: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - jsonParsing_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyAdvancedOptionsConfig_descriptor; @@ -614,7 +540,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 282493529, jsonParsing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -634,7 +560,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(282493529, jsonParsing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -662,7 +588,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLogLevel()) { if (!getLogLevel().equals(other.getLogLevel())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -685,7 +611,7 @@ public int hashCode() { hash = (37 * hash) + LOG_LEVEL_FIELD_NUMBER; hash = (53 * hash) + getLogLevel().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -954,7 +880,7 @@ public Builder mergeFrom( logLevel_ = other.logLevel_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -969,19 +895,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig 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 892560842: + { + input.readMessage( + getJsonCustomConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 892560842 + case 1124660810: + { + logLevel_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1124660810 + case -2035019062: + { + jsonParsing_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -2035019062 + 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.compute.v1.SecurityPolicyAdvancedOptionsConfig) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1494,7 +1451,18 @@ public SecurityPolicyAdvancedOptionsConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyAdvancedOptionsConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdvancedOptionsConfigJsonCustomConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdvancedOptionsConfigJsonCustomConfig.java index ff43de65f314..e0606d5aeed9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdvancedOptionsConfigJsonCustomConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyAdvancedOptionsConfigJsonCustomConfig.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyAdvancedOptionsConfigJsonCustomConfig( - 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 139430298: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - contentTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - contentTypes_.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)) { - contentTypes_ = contentTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyAdvancedOptionsConfigJsonCustomConfig_descriptor; @@ -200,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < contentTypes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 17428787, contentTypes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -217,7 +164,7 @@ public int getSerializedSize() { size += dataSize; size += 4 * getContentTypesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) obj; if (!getContentTypesList().equals(other.getContentTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -251,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + CONTENT_TYPES_FIELD_NUMBER; hash = (53 * hash) + getContentTypesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -389,17 +336,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigJsonCustomConfig.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 @@ -510,7 +450,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -525,20 +465,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigJsonCustomConfig - 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 139430298: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureContentTypesIsMutable(); + contentTypes_.add(s); + break; + } // case 139430298 + 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.compute.v1.SecurityPolicyAdvancedOptionsConfigJsonCustomConfig) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -751,8 +709,19 @@ public SecurityPolicyAdvancedOptionsConfigJsonCustomConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyAdvancedOptionsConfigJsonCustomConfig( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyDdosProtectionConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyDdosProtectionConfig.java index dd6da56637b0..8a8d548db738 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyDdosProtectionConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyDdosProtectionConfig.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyDdosProtectionConfig( - 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 -2093581150: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - ddosProtection_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyDdosProtectionConfig_descriptor; @@ -325,7 +278,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 275173268, ddosProtection_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -337,7 +290,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(275173268, ddosProtection_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -357,7 +310,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDdosProtection()) { if (!getDdosProtection().equals(other.getDdosProtection())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -372,7 +325,7 @@ public int hashCode() { hash = (37 * hash) + DDOS_PROTECTION_FIELD_NUMBER; hash = (53 * hash) + getDdosProtection().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -501,17 +454,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.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 @@ -610,7 +556,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicyDdosProtectio ddosProtection_ = other.ddosProtection_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -625,19 +571,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig 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 -2093581150: + { + ddosProtection_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -2093581150 + 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.compute.v1.SecurityPolicyDdosProtectionConfig) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -803,7 +767,18 @@ public SecurityPolicyDdosProtectionConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyDdosProtectionConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyList.java index a5ca06af511c..0819a637e689 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyList.java @@ -54,97 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicy.parser(), extensionRegistry)); - 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyList_descriptor; @@ -497,7 +406,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < items_.size(); i++) { output.writeMessage(100526016, items_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -521,7 +430,7 @@ public int getSerializedSize() { for (int i = 0; i < items_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(100526016, items_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -554,7 +463,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -585,7 +494,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -736,10 +645,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -903,7 +813,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicyList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -918,17 +828,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.SecurityPolicy m = + input.readMessage( + com.google.cloud.compute.v1.SecurityPolicy.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + 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.compute.v1.SecurityPolicyList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1861,7 +1822,18 @@ public SecurityPolicyList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRecaptchaOptionsConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRecaptchaOptionsConfig.java index 6b0fa3ed2002..cf2586035587 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRecaptchaOptionsConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRecaptchaOptionsConfig.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyRecaptchaOptionsConfig( - 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 -713551022: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - redirectSiteKey_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyRecaptchaOptionsConfig_descriptor; @@ -197,7 +150,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 447677034, redirectSiteKey_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -209,7 +162,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(447677034, redirectSiteKey_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -229,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRedirectSiteKey()) { if (!getRedirectSiteKey().equals(other.getRedirectSiteKey())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -244,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + REDIRECT_SITE_KEY_FIELD_NUMBER; hash = (53 * hash) + getRedirectSiteKey().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -373,17 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.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 @@ -483,7 +429,7 @@ public Builder mergeFrom( redirectSiteKey_ = other.redirectSiteKey_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -498,19 +444,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig 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 -713551022: + { + redirectSiteKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -713551022 + 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.compute.v1.SecurityPolicyRecaptchaOptionsConfig) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -670,7 +634,18 @@ public SecurityPolicyRecaptchaOptionsConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyRecaptchaOptionsConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyReference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyReference.java index 662fdbdc6e32..1c57e11fefcb 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyReference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyReference.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyReference( - 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 1368660106: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - securityPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyReference_descriptor; @@ -177,7 +130,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 171082513, securityPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -189,7 +142,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(171082513, securityPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -209,7 +162,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSecurityPolicy()) { if (!getSecurityPolicy().equals(other.getSecurityPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -224,7 +177,7 @@ public int hashCode() { hash = (37 * hash) + SECURITY_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -352,17 +305,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SecurityPolicyReference.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 @@ -459,7 +405,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicyReference oth securityPolicy_ = other.securityPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,18 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyReference 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 1368660106: + { + securityPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1368660106 + 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.compute.v1.SecurityPolicyReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -607,7 +572,18 @@ public SecurityPolicyReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyReference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRule.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRule.java index e0a6efa03d6e..ec1d7c2558c5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRule.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRule.java @@ -54,150 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyRule( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - kind_ = s; - break; - } - case 540354522: - { - com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions.Builder subBuilder = - null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = rateLimitOptions_.toBuilder(); - } - rateLimitOptions_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rateLimitOptions_); - rateLimitOptions_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case 829345322: - { - com.google.cloud.compute.v1.SecurityPolicyRuleMatcher.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = match_.toBuilder(); - } - match_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRuleMatcher.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(match_); - match_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 1306282458: - { - com.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions.Builder subBuilder = - null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = redirectOptions_.toBuilder(); - } - redirectOptions_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(redirectOptions_); - redirectOptions_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case 1501295026: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - action_ = s; - break; - } - case 1749491264: - { - bitField0_ |= 0x00000020; - preview_ = input.readBool(); - break; - } - case -1670348478: - { - com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction.Builder subBuilder = - null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = headerAction_.toBuilder(); - } - headerAction_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(headerAction_); - headerAction_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -733754080: - { - bitField0_ |= 0x00000040; - priority_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyRule_descriptor; @@ -734,7 +590,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { output.writeInt32(445151652, priority_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -773,7 +629,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(445151652, priority_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -825,7 +681,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRedirectOptions()) { if (!getRedirectOptions().equals(other.getRedirectOptions())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -872,7 +728,7 @@ public int hashCode() { hash = (37 * hash) + REDIRECT_OPTIONS_FIELD_NUMBER; hash = (53 * hash) + getRedirectOptions().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1220,7 +1076,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicyRule other) { if (other.hasRedirectOptions()) { mergeRedirectOptions(other.getRedirectOptions()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1235,17 +1091,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyRule 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 540354522: + { + input.readMessage( + getRateLimitOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 540354522 + case 829345322: + { + input.readMessage(getMatchFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 829345322 + case 1306282458: + { + input.readMessage(getRedirectOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 1306282458 + case 1501295026: + { + action_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1501295026 + case 1749491264: + { + preview_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 1749491264 + case -1670348478: + { + input.readMessage(getHeaderActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -1670348478 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -733754080: + { + priority_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case -733754080 + 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.compute.v1.SecurityPolicyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2601,7 +2526,18 @@ public SecurityPolicyRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyRule(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleHttpHeaderAction.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleHttpHeaderAction.java index 04bdb946b748..85bab399f3de 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleHttpHeaderAction.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleHttpHeaderAction.java @@ -52,65 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyRuleHttpHeaderAction( - 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 703901290: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requestHeadersToAdds_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .SecurityPolicyRuleHttpHeaderActionHttpHeaderOption>(); - mutable_bitField0_ |= 0x00000001; - } - requestHeadersToAdds_.add( - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderActionHttpHeaderOption - .parser(), - extensionRegistry)); - 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)) { - requestHeadersToAdds_ = java.util.Collections.unmodifiableList(requestHeadersToAdds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyRuleHttpHeaderAction_descriptor; @@ -231,7 +172,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < requestHeadersToAdds_.size(); i++) { output.writeMessage(87987661, requestHeadersToAdds_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -245,7 +186,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 87987661, requestHeadersToAdds_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -262,7 +203,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction) obj; if (!getRequestHeadersToAddsList().equals(other.getRequestHeadersToAddsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -277,7 +218,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_HEADERS_TO_ADDS_FIELD_NUMBER; hash = (53 * hash) + getRequestHeadersToAddsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -406,19 +347,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction.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) { - getRequestHeadersToAddsFieldBuilder(); - } } @java.lang.Override @@ -426,10 +358,11 @@ public Builder clear() { super.clear(); if (requestHeadersToAddsBuilder_ == null) { requestHeadersToAdds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + requestHeadersToAdds_ = null; requestHeadersToAddsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -546,7 +479,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeade } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -561,19 +494,46 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction 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 703901290: + { + com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderActionHttpHeaderOption m = + input.readMessage( + com.google.cloud.compute.v1 + .SecurityPolicyRuleHttpHeaderActionHttpHeaderOption.parser(), + extensionRegistry); + if (requestHeadersToAddsBuilder_ == null) { + ensureRequestHeadersToAddsIsMutable(); + requestHeadersToAdds_.add(m); + } else { + requestHeadersToAddsBuilder_.addMessage(m); + } + break; + } // case 703901290 + 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.compute.v1.SecurityPolicyRuleHttpHeaderAction) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1037,7 +997,18 @@ public SecurityPolicyRuleHttpHeaderAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyRuleHttpHeaderAction(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleHttpHeaderActionHttpHeaderOption.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleHttpHeaderActionHttpHeaderOption.java index 9933ee703cdb..a5edc3594523 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleHttpHeaderActionHttpHeaderOption.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleHttpHeaderActionHttpHeaderOption.java @@ -54,60 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyRuleHttpHeaderActionHttpHeaderOption( - 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 881788906: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - headerName_ = s; - break; - } - case 1624754682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - headerValue_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyRuleHttpHeaderActionHttpHeaderOption_descriptor; @@ -273,7 +219,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 203094335, headerValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +234,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(203094335, headerValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -314,7 +260,7 @@ public boolean equals(final java.lang.Object obj) { if (hasHeaderValue()) { if (!getHeaderValue().equals(other.getHeaderValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -333,7 +279,7 @@ public int hashCode() { hash = (37 * hash) + HEADER_VALUE_FIELD_NUMBER; hash = (53 * hash) + getHeaderValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -471,17 +417,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderActionHttpHeaderOption.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 @@ -598,7 +537,7 @@ public Builder mergeFrom( headerValue_ = other.headerValue_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -613,20 +552,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderActionHttpHeaderOption 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 881788906: + { + headerName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 881788906 + case 1624754682: + { + headerValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1624754682 + 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.compute.v1.SecurityPolicyRuleHttpHeaderActionHttpHeaderOption) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -911,8 +873,19 @@ public SecurityPolicyRuleHttpHeaderActionHttpHeaderOption parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyRuleHttpHeaderActionHttpHeaderOption( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleMatcher.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleMatcher.java index 836b5bded5d1..13d55bfdf99e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleMatcher.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleMatcher.java @@ -52,85 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyRuleMatcher( - 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 25022378: - { - com.google.cloud.compute.v1.Expr.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = expr_.toBuilder(); - } - expr_ = - input.readMessage(com.google.cloud.compute.v1.Expr.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(expr_); - expr_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case 2046564882: - { - com.google.cloud.compute.v1.SecurityPolicyRuleMatcherConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = config_.toBuilder(); - } - config_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRuleMatcherConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1716679190: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - versionedExpr_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyRuleMatcher_descriptor; @@ -473,7 +394,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 322286013, versionedExpr_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -491,7 +412,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(322286013, versionedExpr_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -519,7 +440,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVersionedExpr()) { if (!getVersionedExpr().equals(other.getVersionedExpr())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -542,7 +463,7 @@ public int hashCode() { hash = (37 * hash) + VERSIONED_EXPR_FIELD_NUMBER; hash = (53 * hash) + getVersionedExpr().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -816,7 +737,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicyRuleMatcher o versionedExpr_ = other.versionedExpr_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -831,18 +752,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyRuleMatcher 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 25022378: + { + input.readMessage(getExprFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 25022378 + case 2046564882: + { + input.readMessage(getConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 2046564882 + case -1716679190: + { + versionedExpr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1716679190 + 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.compute.v1.SecurityPolicyRuleMatcher) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1385,7 +1337,18 @@ public SecurityPolicyRuleMatcher parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyRuleMatcher(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleMatcherConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleMatcherConfig.java index 5865a2bc1aed..de5098abed52 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleMatcherConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleMatcherConfig.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyRuleMatcherConfig( - 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 -837942630: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - srcIpRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - srcIpRanges_.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)) { - srcIpRanges_ = srcIpRanges_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyRuleMatcherConfig_descriptor; @@ -198,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < srcIpRanges_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 432128083, srcIpRanges_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -215,7 +162,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getSrcIpRangesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -232,7 +179,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.SecurityPolicyRuleMatcherConfig) obj; if (!getSrcIpRangesList().equals(other.getSrcIpRangesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -247,7 +194,7 @@ public int hashCode() { hash = (37 * hash) + SRC_IP_RANGES_FIELD_NUMBER; hash = (53 * hash) + getSrcIpRangesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -376,17 +323,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SecurityPolicyRuleMatcherConfig.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 @@ -487,7 +427,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicyRuleMatcherCo } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -502,18 +442,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyRuleMatcherConfig 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 -837942630: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSrcIpRangesIsMutable(); + srcIpRanges_.add(s); + break; + } // case -837942630 + 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.compute.v1.SecurityPolicyRuleMatcherConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -719,7 +679,18 @@ public SecurityPolicyRuleMatcherConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyRuleMatcherConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRateLimitOptions.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRateLimitOptions.java index 46239b5b4d4a..22896e0ab360 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRateLimitOptions.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRateLimitOptions.java @@ -55,136 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyRuleRateLimitOptions( - 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 343173808: - { - bitField0_ |= 0x00000001; - banDurationSec_ = input.readInt32(); - break; - } - case 1060441970: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - enforceOnKeyName_ = s; - break; - } - case 1337272586: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - exceedAction_ = s; - break; - } - case -1767965630: - { - com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold.Builder - subBuilder = null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = rateLimitThreshold_.toBuilder(); - } - rateLimitThreshold_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rateLimitThreshold_); - rateLimitThreshold_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case -961775646: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - enforceOnKey_ = s; - break; - } - case -505793742: - { - com.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions.Builder subBuilder = - null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = exceedRedirectOptions_.toBuilder(); - } - exceedRedirectOptions_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(exceedRedirectOptions_); - exceedRedirectOptions_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case -285302310: - { - com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold.Builder - subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = banThreshold_.toBuilder(); - } - banThreshold_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(banThreshold_); - banThreshold_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -154068358: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - conformAction_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyRuleRateLimitOptions_descriptor; @@ -853,7 +723,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517612367, conformAction_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -892,7 +762,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517612367, conformAction_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -940,7 +810,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRateLimitThreshold()) { if (!getRateLimitThreshold().equals(other.getRateLimitThreshold())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -983,7 +853,7 @@ public int hashCode() { hash = (37 * hash) + RATE_LIMIT_THRESHOLD_FIELD_NUMBER; hash = (53 * hash) + getRateLimitThreshold().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1318,7 +1188,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicyRuleRateLimit if (other.hasRateLimitThreshold()) { mergeRateLimitThreshold(other.getRateLimitThreshold()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1333,19 +1203,81 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions 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 343173808: + { + banDurationSec_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 343173808 + case 1060441970: + { + enforceOnKeyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1060441970 + case 1337272586: + { + exceedAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1337272586 + case -1767965630: + { + input.readMessage( + getRateLimitThresholdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case -1767965630 + case -961775646: + { + enforceOnKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -961775646 + case -505793742: + { + input.readMessage( + getExceedRedirectOptionsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case -505793742 + case -285302310: + { + input.readMessage(getBanThresholdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -285302310 + case -154068358: + { + conformAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -154068358 + 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.compute.v1.SecurityPolicyRuleRateLimitOptions) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2584,7 +2516,18 @@ public SecurityPolicyRuleRateLimitOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyRuleRateLimitOptions(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRateLimitOptionsThreshold.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRateLimitOptionsThreshold.java index b18e7dcb153e..702fa565f556 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRateLimitOptionsThreshold.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRateLimitOptionsThreshold.java @@ -51,58 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyRuleRateLimitOptionsThreshold( - 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 328675000: - { - bitField0_ |= 0x00000002; - intervalSec_ = input.readInt32(); - break; - } - case 758810744: - { - bitField0_ |= 0x00000001; - count_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyRuleRateLimitOptionsThreshold_descriptor; @@ -205,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeInt32(94851343, count_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -220,7 +168,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(94851343, count_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -244,7 +192,7 @@ public boolean equals(final java.lang.Object obj) { if (hasIntervalSec()) { if (getIntervalSec() != other.getIntervalSec()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -263,7 +211,7 @@ public int hashCode() { hash = (37 * hash) + INTERVAL_SEC_FIELD_NUMBER; hash = (53 * hash) + getIntervalSec(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -395,17 +343,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold.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 @@ -516,7 +457,7 @@ public Builder mergeFrom( if (other.hasIntervalSec()) { setIntervalSec(other.getIntervalSec()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -531,19 +472,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold 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 328675000: + { + intervalSec_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 328675000 + case 758810744: + { + count_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 758810744 + 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.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -719,7 +684,19 @@ public SecurityPolicyRuleRateLimitOptionsThreshold parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyRuleRateLimitOptionsThreshold(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRedirectOptions.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRedirectOptions.java index 7d4da9c96459..69a64ae8134d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRedirectOptions.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecurityPolicyRuleRedirectOptions.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecurityPolicyRuleRedirectOptions( - 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 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - type_ = s; - break; - } - case 1542687882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - target_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecurityPolicyRuleRedirectOptions_descriptor; @@ -401,7 +347,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 192835985, target_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +362,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(192835985, target_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -440,7 +386,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -459,7 +405,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -588,17 +534,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions.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 @@ -708,7 +647,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicyRuleRedirectO type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -723,19 +662,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions 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 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 28604882 + case 1542687882: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1542687882 + 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.compute.v1.SecurityPolicyRuleRedirectOptions) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1020,7 +983,18 @@ public SecurityPolicyRuleRedirectOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecurityPolicyRuleRedirectOptions(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecuritySettings.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecuritySettings.java index f02e0019417a..ec41a95f8a38 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecuritySettings.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SecuritySettings.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SecuritySettings( - 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 -1654731014: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - subjectAltNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - subjectAltNames_.add(s); - break; - } - case -596365486: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - clientTlsPolicy_ = 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_ & 0x00000002) != 0)) { - subjectAltNames_ = subjectAltNames_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SecuritySettings_descriptor; @@ -275,7 +215,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 462325226, clientTlsPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -295,7 +235,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(462325226, clientTlsPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -316,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (!getClientTlsPolicy().equals(other.getClientTlsPolicy())) return false; } if (!getSubjectAltNamesList().equals(other.getSubjectAltNamesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -335,7 +275,7 @@ public int hashCode() { hash = (37 * hash) + SUBJECT_ALT_NAMES_FIELD_NUMBER; hash = (53 * hash) + getSubjectAltNamesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -464,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SecuritySettings.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 @@ -587,7 +520,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SecuritySettings other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -602,17 +535,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SecuritySettings 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 -1654731014: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSubjectAltNamesIsMutable(); + subjectAltNames_.add(s); + break; + } // case -1654731014 + case -596365486: + { + clientTlsPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -596365486 + 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.compute.v1.SecuritySettings) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -938,7 +898,18 @@ public SecuritySettings parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SecuritySettings(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SendDiagnosticInterruptInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SendDiagnosticInterruptInstanceRequest.java index 77166ce14029..b68707746c03 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SendDiagnosticInterruptInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SendDiagnosticInterruptInstanceRequest.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SendDiagnosticInterruptInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SendDiagnosticInterruptInstanceRequest_descriptor; @@ -301,7 +241,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -319,7 +259,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -338,7 +278,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstance().equals(other.getInstance())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -355,7 +295,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -487,17 +427,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceRequest.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 @@ -606,7 +539,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -621,19 +554,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SendDiagnosticInterruptInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -989,7 +952,18 @@ public SendDiagnosticInterruptInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SendDiagnosticInterruptInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SendDiagnosticInterruptInstanceResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SendDiagnosticInterruptInstanceResponse.java index c724176082d5..861c20d4a504 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SendDiagnosticInterruptInstanceResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SendDiagnosticInterruptInstanceResponse.java @@ -52,45 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SendDiagnosticInterruptInstanceResponse( - 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; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SendDiagnosticInterruptInstanceResponse_descriptor; @@ -120,7 +81,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -129,7 +90,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -145,7 +106,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceResponse other = (com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -156,7 +117,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -288,17 +249,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceResponse.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 @@ -386,7 +340,7 @@ public Builder mergeFrom( if (other == com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceResponse .getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -401,19 +355,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SendDiagnosticInterruptInstanceResponse 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; + 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.compute.v1.SendDiagnosticInterruptInstanceResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -451,7 +417,18 @@ public SendDiagnosticInterruptInstanceResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SendDiagnosticInterruptInstanceResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SerialPortOutput.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SerialPortOutput.java index 1442413d59e8..e6fabdbb1980 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SerialPortOutput.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SerialPortOutput.java @@ -54,79 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SerialPortOutput( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 27023256: - { - bitField0_ |= 0x00000004; - next_ = input.readInt64(); - break; - } - case 878060304: - { - bitField0_ |= 0x00000010; - start_ = input.readInt64(); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = s; - break; - } - case -243607342: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - contents_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SerialPortOutput_descriptor; @@ -430,7 +357,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 506419994, contents_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -454,7 +381,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(506419994, contents_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -490,7 +417,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStart()) { if (getStart() != other.getStart()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -521,7 +448,7 @@ public int hashCode() { hash = (37 * hash) + START_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStart()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -650,17 +577,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SerialPortOutput.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 @@ -796,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SerialPortOutput other) { if (other.hasStart()) { setStart(other.getStart()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -811,17 +731,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SerialPortOutput 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26336418 + case 27023256: + { + next_ = input.readInt64(); + bitField0_ |= 0x00000004; + break; + } // case 27023256 + case 878060304: + { + start_ = input.readInt64(); + bitField0_ |= 0x00000010; + break; + } // case 878060304 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -645248918 + case -243607342: + { + contents_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -243607342 + 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.compute.v1.SerialPortOutput) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1353,7 +1317,18 @@ public SerialPortOutput parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SerialPortOutput(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServerBinding.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServerBinding.java index ae4695f0dad2..5bdddc32f1ba 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServerBinding.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServerBinding.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServerBinding( - 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 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - type_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ServerBinding_descriptor; @@ -360,7 +313,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3575610, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -372,7 +325,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3575610, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -392,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -407,7 +360,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -535,17 +488,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ServerBinding.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 @@ -641,7 +587,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ServerBinding other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -656,17 +602,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ServerBinding 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 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 28604882 + 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.compute.v1.ServerBinding) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -830,7 +796,18 @@ public ServerBinding parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServerBinding(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAccount.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAccount.java index ce0a1ae41c45..b0201924734b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAccount.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAccount.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServiceAccount( - 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 772955362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - email_ = s; - break; - } - case 1327785210: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - scopes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - scopes_.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_ & 0x00000002) != 0)) { - scopes_ = scopes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ServiceAccount_descriptor; @@ -274,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < scopes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 165973151, scopes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -294,7 +234,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getScopesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -315,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEmail().equals(other.getEmail())) return false; } if (!getScopesList().equals(other.getScopesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -334,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + SCOPES_FIELD_NUMBER; hash = (53 * hash) + getScopesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -463,17 +403,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ServiceAccount.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 @@ -586,7 +519,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ServiceAccount other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -601,17 +534,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ServiceAccount 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 772955362: + { + email_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 772955362 + case 1327785210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureScopesIsMutable(); + scopes_.add(s); + break; + } // case 1327785210 + 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.compute.v1.ServiceAccount) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -937,7 +897,18 @@ public ServiceAccount parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceAccount(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachment.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachment.java index 50816be1f15d..f3147cc40d91 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachment.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachment.java @@ -66,217 +66,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServiceAttachment( - 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 26840: - { - bitField0_ |= 0x00000020; - id_ = input.readUInt64(); - break; - } - case 10350650: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - targetService_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - name_ = s; - break; - } - case 51601514: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - domainNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - domainNames_.add(s); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 577789506: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - connectedEndpoints_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint>(); - mutable_bitField0_ |= 0x00000001; - } - connectedEndpoints_.add( - input.readMessage( - com.google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint.parser(), - extensionRegistry)); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - region_ = s; - break; - } - case 1632265458: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - consumerRejectLists_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - consumerRejectLists_.add(s); - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - fingerprint_ = s; - break; - } - case 1983423114: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - producerForwardingRule_ = s; - break; - } - case -2008422686: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - connectionPreference_ = s; - break; - } - case -1384637400: - { - bitField0_ |= 0x00000008; - enableProxyProtocol_ = input.readBool(); - break; - } - case -1296679742: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - natSubnets_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00001000; - } - natSubnets_.add(s); - break; - } - case -1073161670: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - consumerAcceptLists_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit>(); - mutable_bitField0_ |= 0x00000004; - } - consumerAcceptLists_.add( - input.readMessage( - com.google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit.parser(), - extensionRegistry)); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - selfLink_ = s; - break; - } - case -73405582: - { - com.google.cloud.compute.v1.Uint128.Builder subBuilder = null; - if (((bitField0_ & 0x00000200) != 0)) { - subBuilder = pscServiceAttachmentId_.toBuilder(); - } - pscServiceAttachmentId_ = - input.readMessage( - com.google.cloud.compute.v1.Uint128.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(pscServiceAttachmentId_); - pscServiceAttachmentId_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000200; - 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_ & 0x00000040) != 0)) { - domainNames_ = domainNames_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - connectedEndpoints_ = java.util.Collections.unmodifiableList(connectedEndpoints_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - consumerRejectLists_ = consumerRejectLists_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00001000) != 0)) { - natSubnets_ = natSubnets_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - consumerAcceptLists_ = java.util.Collections.unmodifiableList(consumerAcceptLists_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ServiceAttachment_descriptor; @@ -1607,7 +1396,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000200) != 0)) { output.writeMessage(527695214, getPscServiceAttachmentId()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1697,7 +1486,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 527695214, getPscServiceAttachmentId()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1770,7 +1559,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetService()) { if (!getTargetService().equals(other.getTargetService())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1853,7 +1642,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_SERVICE_FIELD_NUMBER; hash = (53 * hash) + getTargetService().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2004,18 +1793,20 @@ public Builder clear() { super.clear(); if (connectedEndpointsBuilder_ == null) { connectedEndpoints_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + connectedEndpoints_ = null; connectedEndpointsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); connectionPreference_ = ""; bitField0_ = (bitField0_ & ~0x00000002); if (consumerAcceptListsBuilder_ == null) { consumerAcceptLists_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + consumerAcceptLists_ = null; consumerAcceptListsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); consumerRejectLists_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); creationTimestamp_ = ""; @@ -2361,7 +2152,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ServiceAttachment other) { targetService_ = other.targetService_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2376,17 +2167,159 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ServiceAttachment 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000200; + break; + } // case 26840 + case 10350650: + { + targetService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case 10350650 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 26989658 + case 51601514: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDomainNamesIsMutable(); + domainNames_.add(s); + break; + } // case 51601514 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 244202930 + case 577789506: + { + com.google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint m = + input.readMessage( + com.google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint.parser(), + extensionRegistry); + if (connectedEndpointsBuilder_ == null) { + ensureConnectedEndpointsIsMutable(); + connectedEndpoints_.add(m); + } else { + connectedEndpointsBuilder_.addMessage(m); + } + break; + } // case 577789506 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 1111570338 + case 1632265458: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureConsumerRejectListsIsMutable(); + consumerRejectLists_.add(s); + break; + } // case 1632265458 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 1877428002 + case 1983423114: + { + producerForwardingRule_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 1983423114 + case -2008422686: + { + connectionPreference_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -2008422686 + case -1384637400: + { + enableProxyProtocol_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case -1384637400 + case -1296679742: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNatSubnetsIsMutable(); + natSubnets_.add(s); + break; + } // case -1296679742 + case -1073161670: + { + com.google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit m = + input.readMessage( + com.google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit.parser(), + extensionRegistry); + if (consumerAcceptListsBuilder_ == null) { + ensureConsumerAcceptListsIsMutable(); + consumerAcceptLists_.add(m); + } else { + consumerAcceptListsBuilder_.addMessage(m); + } + break; + } // case -1073161670 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case -645248918 + case -73405582: + { + input.readMessage( + getPscServiceAttachmentIdFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00004000; + break; + } // case -73405582 + 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.compute.v1.ServiceAttachment) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5274,7 +5207,18 @@ public ServiceAttachment parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceAttachment(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentAggregatedList.java index c6e427ec05e3..7e7010569d9e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentAggregatedList.java @@ -57,119 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServiceAttachmentAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.ServiceAttachmentsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ServiceAttachmentAggregatedList_descriptor; @@ -716,7 +603,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -761,7 +648,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -799,7 +686,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -838,7 +725,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1168,7 +1055,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ServiceAttachmentAggregated if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1183,18 +1070,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ServiceAttachmentAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.ServiceAttachmentsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.ServiceAttachmentAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2253,7 +2201,18 @@ public ServiceAttachmentAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceAttachmentAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentConnectedEndpoint.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentConnectedEndpoint.java index 995d62f9f5d4..2c5bd9d24fd3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentConnectedEndpoint.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentConnectedEndpoint.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServiceAttachmentConnectedEndpoint( - 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 1043917994: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - endpoint_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - status_ = s; - break; - } - case -1958308120: - { - bitField0_ |= 0x00000002; - pscConnectionId_ = input.readUInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ServiceAttachmentConnectedEndpoint_descriptor; @@ -548,7 +488,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeUInt64(292082397, pscConnectionId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -566,7 +506,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeUInt64Size(292082397, pscConnectionId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -594,7 +534,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -617,7 +557,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -747,17 +687,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint.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 @@ -876,7 +809,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ServiceAttachmentConnectedE status_ = other.status_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -891,19 +824,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ServiceAttachmentConnectedEndpoint 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 1043917994: + { + endpoint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1043917994 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1450082194 + case -1958308120: + { + pscConnectionId_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case -1958308120 + 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.compute.v1.ServiceAttachmentConnectedEndpoint) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1256,7 +1219,18 @@ public ServiceAttachmentConnectedEndpoint parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceAttachmentConnectedEndpoint(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentConsumerProjectLimit.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentConsumerProjectLimit.java index 2def8c22638b..5bc34b0b3fff 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentConsumerProjectLimit.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentConsumerProjectLimit.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServiceAttachmentConsumerProjectLimit( - 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 1051228368: - { - bitField0_ |= 0x00000001; - connectionLimit_ = input.readUInt32(); - break; - } - case -1496700606: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - projectIdOrNum_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ServiceAttachmentConsumerProjectLimit_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 349783336, projectIdOrNum_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(349783336, projectIdOrNum_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -278,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (hasProjectIdOrNum()) { if (!getProjectIdOrNum().equals(other.getProjectIdOrNum())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -297,7 +244,7 @@ public int hashCode() { hash = (37 * hash) + PROJECT_ID_OR_NUM_FIELD_NUMBER; hash = (53 * hash) + getProjectIdOrNum().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -428,17 +375,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit.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 @@ -547,7 +487,7 @@ public Builder mergeFrom( projectIdOrNum_ = other.projectIdOrNum_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -562,19 +502,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ServiceAttachmentConsumerProjectLimit 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 1051228368: + { + connectionLimit_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 1051228368 + case -1496700606: + { + projectIdOrNum_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1496700606 + 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.compute.v1.ServiceAttachmentConsumerProjectLimit) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -801,7 +765,18 @@ public ServiceAttachmentConsumerProjectLimit parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceAttachmentConsumerProjectLimit(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentList.java index 9ec40ef676c5..0fc6f3365382 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentList.java @@ -55,104 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServiceAttachmentList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.ServiceAttachment.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ServiceAttachmentList_descriptor; @@ -572,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -822,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ServiceAttachmentList other if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,18 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ServiceAttachmentList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.ServiceAttachment m = + input.readMessage( + com.google.cloud.compute.v1.ServiceAttachment.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.ServiceAttachmentList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2080,7 +2039,18 @@ public ServiceAttachmentList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceAttachmentList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentsScopedList.java index 512b1a6c3ba2..4db0f7774b40 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAttachmentsScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServiceAttachmentsScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1837872846: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - serviceAttachments_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - serviceAttachments_.add( - input.readMessage( - com.google.cloud.compute.v1.ServiceAttachment.parser(), extensionRegistry)); - 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)) { - serviceAttachments_ = java.util.Collections.unmodifiableList(serviceAttachments_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ServiceAttachmentsScopedList_descriptor; @@ -279,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < serviceAttachments_.size(); i++) { output.writeMessage(307136806, serviceAttachments_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -296,7 +225,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 307136806, serviceAttachments_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -317,7 +246,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -336,7 +265,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -486,10 +415,11 @@ public Builder clear() { super.clear(); if (serviceAttachmentsBuilder_ == null) { serviceAttachments_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + serviceAttachments_ = null; serviceAttachmentsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -623,7 +553,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ServiceAttachmentsScopedLis if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -638,18 +568,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ServiceAttachmentsScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1837872846: + { + com.google.cloud.compute.v1.ServiceAttachment m = + input.readMessage( + com.google.cloud.compute.v1.ServiceAttachment.parser(), extensionRegistry); + if (serviceAttachmentsBuilder_ == null) { + ensureServiceAttachmentsIsMutable(); + serviceAttachments_.add(m); + } else { + serviceAttachmentsBuilder_.addMessage(m); + } + break; + } // case -1837872846 + 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.compute.v1.ServiceAttachmentsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1252,7 +1214,18 @@ public ServiceAttachmentsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServiceAttachmentsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackendServiceTargetSslProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackendServiceTargetSslProxyRequest.java index a3bf67b8b1de..2f49d246bb50 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackendServiceTargetSslProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackendServiceTargetSslProxyRequest.java @@ -56,85 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetBackendServiceTargetSslProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1112646946: - { - com.google.cloud.compute.v1.TargetSslProxiesSetBackendServiceRequest.Builder - subBuilder = null; - if (targetSslProxiesSetBackendServiceRequestResource_ != null) { - subBuilder = targetSslProxiesSetBackendServiceRequestResource_.toBuilder(); - } - targetSslProxiesSetBackendServiceRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetSslProxiesSetBackendServiceRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetSslProxiesSetBackendServiceRequestResource_); - targetSslProxiesSetBackendServiceRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1584600470: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetSslProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetBackendServiceTargetSslProxyRequest_descriptor; @@ -401,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 338795853, targetSslProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +345,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(338795853, targetSslProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTargetSslProxiesSetBackendServiceRequestResource())) return false; } if (!getTargetSslProxy().equals(other.getTargetSslProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -475,7 +396,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_SSL_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetSslProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -607,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetBackendServiceTargetSslProxyRequest.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 @@ -750,7 +664,7 @@ public Builder mergeFrom( targetSslProxy_ = other.targetSslProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -765,19 +679,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetBackendServiceTargetSslProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1112646946: + { + input.readMessage( + getTargetSslProxiesSetBackendServiceRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1112646946 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1584600470: + { + targetSslProxy_ = input.readStringRequireUtf8(); + + break; + } // case -1584600470 + 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.compute.v1.SetBackendServiceTargetSslProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1377,7 +1329,18 @@ public SetBackendServiceTargetSslProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetBackendServiceTargetSslProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackendServiceTargetTcpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackendServiceTargetTcpProxyRequest.java index c67a10de21b5..5905b423608f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackendServiceTargetTcpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackendServiceTargetTcpProxyRequest.java @@ -56,85 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetBackendServiceTargetTcpProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2105194630: - { - com.google.cloud.compute.v1.TargetTcpProxiesSetBackendServiceRequest.Builder - subBuilder = null; - if (targetTcpProxiesSetBackendServiceRequestResource_ != null) { - subBuilder = targetTcpProxiesSetBackendServiceRequestResource_.toBuilder(); - } - targetTcpProxiesSetBackendServiceRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetTcpProxiesSetBackendServiceRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetTcpProxiesSetBackendServiceRequestResource_); - targetTcpProxiesSetBackendServiceRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case -270443758: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetTcpProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetBackendServiceTargetTcpProxyRequest_descriptor; @@ -401,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 503065442, targetTcpProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +345,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(503065442, targetTcpProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTargetTcpProxiesSetBackendServiceRequestResource())) return false; } if (!getTargetTcpProxy().equals(other.getTargetTcpProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -475,7 +396,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_TCP_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetTcpProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -607,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest.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 @@ -750,7 +664,7 @@ public Builder mergeFrom( targetTcpProxy_ = other.targetTcpProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -765,19 +679,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetBackendServiceTargetTcpProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2105194630: + { + input.readMessage( + getTargetTcpProxiesSetBackendServiceRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2105194630 + case -270443758: + { + targetTcpProxy_ = input.readStringRequireUtf8(); + + break; + } // case -270443758 + 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.compute.v1.SetBackendServiceTargetTcpProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1377,7 +1329,18 @@ public SetBackendServiceTargetTcpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetBackendServiceTargetTcpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackupTargetPoolRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackupTargetPoolRequest.java index 13a30994de57..4435c81f8302 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackupTargetPoolRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetBackupTargetPoolRequest.java @@ -55,96 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetBackupTargetPoolRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 502370386: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetPool_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1701336053: - { - bitField0_ |= 0x00000001; - failoverRatio_ = input.readFloat(); - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -105193598: - { - com.google.cloud.compute.v1.TargetReference.Builder subBuilder = null; - if (targetReferenceResource_ != null) { - subBuilder = targetReferenceResource_.toBuilder(); - } - targetReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetReferenceResource_); - targetReferenceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetBackupTargetPoolRequest_descriptor; @@ -500,7 +410,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetReferenceResource_ != null) { output.writeMessage(523721712, getTargetReferenceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -529,7 +439,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 523721712, getTargetReferenceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -561,7 +471,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetReferenceResource()) { if (!getTargetReferenceResource().equals(other.getTargetReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -590,7 +500,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -720,17 +630,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetBackupTargetPoolRequest.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 @@ -871,7 +774,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetBackupTargetPoolRequest if (other.hasTargetReferenceResource()) { mergeTargetReferenceResource(other.getTargetReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -886,18 +789,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetBackupTargetPoolRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 502370386: + { + targetPool_ = input.readStringRequireUtf8(); + + break; + } // case 502370386 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1701336053: + { + failoverRatio_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 1701336053 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -105193598: + { + input.readMessage( + getTargetReferenceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -105193598 + 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.compute.v1.SetBackupTargetPoolRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1665,7 +1618,18 @@ public SetBackupTargetPoolRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetBackupTargetPoolRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCertificateMapTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCertificateMapTargetHttpsProxyRequest.java index 8b7f31d53744..ce6395975412 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCertificateMapTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCertificateMapTargetHttpsProxyRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetCertificateMapTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -553854502: - { - com.google.cloud.compute.v1.TargetHttpsProxiesSetCertificateMapRequest.Builder - subBuilder = null; - if (targetHttpsProxiesSetCertificateMapRequestResource_ != null) { - subBuilder = targetHttpsProxiesSetCertificateMapRequestResource_.toBuilder(); - } - targetHttpsProxiesSetCertificateMapRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetHttpsProxiesSetCertificateMapRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetHttpsProxiesSetCertificateMapRequestResource_); - targetHttpsProxiesSetCertificateMapRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetCertificateMapTargetHttpsProxyRequest_descriptor; @@ -403,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetHttpsProxiesSetCertificateMapRequestResource_ != null) { output.writeMessage(467639099, getTargetHttpsProxiesSetCertificateMapRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -426,7 +346,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 467639099, getTargetHttpsProxiesSetCertificateMapRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -454,7 +374,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTargetHttpsProxiesSetCertificateMapRequestResource())) return false; } if (!getTargetHttpsProxy().equals(other.getTargetHttpsProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -477,7 +397,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_HTTPS_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -609,17 +529,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetCertificateMapTargetHttpsProxyRequest.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 @@ -752,7 +665,7 @@ public Builder mergeFrom( targetHttpsProxy_ = other.targetHttpsProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -767,19 +680,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetCertificateMapTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -553854502: + { + input.readMessage( + getTargetHttpsProxiesSetCertificateMapRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -553854502 + 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.compute.v1.SetCertificateMapTargetHttpsProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1379,7 +1331,18 @@ public SetCertificateMapTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetCertificateMapTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCertificateMapTargetSslProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCertificateMapTargetSslProxyRequest.java index 5c27f952266c..d64b7a0b3f86 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCertificateMapTargetSslProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCertificateMapTargetSslProxyRequest.java @@ -56,85 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetCertificateMapTargetSslProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1584600470: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetSslProxy_ = s; - break; - } - case -1543087662: - { - com.google.cloud.compute.v1.TargetSslProxiesSetCertificateMapRequest.Builder - subBuilder = null; - if (targetSslProxiesSetCertificateMapRequestResource_ != null) { - subBuilder = targetSslProxiesSetCertificateMapRequestResource_.toBuilder(); - } - targetSslProxiesSetCertificateMapRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetSslProxiesSetCertificateMapRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetSslProxiesSetCertificateMapRequestResource_); - targetSslProxiesSetCertificateMapRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetCertificateMapTargetSslProxyRequest_descriptor; @@ -401,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetSslProxiesSetCertificateMapRequestResource_ != null) { output.writeMessage(343984954, getTargetSslProxiesSetCertificateMapRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +345,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 343984954, getTargetSslProxiesSetCertificateMapRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTargetSslProxiesSetCertificateMapRequestResource())) return false; } if (!getTargetSslProxy().equals(other.getTargetSslProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -475,7 +396,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_SSL_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetSslProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -607,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetCertificateMapTargetSslProxyRequest.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 @@ -750,7 +664,7 @@ public Builder mergeFrom( targetSslProxy_ = other.targetSslProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -765,19 +679,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetCertificateMapTargetSslProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1584600470: + { + targetSslProxy_ = input.readStringRequireUtf8(); + + break; + } // case -1584600470 + case -1543087662: + { + input.readMessage( + getTargetSslProxiesSetCertificateMapRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1543087662 + 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.compute.v1.SetCertificateMapTargetSslProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1377,7 +1329,18 @@ public SetCertificateMapTargetSslProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetCertificateMapTargetSslProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCommonInstanceMetadataProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCommonInstanceMetadataProjectRequest.java index 82cf6c139ccb..8c0427187c8d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCommonInstanceMetadataProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetCommonInstanceMetadataProjectRequest.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetCommonInstanceMetadataProjectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1966278414: - { - com.google.cloud.compute.v1.Metadata.Builder subBuilder = null; - if (metadataResource_ != null) { - subBuilder = metadataResource_.toBuilder(); - } - metadataResource_ = - input.readMessage( - com.google.cloud.compute.v1.Metadata.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metadataResource_); - metadataResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetCommonInstanceMetadataProjectRequest_descriptor; @@ -335,7 +265,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (metadataResource_ != null) { output.writeMessage(291086110, getMetadataResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -355,7 +285,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 291086110, getMetadataResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -380,7 +310,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -401,7 +331,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -533,17 +463,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest.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 @@ -666,7 +589,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -681,19 +604,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetCommonInstanceMetadataProjectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1966278414: + { + input.readMessage( + getMetadataResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1966278414 + 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.compute.v1.SetCommonInstanceMetadataProjectRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1173,7 +1127,18 @@ public SetCommonInstanceMetadataProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetCommonInstanceMetadataProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDefaultNetworkTierProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDefaultNetworkTierProjectRequest.java index 028ecc773975..4e56f6069b65 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDefaultNetworkTierProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDefaultNetworkTierProjectRequest.java @@ -55,78 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetDefaultNetworkTierProjectRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1011286098: - { - com.google.cloud.compute.v1.ProjectsSetDefaultNetworkTierRequest.Builder subBuilder = - null; - if (projectsSetDefaultNetworkTierRequestResource_ != null) { - subBuilder = projectsSetDefaultNetworkTierRequestResource_.toBuilder(); - } - projectsSetDefaultNetworkTierRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.ProjectsSetDefaultNetworkTierRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(projectsSetDefaultNetworkTierRequestResource_); - projectsSetDefaultNetworkTierRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetDefaultNetworkTierProjectRequest_descriptor; @@ -341,7 +269,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -361,7 +289,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -388,7 +316,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -409,7 +337,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -539,17 +467,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest.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 @@ -673,7 +594,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -688,19 +609,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetDefaultNetworkTierProjectRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1011286098: + { + input.readMessage( + getProjectsSetDefaultNetworkTierRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1011286098 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SetDefaultNetworkTierProjectRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1190,7 +1143,18 @@ public SetDefaultNetworkTierProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetDefaultNetworkTierProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDeletionProtectionInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDeletionProtectionInstanceRequest.java index 4d9a4f5249e7..3d5c351132ac 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDeletionProtectionInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDeletionProtectionInstanceRequest.java @@ -57,80 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetDeletionProtectionInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -630849712: - { - bitField0_ |= 0x00000001; - deletionProtection_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetDeletionProtectionInstanceRequest_descriptor; @@ -428,7 +354,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(458014698, deletionProtection_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -452,7 +378,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(458014698, deletionProtection_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -479,7 +405,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getResource().equals(other.getResource())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -504,7 +430,7 @@ public int hashCode() { hash = (53 * hash) + getResource().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -634,17 +560,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest.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 @@ -774,7 +693,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -789,19 +708,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetDeletionProtectionInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -630849712: + { + deletionProtection_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -630849712 + 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.compute.v1.SetDeletionProtectionInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1366,7 +1327,18 @@ public SetDeletionProtectionInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetDeletionProtectionInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDiskAutoDeleteInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDiskAutoDeleteInstanceRequest.java index 20abc8729ac4..0aaaf8f49e36 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDiskAutoDeleteInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetDiskAutoDeleteInstanceRequest.java @@ -57,86 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetDiskAutoDeleteInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 540333730: - { - java.lang.String s = input.readStringRequireUtf8(); - - deviceName_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -576876072: - { - autoDelete_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetDiskAutoDeleteInstanceRequest_descriptor; @@ -471,7 +391,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (autoDelete_ != false) { output.writeBool(464761403, autoDelete_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -498,7 +418,7 @@ public int getSerializedSize() { if (autoDelete_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(464761403, autoDelete_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -523,7 +443,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -548,7 +468,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -678,17 +598,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest.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 @@ -821,7 +734,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -836,18 +749,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetDiskAutoDeleteInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 540333730: + { + deviceName_ = input.readStringRequireUtf8(); + + break; + } // case 540333730 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -576876072: + { + autoDelete_ = input.readBool(); + + break; + } // case -576876072 + 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.compute.v1.SetDiskAutoDeleteInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1502,7 +1464,18 @@ public SetDiskAutoDeleteInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetDiskAutoDeleteInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetEdgeSecurityPolicyBackendBucketRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetEdgeSecurityPolicyBackendBucketRequest.java index dbd3b1a9a355..21707ef50709 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetEdgeSecurityPolicyBackendBucketRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetEdgeSecurityPolicyBackendBucketRequest.java @@ -56,84 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetEdgeSecurityPolicyBackendBucketRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 733712298: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendBucket_ = s; - break; - } - case 1633080194: - { - com.google.cloud.compute.v1.SecurityPolicyReference.Builder subBuilder = null; - if (securityPolicyReferenceResource_ != null) { - subBuilder = securityPolicyReferenceResource_.toBuilder(); - } - securityPolicyReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityPolicyReferenceResource_); - securityPolicyReferenceResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetEdgeSecurityPolicyBackendBucketRequest_descriptor; @@ -397,7 +319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +342,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -448,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSecurityPolicyReferenceResource().equals(other.getSecurityPolicyReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -471,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + SECURITY_POLICY_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicyReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -603,17 +525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendBucketRequest.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 @@ -743,7 +658,7 @@ public Builder mergeFrom( if (other.hasSecurityPolicyReferenceResource()) { mergeSecurityPolicyReferenceResource(other.getSecurityPolicyReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -758,19 +673,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendBucketRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 733712298: + { + backendBucket_ = input.readStringRequireUtf8(); + + break; + } // case 733712298 + case 1633080194: + { + input.readMessage( + getSecurityPolicyReferenceResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1633080194 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SetEdgeSecurityPolicyBackendBucketRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1364,7 +1317,19 @@ public SetEdgeSecurityPolicyBackendBucketRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetEdgeSecurityPolicyBackendBucketRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetEdgeSecurityPolicyBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetEdgeSecurityPolicyBackendServiceRequest.java index ee3d24bb2f75..26797b0818a7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetEdgeSecurityPolicyBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetEdgeSecurityPolicyBackendServiceRequest.java @@ -56,84 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetEdgeSecurityPolicyBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1633080194: - { - com.google.cloud.compute.v1.SecurityPolicyReference.Builder subBuilder = null; - if (securityPolicyReferenceResource_ != null) { - subBuilder = securityPolicyReferenceResource_.toBuilder(); - } - securityPolicyReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityPolicyReferenceResource_); - securityPolicyReferenceResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetEdgeSecurityPolicyBackendServiceRequest_descriptor; @@ -397,7 +319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +342,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -448,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSecurityPolicyReferenceResource().equals(other.getSecurityPolicyReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -471,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + SECURITY_POLICY_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicyReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -603,17 +525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendServiceRequest.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 @@ -744,7 +659,7 @@ public Builder mergeFrom( if (other.hasSecurityPolicyReferenceResource()) { mergeSecurityPolicyReferenceResource(other.getSecurityPolicyReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -759,19 +674,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetEdgeSecurityPolicyBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1633080194: + { + input.readMessage( + getSecurityPolicyReferenceResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1633080194 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + 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.compute.v1.SetEdgeSecurityPolicyBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1365,7 +1318,19 @@ public SetEdgeSecurityPolicyBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetEdgeSecurityPolicyBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyBackendServiceRequest.java index f27c3bb590ce..047c9ef3d784 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyBackendServiceRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyBackendServiceRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1598579310: - { - com.google.cloud.compute.v1.GlobalSetPolicyRequest.Builder subBuilder = null; - if (globalSetPolicyRequestResource_ != null) { - subBuilder = globalSetPolicyRequestResource_.toBuilder(); - } - globalSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetPolicyRequestResource_); - globalSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyBackendServiceRequest_descriptor; @@ -315,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetPolicyRequestResource_ != null) { output.writeMessage(337048498, getGlobalSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -335,7 +265,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 337048498, getGlobalSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +289,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -378,7 +308,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +438,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyBackendServiceRequest.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 @@ -631,7 +554,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyBackendServiceR resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,19 +569,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyBackendServiceRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1598579310: + { + input.readMessage( + getGlobalSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1598579310 + 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.compute.v1.SetIamPolicyBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1117,7 +1072,18 @@ public SetIamPolicyBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyDiskRequest.java index 742b5e1e03e5..657f2a0b6ee8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyDiskRequest.java @@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyDiskRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1238310438: - { - com.google.cloud.compute.v1.ZoneSetPolicyRequest.Builder subBuilder = null; - if (zoneSetPolicyRequestResource_ != null) { - subBuilder = zoneSetPolicyRequestResource_.toBuilder(); - } - zoneSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.ZoneSetPolicyRequest.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(zoneSetPolicyRequestResource_); - zoneSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyDiskRequest_descriptor; @@ -373,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (zoneSetPolicyRequestResource_ != null) { output.writeMessage(382082107, getZoneSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -396,7 +320,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 382082107, getZoneSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -420,7 +344,7 @@ public boolean equals(final java.lang.Object obj) { if (!getZoneSetPolicyRequestResource().equals(other.getZoneSetPolicyRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -441,7 +365,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_SET_POLICY_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getZoneSetPolicyRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -570,17 +494,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyDiskRequest.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 @@ -698,7 +615,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyDiskRequest oth if (other.hasZoneSetPolicyRequestResource()) { mergeZoneSetPolicyRequestResource(other.getZoneSetPolicyRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -713,18 +630,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyDiskRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1238310438: + { + input.readMessage( + getZoneSetPolicyRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1238310438 + 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.compute.v1.SetIamPolicyDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1287,7 +1242,18 @@ public SetIamPolicyDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyFirewallPolicyRequest.java index 8d03c1cd70c7..d3762c58879f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyFirewallPolicyRequest.java @@ -53,70 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyFirewallPolicyRequest( - 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 1419268850: - { - com.google.cloud.compute.v1.GlobalOrganizationSetPolicyRequest.Builder subBuilder = - null; - if (globalOrganizationSetPolicyRequestResource_ != null) { - subBuilder = globalOrganizationSetPolicyRequestResource_.toBuilder(); - } - globalOrganizationSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalOrganizationSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalOrganizationSetPolicyRequestResource_); - globalOrganizationSetPolicyRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyFirewallPolicyRequest_descriptor; @@ -258,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 195806222, resource_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -275,7 +211,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(resource_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(195806222, resource_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -298,7 +234,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getGlobalOrganizationSetPolicyRequestResource())) return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -315,7 +251,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -445,17 +381,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyFirewallPolicyRequest.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 @@ -564,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyFirewallPolicyR resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -579,19 +508,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyFirewallPolicyRequest 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 1419268850: + { + input.readMessage( + getGlobalOrganizationSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1419268850 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + 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.compute.v1.SetIamPolicyFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -946,7 +901,18 @@ public SetIamPolicyFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyImageRequest.java index 43cf55deeb11..4bb343551f67 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyImageRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyImageRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1598579310: - { - com.google.cloud.compute.v1.GlobalSetPolicyRequest.Builder subBuilder = null; - if (globalSetPolicyRequestResource_ != null) { - subBuilder = globalSetPolicyRequestResource_.toBuilder(); - } - globalSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetPolicyRequestResource_); - globalSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyImageRequest_descriptor; @@ -314,7 +244,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetPolicyRequestResource_ != null) { output.writeMessage(337048498, getGlobalSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -334,7 +264,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 337048498, getGlobalSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -358,7 +288,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +307,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -506,17 +436,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyImageRequest.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 @@ -627,7 +550,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyImageRequest ot resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -642,18 +565,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyImageRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1598579310: + { + input.readMessage( + getGlobalSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1598579310 + 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.compute.v1.SetIamPolicyImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1111,7 +1067,18 @@ public SetIamPolicyImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyInstanceRequest.java index 73404719e9f2..69d7abf70269 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyInstanceRequest.java @@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1238310438: - { - com.google.cloud.compute.v1.ZoneSetPolicyRequest.Builder subBuilder = null; - if (zoneSetPolicyRequestResource_ != null) { - subBuilder = zoneSetPolicyRequestResource_.toBuilder(); - } - zoneSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.ZoneSetPolicyRequest.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(zoneSetPolicyRequestResource_); - zoneSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyInstanceRequest_descriptor; @@ -373,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (zoneSetPolicyRequestResource_ != null) { output.writeMessage(382082107, getZoneSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -396,7 +320,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 382082107, getZoneSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -420,7 +344,7 @@ public boolean equals(final java.lang.Object obj) { if (!getZoneSetPolicyRequestResource().equals(other.getZoneSetPolicyRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -441,7 +365,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_SET_POLICY_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getZoneSetPolicyRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -571,17 +495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyInstanceRequest.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 @@ -699,7 +616,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyInstanceRequest if (other.hasZoneSetPolicyRequestResource()) { mergeZoneSetPolicyRequestResource(other.getZoneSetPolicyRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -714,18 +631,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1238310438: + { + input.readMessage( + getZoneSetPolicyRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1238310438 + 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.compute.v1.SetIamPolicyInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1288,7 +1243,18 @@ public SetIamPolicyInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyInstanceTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyInstanceTemplateRequest.java index 82e5fbbe90b2..53fc81f751ee 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyInstanceTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyInstanceTemplateRequest.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyInstanceTemplateRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1598579310: - { - com.google.cloud.compute.v1.GlobalSetPolicyRequest.Builder subBuilder = null; - if (globalSetPolicyRequestResource_ != null) { - subBuilder = globalSetPolicyRequestResource_.toBuilder(); - } - globalSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetPolicyRequestResource_); - globalSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyInstanceTemplateRequest_descriptor; @@ -316,7 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetPolicyRequestResource_ != null) { output.writeMessage(337048498, getGlobalSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +266,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 337048498, getGlobalSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +309,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +439,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyInstanceTemplateRequest.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 @@ -633,7 +556,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,19 +571,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyInstanceTemplateRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1598579310: + { + input.readMessage( + getGlobalSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1598579310 + 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.compute.v1.SetIamPolicyInstanceTemplateRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1120,7 +1075,18 @@ public SetIamPolicyInstanceTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyInstanceTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyLicenseRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyLicenseRequest.java index 304e2908680e..830c9ab82fcd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyLicenseRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyLicenseRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyLicenseRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1598579310: - { - com.google.cloud.compute.v1.GlobalSetPolicyRequest.Builder subBuilder = null; - if (globalSetPolicyRequestResource_ != null) { - subBuilder = globalSetPolicyRequestResource_.toBuilder(); - } - globalSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetPolicyRequestResource_); - globalSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyLicenseRequest_descriptor; @@ -314,7 +244,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetPolicyRequestResource_ != null) { output.writeMessage(337048498, getGlobalSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -334,7 +264,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 337048498, getGlobalSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -358,7 +288,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +307,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -507,17 +437,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyLicenseRequest.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 @@ -628,7 +551,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyLicenseRequest resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -643,18 +566,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyLicenseRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1598579310: + { + input.readMessage( + getGlobalSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1598579310 + 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.compute.v1.SetIamPolicyLicenseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1112,7 +1068,18 @@ public SetIamPolicyLicenseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyLicenseRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyMachineImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyMachineImageRequest.java index 40eaed188acb..9abf4c26f2e7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyMachineImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyMachineImageRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyMachineImageRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1598579310: - { - com.google.cloud.compute.v1.GlobalSetPolicyRequest.Builder subBuilder = null; - if (globalSetPolicyRequestResource_ != null) { - subBuilder = globalSetPolicyRequestResource_.toBuilder(); - } - globalSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetPolicyRequestResource_); - globalSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyMachineImageRequest_descriptor; @@ -315,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetPolicyRequestResource_ != null) { output.writeMessage(337048498, getGlobalSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -335,7 +265,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 337048498, getGlobalSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +289,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -378,7 +308,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +438,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyMachineImageRequest.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 @@ -629,7 +552,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyMachineImageReq resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,18 +567,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyMachineImageRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1598579310: + { + input.readMessage( + getGlobalSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1598579310 + 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.compute.v1.SetIamPolicyMachineImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1113,7 +1069,18 @@ public SetIamPolicyMachineImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyMachineImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNetworkFirewallPolicyRequest.java index f9464fd16759..921a26da81a5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNetworkFirewallPolicyRequest.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyNetworkFirewallPolicyRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1598579310: - { - com.google.cloud.compute.v1.GlobalSetPolicyRequest.Builder subBuilder = null; - if (globalSetPolicyRequestResource_ != null) { - subBuilder = globalSetPolicyRequestResource_.toBuilder(); - } - globalSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetPolicyRequestResource_); - globalSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyNetworkFirewallPolicyRequest_descriptor; @@ -316,7 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetPolicyRequestResource_ != null) { output.writeMessage(337048498, getGlobalSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +266,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 337048498, getGlobalSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +309,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -511,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest.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 +560,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -652,19 +575,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1598579310: + { + input.readMessage( + getGlobalSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1598579310 + 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.compute.v1.SetIamPolicyNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1124,7 +1079,18 @@ public SetIamPolicyNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNodeGroupRequest.java index 1e1a4a6b8986..e4b1d42c0888 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNodeGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNodeGroupRequest.java @@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyNodeGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1238310438: - { - com.google.cloud.compute.v1.ZoneSetPolicyRequest.Builder subBuilder = null; - if (zoneSetPolicyRequestResource_ != null) { - subBuilder = zoneSetPolicyRequestResource_.toBuilder(); - } - zoneSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.ZoneSetPolicyRequest.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(zoneSetPolicyRequestResource_); - zoneSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyNodeGroupRequest_descriptor; @@ -373,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (zoneSetPolicyRequestResource_ != null) { output.writeMessage(382082107, getZoneSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -396,7 +320,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 382082107, getZoneSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -420,7 +344,7 @@ public boolean equals(final java.lang.Object obj) { if (!getZoneSetPolicyRequestResource().equals(other.getZoneSetPolicyRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -441,7 +365,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_SET_POLICY_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getZoneSetPolicyRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -571,17 +495,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest.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 @@ -699,7 +616,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyNodeGroupReques if (other.hasZoneSetPolicyRequestResource()) { mergeZoneSetPolicyRequestResource(other.getZoneSetPolicyRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -714,18 +631,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyNodeGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1238310438: + { + input.readMessage( + getZoneSetPolicyRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1238310438 + 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.compute.v1.SetIamPolicyNodeGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1288,7 +1243,18 @@ public SetIamPolicyNodeGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyNodeGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNodeTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNodeTemplateRequest.java index 1e53c62b3550..f5e4c8267d97 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNodeTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyNodeTemplateRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyNodeTemplateRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2083054566: - { - com.google.cloud.compute.v1.RegionSetPolicyRequest.Builder subBuilder = null; - if (regionSetPolicyRequestResource_ != null) { - subBuilder = regionSetPolicyRequestResource_.toBuilder(); - } - regionSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetPolicyRequestResource_); - regionSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyNodeTemplateRequest_descriptor; @@ -375,7 +298,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetPolicyRequestResource_ != null) { output.writeMessage(276489091, getRegionSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -398,7 +321,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 276489091, getRegionSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -423,7 +346,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -444,7 +367,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -574,17 +497,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyNodeTemplateRequest.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 @@ -702,7 +618,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyNodeTemplateReq resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -717,18 +633,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyNodeTemplateRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2083054566: + { + input.readMessage( + getRegionSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2083054566 + 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.compute.v1.SetIamPolicyNodeTemplateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1292,7 +1247,18 @@ public SetIamPolicyNodeTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyNodeTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionBackendServiceRequest.java index 6ecb3fc5c114..4192767c735a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionBackendServiceRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyRegionBackendServiceRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2083054566: - { - com.google.cloud.compute.v1.RegionSetPolicyRequest.Builder subBuilder = null; - if (regionSetPolicyRequestResource_ != null) { - subBuilder = regionSetPolicyRequestResource_.toBuilder(); - } - regionSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetPolicyRequestResource_); - regionSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyRegionBackendServiceRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetPolicyRequestResource_ != null) { output.writeMessage(276489091, getRegionSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 276489091, getRegionSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -577,17 +500,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetIamPolicyRegionBackendServiceRequest.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 @@ -710,7 +626,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,19 +641,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyRegionBackendServiceRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2083054566: + { + input.readMessage( + getRegionSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2083054566 + 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.compute.v1.SetIamPolicyRegionBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1303,7 +1257,18 @@ public SetIamPolicyRegionBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyRegionBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionDiskRequest.java index 03bd66cbe383..ae99c65ebaab 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionDiskRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyRegionDiskRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2083054566: - { - com.google.cloud.compute.v1.RegionSetPolicyRequest.Builder subBuilder = null; - if (regionSetPolicyRequestResource_ != null) { - subBuilder = regionSetPolicyRequestResource_.toBuilder(); - } - regionSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetPolicyRequestResource_); - regionSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyRegionDiskRequest_descriptor; @@ -374,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetPolicyRequestResource_ != null) { output.writeMessage(276489091, getRegionSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -397,7 +320,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 276489091, getRegionSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -422,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -443,7 +366,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -573,17 +496,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyRegionDiskRequest.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 @@ -701,7 +617,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyRegionDiskReque resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -716,18 +632,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyRegionDiskRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2083054566: + { + input.readMessage( + getRegionSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2083054566 + 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.compute.v1.SetIamPolicyRegionDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1291,7 +1246,18 @@ public SetIamPolicyRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionNetworkFirewallPolicyRequest.java index 7b32c3e784df..e82ce55be495 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyRegionNetworkFirewallPolicyRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyRegionNetworkFirewallPolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2083054566: - { - com.google.cloud.compute.v1.RegionSetPolicyRequest.Builder subBuilder = null; - if (regionSetPolicyRequestResource_ != null) { - subBuilder = regionSetPolicyRequestResource_.toBuilder(); - } - regionSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetPolicyRequestResource_); - regionSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyRegionNetworkFirewallPolicyRequest_descriptor; @@ -377,7 +300,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetPolicyRequestResource_ != null) { output.writeMessage(276489091, getRegionSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -400,7 +323,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 276489091, getRegionSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -426,7 +349,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -447,7 +370,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -585,17 +508,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetIamPolicyRegionNetworkFirewallPolicyRequest.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 @@ -721,7 +637,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -736,20 +652,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyRegionNetworkFirewallPolicyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2083054566: + { + input.readMessage( + getRegionSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2083054566 + 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.compute.v1.SetIamPolicyRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1317,7 +1270,19 @@ public SetIamPolicyRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyRegionNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyReservationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyReservationRequest.java index 0e7be295459b..2ed1e6078bfa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyReservationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyReservationRequest.java @@ -55,82 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyReservationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1238310438: - { - com.google.cloud.compute.v1.ZoneSetPolicyRequest.Builder subBuilder = null; - if (zoneSetPolicyRequestResource_ != null) { - subBuilder = zoneSetPolicyRequestResource_.toBuilder(); - } - zoneSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.ZoneSetPolicyRequest.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(zoneSetPolicyRequestResource_); - zoneSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyReservationRequest_descriptor; @@ -374,7 +298,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (zoneSetPolicyRequestResource_ != null) { output.writeMessage(382082107, getZoneSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -397,7 +321,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 382082107, getZoneSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -421,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { if (!getZoneSetPolicyRequestResource().equals(other.getZoneSetPolicyRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -442,7 +366,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_SET_POLICY_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getZoneSetPolicyRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -572,17 +496,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyReservationRequest.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 @@ -700,7 +617,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyReservationRequ if (other.hasZoneSetPolicyRequestResource()) { mergeZoneSetPolicyRequestResource(other.getZoneSetPolicyRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -715,18 +632,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyReservationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1238310438: + { + input.readMessage( + getZoneSetPolicyRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1238310438 + 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.compute.v1.SetIamPolicyReservationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1289,7 +1244,18 @@ public SetIamPolicyReservationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyReservationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyResourcePolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyResourcePolicyRequest.java index 544867a11e88..88581623eaf3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyResourcePolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyResourcePolicyRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyResourcePolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2083054566: - { - com.google.cloud.compute.v1.RegionSetPolicyRequest.Builder subBuilder = null; - if (regionSetPolicyRequestResource_ != null) { - subBuilder = regionSetPolicyRequestResource_.toBuilder(); - } - regionSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetPolicyRequestResource_); - regionSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyResourcePolicyRequest_descriptor; @@ -375,7 +298,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetPolicyRequestResource_ != null) { output.writeMessage(276489091, getRegionSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -398,7 +321,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 276489091, getRegionSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -423,7 +346,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -444,7 +367,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -574,17 +497,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyResourcePolicyRequest.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 @@ -704,7 +620,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicyResourcePolicyR resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -719,19 +635,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyResourcePolicyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2083054566: + { + input.readMessage( + getRegionSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2083054566 + 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.compute.v1.SetIamPolicyResourcePolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1296,7 +1250,18 @@ public SetIamPolicyResourcePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyResourcePolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyServiceAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyServiceAttachmentRequest.java index 8bdc2ba4baa3..20dd4a9cceee 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyServiceAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicyServiceAttachmentRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyServiceAttachmentRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2083054566: - { - com.google.cloud.compute.v1.RegionSetPolicyRequest.Builder subBuilder = null; - if (regionSetPolicyRequestResource_ != null) { - subBuilder = regionSetPolicyRequestResource_.toBuilder(); - } - regionSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetPolicyRequestResource_); - regionSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicyServiceAttachmentRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetPolicyRequestResource_ != null) { output.writeMessage(276489091, getRegionSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 276489091, getRegionSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -575,17 +498,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicyServiceAttachmentRequest.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 @@ -706,7 +622,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,19 +637,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicyServiceAttachmentRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2083054566: + { + input.readMessage( + getRegionSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2083054566 + 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.compute.v1.SetIamPolicyServiceAttachmentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1299,7 +1253,18 @@ public SetIamPolicyServiceAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyServiceAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicySnapshotRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicySnapshotRequest.java index 83acd62c116d..b3abd5054c07 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicySnapshotRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicySnapshotRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicySnapshotRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1598579310: - { - com.google.cloud.compute.v1.GlobalSetPolicyRequest.Builder subBuilder = null; - if (globalSetPolicyRequestResource_ != null) { - subBuilder = globalSetPolicyRequestResource_.toBuilder(); - } - globalSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetPolicyRequestResource_); - globalSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicySnapshotRequest_descriptor; @@ -314,7 +244,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetPolicyRequestResource_ != null) { output.writeMessage(337048498, getGlobalSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -334,7 +264,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 337048498, getGlobalSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -358,7 +288,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +307,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -507,17 +437,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicySnapshotRequest.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 @@ -628,7 +551,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicySnapshotRequest resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -643,18 +566,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicySnapshotRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1598579310: + { + input.readMessage( + getGlobalSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1598579310 + 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.compute.v1.SetIamPolicySnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1112,7 +1068,18 @@ public SetIamPolicySnapshotRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicySnapshotRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicySubnetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicySubnetworkRequest.java index 02dc491fd28b..1bf526e2449f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicySubnetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetIamPolicySubnetworkRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicySubnetworkRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2083054566: - { - com.google.cloud.compute.v1.RegionSetPolicyRequest.Builder subBuilder = null; - if (regionSetPolicyRequestResource_ != null) { - subBuilder = regionSetPolicyRequestResource_.toBuilder(); - } - regionSetPolicyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetPolicyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetPolicyRequestResource_); - regionSetPolicyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetIamPolicySubnetworkRequest_descriptor; @@ -374,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetPolicyRequestResource_ != null) { output.writeMessage(276489091, getRegionSetPolicyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -397,7 +320,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 276489091, getRegionSetPolicyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -422,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -443,7 +366,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -573,17 +496,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetIamPolicySubnetworkRequest.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 @@ -701,7 +617,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetIamPolicySubnetworkReque resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -716,18 +632,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetIamPolicySubnetworkRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2083054566: + { + input.readMessage( + getRegionSetPolicyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2083054566 + 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.compute.v1.SetIamPolicySubnetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1291,7 +1246,18 @@ public SetIamPolicySubnetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicySubnetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetInstanceTemplateInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetInstanceTemplateInstanceGroupManagerRequest.java index f9bcbdebba6c..02a1d8a2fe03 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetInstanceTemplateInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetInstanceTemplateInstanceGroupManagerRequest.java @@ -57,94 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInstanceTemplateInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 78472746: - { - com.google.cloud.compute.v1.InstanceGroupManagersSetInstanceTemplateRequest.Builder - subBuilder = null; - if (instanceGroupManagersSetInstanceTemplateRequestResource_ != null) { - subBuilder = instanceGroupManagersSetInstanceTemplateRequestResource_.toBuilder(); - } - instanceGroupManagersSetInstanceTemplateRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagersSetInstanceTemplateRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagersSetInstanceTemplateRequestResource_); - instanceGroupManagersSetInstanceTemplateRequestResource_ = - subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetInstanceTemplateInstanceGroupManagerRequest_descriptor; @@ -471,7 +383,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -499,7 +411,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -529,7 +441,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -555,7 +467,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -693,17 +605,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest.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 @@ -846,7 +751,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -861,20 +766,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 78472746: + { + input.readMessage( + getInstanceGroupManagersSetInstanceTemplateRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 78472746 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.SetInstanceTemplateInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1599,7 +1548,19 @@ public SetInstanceTemplateInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInstanceTemplateInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetInstanceTemplateRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetInstanceTemplateRegionInstanceGroupManagerRequest.java index a4cd268de9f6..cd3126a09449 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetInstanceTemplateRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetInstanceTemplateRegionInstanceGroupManagerRequest.java @@ -58,93 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInstanceTemplateRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1498483298: - { - com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTemplateRequest.Builder - subBuilder = null; - if (regionInstanceGroupManagersSetTemplateRequestResource_ != null) { - subBuilder = regionInstanceGroupManagersSetTemplateRequestResource_.toBuilder(); - } - regionInstanceGroupManagersSetTemplateRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTemplateRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupManagersSetTemplateRequestResource_); - regionInstanceGroupManagersSetTemplateRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetInstanceTemplateRegionInstanceGroupManagerRequest_descriptor; @@ -471,7 +384,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -499,7 +412,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -530,7 +443,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -556,7 +469,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -696,17 +609,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerRequest.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 @@ -853,7 +759,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -868,20 +774,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerRequest - 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1498483298: + { + input.readMessage( + getRegionInstanceGroupManagersSetTemplateRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 1498483298 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.SetInstanceTemplateRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1607,8 +1557,19 @@ public SetInstanceTemplateRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInstanceTemplateRegionInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsAddressRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsAddressRequest.java index 87d7bebb82e6..07561dd0ebe7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsAddressRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsAddressRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsAddressRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2074862258: - { - com.google.cloud.compute.v1.RegionSetLabelsRequest.Builder subBuilder = null; - if (regionSetLabelsRequestResource_ != null) { - subBuilder = regionSetLabelsRequestResource_.toBuilder(); - } - regionSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetLabelsRequestResource_); - regionSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsAddressRequest_descriptor; @@ -459,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetLabelsRequestResource_ != null) { output.writeMessage(259357782, getRegionSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -485,7 +400,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 259357782, getRegionSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -514,7 +429,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -539,7 +454,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -668,17 +583,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsAddressRequest.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 @@ -810,7 +718,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsAddressRequest oth resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -825,18 +733,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsAddressRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2074862258: + { + input.readMessage( + getRegionSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2074862258 + 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.compute.v1.SetLabelsAddressRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1542,7 +1495,18 @@ public SetLabelsAddressRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsAddressRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsDiskRequest.java index 5cf0dd1022c9..9d5c22a14986 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsDiskRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsDiskRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1375360910: - { - com.google.cloud.compute.v1.ZoneSetLabelsRequest.Builder subBuilder = null; - if (zoneSetLabelsRequestResource_ != null) { - subBuilder = zoneSetLabelsRequestResource_.toBuilder(); - } - zoneSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.ZoneSetLabelsRequest.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(zoneSetLabelsRequestResource_); - zoneSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsDiskRequest_descriptor; @@ -458,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (zoneSetLabelsRequestResource_ != null) { output.writeMessage(364950798, getZoneSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +400,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 364950798, getZoneSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -512,7 +428,7 @@ public boolean equals(final java.lang.Object obj) { if (!getZoneSetLabelsRequestResource().equals(other.getZoneSetLabelsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -537,7 +453,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_SET_LABELS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getZoneSetLabelsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -666,17 +582,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsDiskRequest.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 @@ -808,7 +717,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsDiskRequest other) if (other.hasZoneSetLabelsRequestResource()) { mergeZoneSetLabelsRequestResource(other.getZoneSetLabelsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -823,17 +732,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsDiskRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1375360910: + { + input.readMessage( + getZoneSetLabelsRequestResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1375360910 + 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.compute.v1.SetLabelsDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1538,7 +1492,18 @@ public SetLabelsDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsExternalVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsExternalVpnGatewayRequest.java index f82af62c837b..13810f3ff2a2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsExternalVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsExternalVpnGatewayRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsExternalVpnGatewayRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1735629782: - { - com.google.cloud.compute.v1.GlobalSetLabelsRequest.Builder subBuilder = null; - if (globalSetLabelsRequestResource_ != null) { - subBuilder = globalSetLabelsRequestResource_.toBuilder(); - } - globalSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetLabelsRequestResource_); - globalSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsExternalVpnGatewayRequest_descriptor; @@ -319,7 +249,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetLabelsRequestResource_ != null) { output.writeMessage(319917189, getGlobalSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +269,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 319917189, getGlobalSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -363,7 +293,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +312,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -512,17 +442,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsExternalVpnGatewayRequest.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 @@ -635,7 +558,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsExternalVpnGateway resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -650,19 +573,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsExternalVpnGatewayRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1735629782: + { + input.readMessage( + getGlobalSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1735629782 + 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.compute.v1.SetLabelsExternalVpnGatewayRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1132,7 +1087,18 @@ public SetLabelsExternalVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsExternalVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsForwardingRuleRequest.java index b7d496a968fd..c624149ad4e2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsForwardingRuleRequest.java @@ -56,91 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsForwardingRuleRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2074862258: - { - com.google.cloud.compute.v1.RegionSetLabelsRequest.Builder subBuilder = null; - if (regionSetLabelsRequestResource_ != null) { - subBuilder = regionSetLabelsRequestResource_.toBuilder(); - } - regionSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetLabelsRequestResource_); - regionSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsForwardingRuleRequest_descriptor; @@ -460,7 +375,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetLabelsRequestResource_ != null) { output.writeMessage(259357782, getRegionSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +401,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 259357782, getRegionSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -515,7 +430,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -540,7 +455,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -670,17 +585,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsForwardingRuleRequest.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 @@ -812,7 +720,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsForwardingRuleRequ resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -827,18 +735,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsForwardingRuleRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2074862258: + { + input.readMessage( + getRegionSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2074862258 + 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.compute.v1.SetLabelsForwardingRuleRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1544,7 +1497,18 @@ public SetLabelsForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsGlobalAddressRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsGlobalAddressRequest.java index 95e3864947e0..1c93ce6f14fd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsGlobalAddressRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsGlobalAddressRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsGlobalAddressRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1735629782: - { - com.google.cloud.compute.v1.GlobalSetLabelsRequest.Builder subBuilder = null; - if (globalSetLabelsRequestResource_ != null) { - subBuilder = globalSetLabelsRequestResource_.toBuilder(); - } - globalSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetLabelsRequestResource_); - globalSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsGlobalAddressRequest_descriptor; @@ -318,7 +248,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetLabelsRequestResource_ != null) { output.writeMessage(319917189, getGlobalSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +268,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 319917189, getGlobalSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -381,7 +311,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -511,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsGlobalAddressRequest.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 @@ -632,7 +555,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsGlobalAddressReque resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -647,18 +570,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsGlobalAddressRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1735629782: + { + input.readMessage( + getGlobalSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1735629782 + 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.compute.v1.SetLabelsGlobalAddressRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1126,7 +1082,18 @@ public SetLabelsGlobalAddressRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsGlobalAddressRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsGlobalForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsGlobalForwardingRuleRequest.java index ee1ea242d916..a48b1ef5e25e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsGlobalForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsGlobalForwardingRuleRequest.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsGlobalForwardingRuleRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1735629782: - { - com.google.cloud.compute.v1.GlobalSetLabelsRequest.Builder subBuilder = null; - if (globalSetLabelsRequestResource_ != null) { - subBuilder = globalSetLabelsRequestResource_.toBuilder(); - } - globalSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetLabelsRequestResource_); - globalSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsGlobalForwardingRuleRequest_descriptor; @@ -320,7 +250,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetLabelsRequestResource_ != null) { output.writeMessage(319917189, getGlobalSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -340,7 +270,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 319917189, getGlobalSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -364,7 +294,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +313,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -513,17 +443,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest.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 +560,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -652,19 +575,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsGlobalForwardingRuleRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1735629782: + { + input.readMessage( + getGlobalSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1735629782 + 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.compute.v1.SetLabelsGlobalForwardingRuleRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1134,7 +1089,18 @@ public SetLabelsGlobalForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsGlobalForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsImageRequest.java index 5f5c6946814e..10905ef471dd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsImageRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsImageRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1735629782: - { - com.google.cloud.compute.v1.GlobalSetLabelsRequest.Builder subBuilder = null; - if (globalSetLabelsRequestResource_ != null) { - subBuilder = globalSetLabelsRequestResource_.toBuilder(); - } - globalSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetLabelsRequestResource_); - globalSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsImageRequest_descriptor; @@ -318,7 +248,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetLabelsRequestResource_ != null) { output.writeMessage(319917189, getGlobalSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +268,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 319917189, getGlobalSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -381,7 +311,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +440,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsImageRequest.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 @@ -631,7 +554,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsImageRequest other resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,18 +569,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsImageRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1735629782: + { + input.readMessage( + getGlobalSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1735629782 + 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.compute.v1.SetLabelsImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1125,7 +1081,18 @@ public SetLabelsImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInstanceRequest.java index a207ee37dafe..1623dcfb3c00 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInstanceRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1661994754: - { - com.google.cloud.compute.v1.InstancesSetLabelsRequest.Builder subBuilder = null; - if (instancesSetLabelsRequestResource_ != null) { - subBuilder = instancesSetLabelsRequestResource_.toBuilder(); - } - instancesSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstancesSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instancesSetLabelsRequestResource_); - instancesSetLabelsRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsInstanceRequest_descriptor; @@ -460,7 +375,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +401,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -515,7 +430,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -540,7 +455,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -669,17 +584,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsInstanceRequest.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 @@ -812,7 +720,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsInstanceRequest ot zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -827,18 +735,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1661994754: + { + input.readMessage( + getInstancesSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1661994754 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SetLabelsInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1546,7 +1499,18 @@ public SetLabelsInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInterconnectAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInterconnectAttachmentRequest.java index 35f83c3aee5c..4e421d9e553e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInterconnectAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInterconnectAttachmentRequest.java @@ -57,91 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsInterconnectAttachmentRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2074862258: - { - com.google.cloud.compute.v1.RegionSetLabelsRequest.Builder subBuilder = null; - if (regionSetLabelsRequestResource_ != null) { - subBuilder = regionSetLabelsRequestResource_.toBuilder(); - } - regionSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetLabelsRequestResource_); - regionSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsInterconnectAttachmentRequest_descriptor; @@ -461,7 +376,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetLabelsRequestResource_ != null) { output.writeMessage(259357782, getRegionSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +402,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 259357782, getRegionSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -516,7 +431,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -541,7 +456,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +588,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetLabelsInterconnectAttachmentRequest.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 @@ -820,7 +728,7 @@ public Builder mergeFrom( resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -835,19 +743,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsInterconnectAttachmentRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2074862258: + { + input.readMessage( + getRegionSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2074862258 + 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.compute.v1.SetLabelsInterconnectAttachmentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1555,7 +1507,18 @@ public SetLabelsInterconnectAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsInterconnectAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInterconnectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInterconnectRequest.java index 145126082d78..b81a5f6904df 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInterconnectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsInterconnectRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsInterconnectRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1735629782: - { - com.google.cloud.compute.v1.GlobalSetLabelsRequest.Builder subBuilder = null; - if (globalSetLabelsRequestResource_ != null) { - subBuilder = globalSetLabelsRequestResource_.toBuilder(); - } - globalSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetLabelsRequestResource_); - globalSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsInterconnectRequest_descriptor; @@ -318,7 +248,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetLabelsRequestResource_ != null) { output.writeMessage(319917189, getGlobalSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +268,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 319917189, getGlobalSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -381,7 +311,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -511,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsInterconnectRequest.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 @@ -632,7 +555,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsInterconnectReques resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -647,18 +570,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsInterconnectRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1735629782: + { + input.readMessage( + getGlobalSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1735629782 + 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.compute.v1.SetLabelsInterconnectRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1126,7 +1082,18 @@ public SetLabelsInterconnectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsInterconnectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsRegionDiskRequest.java index b8e1b293cec0..fbd567e7cfe8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsRegionDiskRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsRegionDiskRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2074862258: - { - com.google.cloud.compute.v1.RegionSetLabelsRequest.Builder subBuilder = null; - if (regionSetLabelsRequestResource_ != null) { - subBuilder = regionSetLabelsRequestResource_.toBuilder(); - } - regionSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetLabelsRequestResource_); - regionSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsRegionDiskRequest_descriptor; @@ -459,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetLabelsRequestResource_ != null) { output.writeMessage(259357782, getRegionSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -485,7 +400,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 259357782, getRegionSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -514,7 +429,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -539,7 +454,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -669,17 +584,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsRegionDiskRequest.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 @@ -811,7 +719,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsRegionDiskRequest resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -826,18 +734,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsRegionDiskRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2074862258: + { + input.readMessage( + getRegionSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2074862258 + 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.compute.v1.SetLabelsRegionDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1543,7 +1496,18 @@ public SetLabelsRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsSecurityPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsSecurityPolicyRequest.java index aa5409273207..23e5f932a398 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsSecurityPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsSecurityPolicyRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsSecurityPolicyRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1735629782: - { - com.google.cloud.compute.v1.GlobalSetLabelsRequest.Builder subBuilder = null; - if (globalSetLabelsRequestResource_ != null) { - subBuilder = globalSetLabelsRequestResource_.toBuilder(); - } - globalSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetLabelsRequestResource_); - globalSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsSecurityPolicyRequest_descriptor; @@ -319,7 +249,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetLabelsRequestResource_ != null) { output.writeMessage(319917189, getGlobalSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +269,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 319917189, getGlobalSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -363,7 +293,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +312,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -512,17 +442,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest.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 @@ -633,7 +556,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsSecurityPolicyRequ resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,18 +571,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsSecurityPolicyRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1735629782: + { + input.readMessage( + getGlobalSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1735629782 + 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.compute.v1.SetLabelsSecurityPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1127,7 +1083,18 @@ public SetLabelsSecurityPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsSecurityPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsSnapshotRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsSnapshotRequest.java index 2b76a3e57adc..968c4fef1066 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsSnapshotRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsSnapshotRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsSnapshotRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1735629782: - { - com.google.cloud.compute.v1.GlobalSetLabelsRequest.Builder subBuilder = null; - if (globalSetLabelsRequestResource_ != null) { - subBuilder = globalSetLabelsRequestResource_.toBuilder(); - } - globalSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.GlobalSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(globalSetLabelsRequestResource_); - globalSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsSnapshotRequest_descriptor; @@ -318,7 +248,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (globalSetLabelsRequestResource_ != null) { output.writeMessage(319917189, getGlobalSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -338,7 +268,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 319917189, getGlobalSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getProject().equals(other.getProject())) return false; if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -381,7 +311,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +440,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsSnapshotRequest.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 @@ -631,7 +554,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsSnapshotRequest ot resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,18 +569,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsSnapshotRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1735629782: + { + input.readMessage( + getGlobalSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1735629782 + 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.compute.v1.SetLabelsSnapshotRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1125,7 +1081,18 @@ public SetLabelsSnapshotRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsSnapshotRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsTargetVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsTargetVpnGatewayRequest.java index e8d7c2656ff6..74fda3fced22 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsTargetVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsTargetVpnGatewayRequest.java @@ -56,91 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsTargetVpnGatewayRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2074862258: - { - com.google.cloud.compute.v1.RegionSetLabelsRequest.Builder subBuilder = null; - if (regionSetLabelsRequestResource_ != null) { - subBuilder = regionSetLabelsRequestResource_.toBuilder(); - } - regionSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetLabelsRequestResource_); - regionSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsTargetVpnGatewayRequest_descriptor; @@ -460,7 +375,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetLabelsRequestResource_ != null) { output.writeMessage(259357782, getRegionSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +401,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 259357782, getRegionSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -515,7 +430,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -540,7 +455,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -670,17 +585,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest.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 @@ -814,7 +722,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRe resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -829,18 +737,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsTargetVpnGatewayRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2074862258: + { + input.readMessage( + getRegionSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2074862258 + 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.compute.v1.SetLabelsTargetVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1547,7 +1500,18 @@ public SetLabelsTargetVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsTargetVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsVpnGatewayRequest.java index d132a614f716..2c0282a6f917 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsVpnGatewayRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsVpnGatewayRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2074862258: - { - com.google.cloud.compute.v1.RegionSetLabelsRequest.Builder subBuilder = null; - if (regionSetLabelsRequestResource_ != null) { - subBuilder = regionSetLabelsRequestResource_.toBuilder(); - } - regionSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetLabelsRequestResource_); - regionSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsVpnGatewayRequest_descriptor; @@ -459,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetLabelsRequestResource_ != null) { output.writeMessage(259357782, getRegionSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -485,7 +400,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 259357782, getRegionSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -514,7 +429,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -539,7 +454,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -669,17 +584,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsVpnGatewayRequest.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 @@ -811,7 +719,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsVpnGatewayRequest resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -826,18 +734,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsVpnGatewayRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2074862258: + { + input.readMessage( + getRegionSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2074862258 + 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.compute.v1.SetLabelsVpnGatewayRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1543,7 +1496,18 @@ public SetLabelsVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsVpnTunnelRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsVpnTunnelRequest.java index 8f12723cccc1..97258f659ae0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsVpnTunnelRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetLabelsVpnTunnelRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetLabelsVpnTunnelRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2074862258: - { - com.google.cloud.compute.v1.RegionSetLabelsRequest.Builder subBuilder = null; - if (regionSetLabelsRequestResource_ != null) { - subBuilder = regionSetLabelsRequestResource_.toBuilder(); - } - regionSetLabelsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionSetLabelsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionSetLabelsRequestResource_); - regionSetLabelsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetLabelsVpnTunnelRequest_descriptor; @@ -459,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (regionSetLabelsRequestResource_ != null) { output.writeMessage(259357782, getRegionSetLabelsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -485,7 +400,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 259357782, getRegionSetLabelsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -514,7 +429,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getResource().equals(other.getResource())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -539,7 +454,7 @@ public int hashCode() { } hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -669,17 +584,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetLabelsVpnTunnelRequest.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 @@ -811,7 +719,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetLabelsVpnTunnelRequest o resource_ = other.resource_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -826,18 +734,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetLabelsVpnTunnelRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2074862258: + { + input.readMessage( + getRegionSetLabelsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2074862258 + 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.compute.v1.SetLabelsVpnTunnelRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1543,7 +1496,18 @@ public SetLabelsVpnTunnelRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetLabelsVpnTunnelRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMachineResourcesInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMachineResourcesInstanceRequest.java index 0871a9b682e6..a9543067b922 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMachineResourcesInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMachineResourcesInstanceRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetMachineResourcesInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1570290546: - { - com.google.cloud.compute.v1.InstancesSetMachineResourcesRequest.Builder subBuilder = - null; - if (instancesSetMachineResourcesRequestResource_ != null) { - subBuilder = instancesSetMachineResourcesRequestResource_.toBuilder(); - } - instancesSetMachineResourcesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstancesSetMachineResourcesRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instancesSetMachineResourcesRequestResource_); - instancesSetMachineResourcesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetMachineResourcesInstanceRequest_descriptor; @@ -463,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +403,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +457,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetMachineResourcesInstanceRequest.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 @@ -820,7 +727,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetMachineResourcesInstance zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -835,19 +742,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetMachineResourcesInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1570290546: + { + input.readMessage( + getInstancesSetMachineResourcesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1570290546 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SetMachineResourcesInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1559,7 +1510,18 @@ public SetMachineResourcesInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetMachineResourcesInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMachineTypeInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMachineTypeInstanceRequest.java index 3ae6c9d3982b..71f1a6c3d0b9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMachineTypeInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMachineTypeInstanceRequest.java @@ -55,91 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetMachineTypeInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 2033261674: - { - com.google.cloud.compute.v1.InstancesSetMachineTypeRequest.Builder subBuilder = null; - if (instancesSetMachineTypeRequestResource_ != null) { - subBuilder = instancesSetMachineTypeRequestResource_.toBuilder(); - } - instancesSetMachineTypeRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstancesSetMachineTypeRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instancesSetMachineTypeRequestResource_); - instancesSetMachineTypeRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetMachineTypeInstanceRequest_descriptor; @@ -461,7 +376,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instancesSetMachineTypeRequestResource_ != null) { output.writeMessage(254157709, getInstancesSetMachineTypeRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +402,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 254157709, getInstancesSetMachineTypeRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -516,7 +431,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -541,7 +456,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -671,17 +586,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetMachineTypeInstanceRequest.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 @@ -815,7 +723,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetMachineTypeInstanceReque zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -830,18 +738,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetMachineTypeInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 2033261674: + { + input.readMessage( + getInstancesSetMachineTypeRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 2033261674 + 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.compute.v1.SetMachineTypeInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1549,7 +1502,18 @@ public SetMachineTypeInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetMachineTypeInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMetadataInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMetadataInstanceRequest.java index 1ba954436a50..3d725dc34125 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMetadataInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMetadataInstanceRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetMetadataInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1966278414: - { - com.google.cloud.compute.v1.Metadata.Builder subBuilder = null; - if (metadataResource_ != null) { - subBuilder = metadataResource_.toBuilder(); - } - metadataResource_ = - input.readMessage( - com.google.cloud.compute.v1.Metadata.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metadataResource_); - metadataResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetMetadataInstanceRequest_descriptor; @@ -457,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (metadataResource_ != null) { output.writeMessage(291086110, getMetadataResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -483,7 +399,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 291086110, getMetadataResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -510,7 +426,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -535,7 +451,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -665,17 +581,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetMetadataInstanceRequest.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 @@ -807,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetMetadataInstanceRequest zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -822,18 +731,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetMetadataInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1966278414: + { + input.readMessage( + getMetadataResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1966278414 + 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.compute.v1.SetMetadataInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1533,7 +1486,18 @@ public SetMetadataInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetMetadataInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMinCpuPlatformInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMinCpuPlatformInstanceRequest.java index 86dc30f36ee3..689e61484720 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMinCpuPlatformInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetMinCpuPlatformInstanceRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetMinCpuPlatformInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1187674946: - { - com.google.cloud.compute.v1.InstancesSetMinCpuPlatformRequest.Builder subBuilder = - null; - if (instancesSetMinCpuPlatformRequestResource_ != null) { - subBuilder = instancesSetMinCpuPlatformRequestResource_.toBuilder(); - } - instancesSetMinCpuPlatformRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstancesSetMinCpuPlatformRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instancesSetMinCpuPlatformRequestResource_); - instancesSetMinCpuPlatformRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetMinCpuPlatformInstanceRequest_descriptor; @@ -463,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +403,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +457,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest.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 @@ -820,7 +727,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetMinCpuPlatformInstanceRe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -835,18 +742,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetMinCpuPlatformInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1187674946: + { + input.readMessage( + getInstancesSetMinCpuPlatformRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1187674946 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SetMinCpuPlatformInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1555,7 +1507,18 @@ public SetMinCpuPlatformInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetMinCpuPlatformInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNamedPortsInstanceGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNamedPortsInstanceGroupRequest.java index b957c8038f35..c3a5aead4c00 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNamedPortsInstanceGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNamedPortsInstanceGroupRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetNamedPortsInstanceGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 648762026: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroup_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1213755014: - { - com.google.cloud.compute.v1.InstanceGroupsSetNamedPortsRequest.Builder subBuilder = - null; - if (instanceGroupsSetNamedPortsRequestResource_ != null) { - subBuilder = instanceGroupsSetNamedPortsRequestResource_.toBuilder(); - } - instanceGroupsSetNamedPortsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupsSetNamedPortsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupsSetNamedPortsRequestResource_); - instanceGroupsSetNamedPortsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetNamedPortsInstanceGroupRequest_descriptor; @@ -463,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupsSetNamedPortsRequestResource_ != null) { output.writeMessage(385151535, getInstanceGroupsSetNamedPortsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +403,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 385151535, getInstanceGroupsSetNamedPortsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +457,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest.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 @@ -820,7 +727,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetNamedPortsInstanceGroupR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -835,19 +742,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetNamedPortsInstanceGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 648762026: + { + instanceGroup_ = input.readStringRequireUtf8(); + + break; + } // case 648762026 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1213755014: + { + input.readMessage( + getInstanceGroupsSetNamedPortsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1213755014 + 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.compute.v1.SetNamedPortsInstanceGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1556,7 +1507,18 @@ public SetNamedPortsInstanceGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetNamedPortsInstanceGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNamedPortsRegionInstanceGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNamedPortsRegionInstanceGroupRequest.java index 7c85d6d8859e..4eda4d50a5d7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNamedPortsRegionInstanceGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNamedPortsRegionInstanceGroupRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetNamedPortsRegionInstanceGroupRequest( - 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 12599506: - { - com.google.cloud.compute.v1.RegionInstanceGroupsSetNamedPortsRequest.Builder - subBuilder = null; - if (regionInstanceGroupsSetNamedPortsRequestResource_ != null) { - subBuilder = regionInstanceGroupsSetNamedPortsRequestResource_.toBuilder(); - } - regionInstanceGroupsSetNamedPortsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupsSetNamedPortsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupsSetNamedPortsRequestResource_); - regionInstanceGroupsSetNamedPortsRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 648762026: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroup_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetNamedPortsRegionInstanceGroupRequest_descriptor; @@ -465,7 +379,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -491,7 +405,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -520,7 +434,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -545,7 +459,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -677,17 +591,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest.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 @@ -827,7 +734,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -842,19 +749,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetNamedPortsRegionInstanceGroupRequest 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 12599506: + { + input.readMessage( + getRegionInstanceGroupsSetNamedPortsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 12599506 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 648762026: + { + instanceGroup_ = input.readStringRequireUtf8(); + + break; + } // case 648762026 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SetNamedPortsRegionInstanceGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1570,7 +1521,18 @@ public SetNamedPortsRegionInstanceGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetNamedPortsRegionInstanceGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNodeTemplateNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNodeTemplateNodeGroupRequest.java index f7fa90479aa2..52177b56ce8a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNodeTemplateNodeGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetNodeTemplateNodeGroupRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetNodeTemplateNodeGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 939058570: - { - com.google.cloud.compute.v1.NodeGroupsSetNodeTemplateRequest.Builder subBuilder = - null; - if (nodeGroupsSetNodeTemplateRequestResource_ != null) { - subBuilder = nodeGroupsSetNodeTemplateRequestResource_.toBuilder(); - } - nodeGroupsSetNodeTemplateRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.NodeGroupsSetNodeTemplateRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(nodeGroupsSetNodeTemplateRequestResource_); - nodeGroupsSetNodeTemplateRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -535302126: - { - java.lang.String s = input.readStringRequireUtf8(); - - nodeGroup_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetNodeTemplateNodeGroupRequest_descriptor; @@ -463,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 469958146, nodeGroup_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +403,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nodeGroup_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(469958146, nodeGroup_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +457,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest.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 @@ -818,7 +725,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetNodeTemplateNodeGroupReq zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -833,18 +740,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetNodeTemplateNodeGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 939058570: + { + input.readMessage( + getNodeGroupsSetNodeTemplateRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 939058570 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -535302126: + { + nodeGroup_ = input.readStringRequireUtf8(); + + break; + } // case -535302126 + 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.compute.v1.SetNodeTemplateNodeGroupRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1552,7 +1504,18 @@ public SetNodeTemplateNodeGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetNodeTemplateNodeGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetPrivateIpGoogleAccessSubnetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetPrivateIpGoogleAccessSubnetworkRequest.java index c56ebae583f3..aa1737045cd0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetPrivateIpGoogleAccessSubnetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetPrivateIpGoogleAccessSubnetworkRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetPrivateIpGoogleAccessSubnetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2143601726: - { - com.google.cloud.compute.v1.SubnetworksSetPrivateIpGoogleAccessRequest.Builder - subBuilder = null; - if (subnetworksSetPrivateIpGoogleAccessRequestResource_ != null) { - subBuilder = subnetworksSetPrivateIpGoogleAccessRequestResource_.toBuilder(); - } - subnetworksSetPrivateIpGoogleAccessRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.SubnetworksSetPrivateIpGoogleAccessRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(subnetworksSetPrivateIpGoogleAccessRequestResource_); - subnetworksSetPrivateIpGoogleAccessRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - - subnetwork_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetPrivateIpGoogleAccessSubnetworkRequest_descriptor; @@ -467,7 +380,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 307827694, subnetwork_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -493,7 +406,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subnetwork_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(307827694, subnetwork_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -522,7 +435,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSubnetworksSetPrivateIpGoogleAccessRequestResource() .equals(other.getSubnetworksSetPrivateIpGoogleAccessRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -547,7 +460,7 @@ public int hashCode() { hash = (37 * hash) + SUBNETWORKS_SET_PRIVATE_IP_GOOGLE_ACCESS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSubnetworksSetPrivateIpGoogleAccessRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -679,17 +592,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetPrivateIpGoogleAccessSubnetworkRequest.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 @@ -829,7 +735,7 @@ public Builder mergeFrom( mergeSubnetworksSetPrivateIpGoogleAccessRequestResource( other.getSubnetworksSetPrivateIpGoogleAccessRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -844,19 +750,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetPrivateIpGoogleAccessSubnetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2143601726: + { + input.readMessage( + getSubnetworksSetPrivateIpGoogleAccessRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -2143601726 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + + break; + } // case -1832345742 + 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.compute.v1.SetPrivateIpGoogleAccessSubnetworkRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1573,7 +1524,19 @@ public SetPrivateIpGoogleAccessSubnetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetPrivateIpGoogleAccessSubnetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetProxyHeaderTargetSslProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetProxyHeaderTargetSslProxyRequest.java index 1bd2ea2c6c08..01ae88a71eb2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetProxyHeaderTargetSslProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetProxyHeaderTargetSslProxyRequest.java @@ -56,85 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetProxyHeaderTargetSslProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1642276210: - { - com.google.cloud.compute.v1.TargetSslProxiesSetProxyHeaderRequest.Builder subBuilder = - null; - if (targetSslProxiesSetProxyHeaderRequestResource_ != null) { - subBuilder = targetSslProxiesSetProxyHeaderRequestResource_.toBuilder(); - } - targetSslProxiesSetProxyHeaderRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetSslProxiesSetProxyHeaderRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetSslProxiesSetProxyHeaderRequestResource_); - targetSslProxiesSetProxyHeaderRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1584600470: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetSslProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetProxyHeaderTargetSslProxyRequest_descriptor; @@ -401,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 338795853, targetSslProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +345,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(338795853, targetSslProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTargetSslProxiesSetProxyHeaderRequestResource())) return false; } if (!getTargetSslProxy().equals(other.getTargetSslProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -475,7 +396,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_SSL_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetSslProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -605,17 +526,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetProxyHeaderTargetSslProxyRequest.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 @@ -746,7 +660,7 @@ public Builder mergeFrom( targetSslProxy_ = other.targetSslProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -761,19 +675,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetProxyHeaderTargetSslProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1642276210: + { + input.readMessage( + getTargetSslProxiesSetProxyHeaderRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1642276210 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1584600470: + { + targetSslProxy_ = input.readStringRequireUtf8(); + + break; + } // case -1584600470 + 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.compute.v1.SetProxyHeaderTargetSslProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1369,7 +1321,18 @@ public SetProxyHeaderTargetSslProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetProxyHeaderTargetSslProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetProxyHeaderTargetTcpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetProxyHeaderTargetTcpProxyRequest.java index b46b92bd6a11..07645d88f514 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetProxyHeaderTargetTcpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetProxyHeaderTargetTcpProxyRequest.java @@ -56,85 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetProxyHeaderTargetTcpProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1759666714: - { - com.google.cloud.compute.v1.TargetTcpProxiesSetProxyHeaderRequest.Builder subBuilder = - null; - if (targetTcpProxiesSetProxyHeaderRequestResource_ != null) { - subBuilder = targetTcpProxiesSetProxyHeaderRequestResource_.toBuilder(); - } - targetTcpProxiesSetProxyHeaderRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetTcpProxiesSetProxyHeaderRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetTcpProxiesSetProxyHeaderRequestResource_); - targetTcpProxiesSetProxyHeaderRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -270443758: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetTcpProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetProxyHeaderTargetTcpProxyRequest_descriptor; @@ -401,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 503065442, targetTcpProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +345,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetTcpProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(503065442, targetTcpProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTargetTcpProxiesSetProxyHeaderRequestResource())) return false; } if (!getTargetTcpProxy().equals(other.getTargetTcpProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -475,7 +396,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_TCP_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetTcpProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -605,17 +526,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest.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 @@ -746,7 +660,7 @@ public Builder mergeFrom( targetTcpProxy_ = other.targetTcpProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -761,19 +675,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetProxyHeaderTargetTcpProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1759666714: + { + input.readMessage( + getTargetTcpProxiesSetProxyHeaderRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1759666714 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -270443758: + { + targetTcpProxy_ = input.readStringRequireUtf8(); + + break; + } // case -270443758 + 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.compute.v1.SetProxyHeaderTargetTcpProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1369,7 +1321,18 @@ public SetProxyHeaderTargetTcpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetProxyHeaderTargetTcpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetQuicOverrideTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetQuicOverrideTargetHttpsProxyRequest.java index 36de160fe065..1a712368b7db 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetQuicOverrideTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetQuicOverrideTargetHttpsProxyRequest.java @@ -56,85 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetQuicOverrideTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 583522066: - { - com.google.cloud.compute.v1.TargetHttpsProxiesSetQuicOverrideRequest.Builder - subBuilder = null; - if (targetHttpsProxiesSetQuicOverrideRequestResource_ != null) { - subBuilder = targetHttpsProxiesSetQuicOverrideRequestResource_.toBuilder(); - } - targetHttpsProxiesSetQuicOverrideRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetHttpsProxiesSetQuicOverrideRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetHttpsProxiesSetQuicOverrideRequestResource_); - targetHttpsProxiesSetQuicOverrideRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetQuicOverrideTargetHttpsProxyRequest_descriptor; @@ -401,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +345,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTargetHttpsProxiesSetQuicOverrideRequestResource())) return false; } if (!getTargetHttpsProxy().equals(other.getTargetHttpsProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -475,7 +396,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_HTTPS_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -607,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetQuicOverrideTargetHttpsProxyRequest.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 @@ -750,7 +664,7 @@ public Builder mergeFrom( targetHttpsProxy_ = other.targetHttpsProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -765,19 +679,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetQuicOverrideTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 583522066: + { + input.readMessage( + getTargetHttpsProxiesSetQuicOverrideRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 583522066 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SetQuicOverrideTargetHttpsProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1377,7 +1329,18 @@ public SetQuicOverrideTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetQuicOverrideTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSchedulingInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSchedulingInstanceRequest.java index 0471c105faa9..edb140aa9e7f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSchedulingInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSchedulingInstanceRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetSchedulingInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -589516086: - { - com.google.cloud.compute.v1.Scheduling.Builder subBuilder = null; - if (schedulingResource_ != null) { - subBuilder = schedulingResource_.toBuilder(); - } - schedulingResource_ = - input.readMessage( - com.google.cloud.compute.v1.Scheduling.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(schedulingResource_); - schedulingResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetSchedulingInstanceRequest_descriptor; @@ -457,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (schedulingResource_ != null) { output.writeMessage(463181401, getSchedulingResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -483,7 +399,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 463181401, getSchedulingResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -510,7 +426,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSchedulingResource().equals(other.getSchedulingResource())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -535,7 +451,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -665,17 +581,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetSchedulingInstanceRequest.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 @@ -807,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetSchedulingInstanceReques zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -822,18 +731,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetSchedulingInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -589516086: + { + input.readMessage( + getSchedulingResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -589516086 + 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.compute.v1.SetSchedulingInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1533,7 +1486,18 @@ public SetSchedulingInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetSchedulingInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSecurityPolicyBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSecurityPolicyBackendServiceRequest.java index 361dff50dccb..6fedf95e14ae 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSecurityPolicyBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSecurityPolicyBackendServiceRequest.java @@ -56,84 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetSecurityPolicyBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1633080194: - { - com.google.cloud.compute.v1.SecurityPolicyReference.Builder subBuilder = null; - if (securityPolicyReferenceResource_ != null) { - subBuilder = securityPolicyReferenceResource_.toBuilder(); - } - securityPolicyReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.SecurityPolicyReference.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(securityPolicyReferenceResource_); - securityPolicyReferenceResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetSecurityPolicyBackendServiceRequest_descriptor; @@ -397,7 +319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 306946058, backendService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +342,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backendService_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(306946058, backendService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -448,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSecurityPolicyReferenceResource().equals(other.getSecurityPolicyReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -471,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + SECURITY_POLICY_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getSecurityPolicyReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -603,17 +525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetSecurityPolicyBackendServiceRequest.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 @@ -743,7 +658,7 @@ public Builder mergeFrom( if (other.hasSecurityPolicyReferenceResource()) { mergeSecurityPolicyReferenceResource(other.getSecurityPolicyReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -758,19 +673,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetSecurityPolicyBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1633080194: + { + input.readMessage( + getSecurityPolicyReferenceResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1633080194 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + 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.compute.v1.SetSecurityPolicyBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1363,7 +1316,18 @@ public SetSecurityPolicyBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetSecurityPolicyBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetServiceAccountInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetServiceAccountInstanceRequest.java index 409766a48543..3e9a6acd9113 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetServiceAccountInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetServiceAccountInstanceRequest.java @@ -56,92 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetServiceAccountInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2090567230: - { - com.google.cloud.compute.v1.InstancesSetServiceAccountRequest.Builder subBuilder = - null; - if (instancesSetServiceAccountRequestResource_ != null) { - subBuilder = instancesSetServiceAccountRequestResource_.toBuilder(); - } - instancesSetServiceAccountRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstancesSetServiceAccountRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instancesSetServiceAccountRequestResource_); - instancesSetServiceAccountRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetServiceAccountInstanceRequest_descriptor; @@ -463,7 +377,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instancesSetServiceAccountRequestResource_ != null) { output.writeMessage(275550008, getInstancesSetServiceAccountRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +403,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 275550008, getInstancesSetServiceAccountRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -518,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -543,7 +457,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -673,17 +587,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetServiceAccountInstanceRequest.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 @@ -820,7 +727,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetServiceAccountInstanceRe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -835,18 +742,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetServiceAccountInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2090567230: + { + input.readMessage( + getInstancesSetServiceAccountRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2090567230 + 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.compute.v1.SetServiceAccountInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1555,7 +1507,18 @@ public SetServiceAccountInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetServiceAccountInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetShieldedInstanceIntegrityPolicyInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetShieldedInstanceIntegrityPolicyInstanceRequest.java index 89a966aadeb9..45c39e4232ec 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetShieldedInstanceIntegrityPolicyInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetShieldedInstanceIntegrityPolicyInstanceRequest.java @@ -57,91 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetShieldedInstanceIntegrityPolicyInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1021611598: - { - com.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy.Builder subBuilder = null; - if (shieldedInstanceIntegrityPolicyResource_ != null) { - subBuilder = shieldedInstanceIntegrityPolicyResource_.toBuilder(); - } - shieldedInstanceIntegrityPolicyResource_ = - input.readMessage( - com.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shieldedInstanceIntegrityPolicyResource_); - shieldedInstanceIntegrityPolicyResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetShieldedInstanceIntegrityPolicyInstanceRequest_descriptor; @@ -464,7 +379,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (shieldedInstanceIntegrityPolicyResource_ != null) { output.writeMessage(409169462, getShieldedInstanceIntegrityPolicyResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -490,7 +405,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 409169462, getShieldedInstanceIntegrityPolicyResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -520,7 +435,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getShieldedInstanceIntegrityPolicyResource())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -545,7 +460,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -683,17 +598,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest.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 @@ -836,7 +744,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -851,20 +759,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1021611598: + { + input.readMessage( + getShieldedInstanceIntegrityPolicyResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1021611598 + 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.compute.v1.SetShieldedInstanceIntegrityPolicyInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1577,8 +1528,19 @@ public SetShieldedInstanceIntegrityPolicyInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetShieldedInstanceIntegrityPolicyInstanceRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesRegionTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesRegionTargetHttpsProxyRequest.java index d6565a032a47..14b75378c1ab 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesRegionTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesRegionTargetHttpsProxyRequest.java @@ -57,94 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetSslCertificatesRegionTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1169420230: - { - com.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequest.Builder - subBuilder = null; - if (regionTargetHttpsProxiesSetSslCertificatesRequestResource_ != null) { - subBuilder = regionTargetHttpsProxiesSetSslCertificatesRequestResource_.toBuilder(); - } - regionTargetHttpsProxiesSetSslCertificatesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionTargetHttpsProxiesSetSslCertificatesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionTargetHttpsProxiesSetSslCertificatesRequestResource_); - regionTargetHttpsProxiesSetSslCertificatesRequestResource_ = - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetSslCertificatesRegionTargetHttpsProxyRequest_descriptor; @@ -470,7 +382,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 390693383, getRegionTargetHttpsProxiesSetSslCertificatesRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -496,7 +408,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 390693383, getRegionTargetHttpsProxiesSetSslCertificatesRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -527,7 +439,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getTargetHttpsProxy().equals(other.getTargetHttpsProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -555,7 +467,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_HTTPS_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -693,17 +605,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest.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 @@ -846,7 +751,7 @@ public Builder mergeFrom( targetHttpsProxy_ = other.targetHttpsProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -861,20 +766,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1169420230: + { + input.readMessage( + getRegionTargetHttpsProxiesSetSslCertificatesRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -1169420230 + 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.compute.v1.SetSslCertificatesRegionTargetHttpsProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1597,7 +1546,19 @@ public SetSslCertificatesRegionTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetSslCertificatesRegionTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesTargetHttpsProxyRequest.java index b16d1e5143d0..619923d82503 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesTargetHttpsProxyRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetSslCertificatesTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1784983266: - { - com.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequest.Builder - subBuilder = null; - if (targetHttpsProxiesSetSslCertificatesRequestResource_ != null) { - subBuilder = targetHttpsProxiesSetSslCertificatesRequestResource_.toBuilder(); - } - targetHttpsProxiesSetSslCertificatesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetHttpsProxiesSetSslCertificatesRequestResource_); - targetHttpsProxiesSetSslCertificatesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetSslCertificatesTargetHttpsProxyRequest_descriptor; @@ -403,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -426,7 +346,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -454,7 +374,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTargetHttpsProxiesSetSslCertificatesRequestResource())) return false; } if (!getTargetHttpsProxy().equals(other.getTargetHttpsProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -477,7 +397,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_HTTPS_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -609,17 +529,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetSslCertificatesTargetHttpsProxyRequest.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 @@ -752,7 +665,7 @@ public Builder mergeFrom( targetHttpsProxy_ = other.targetHttpsProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -767,19 +680,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetSslCertificatesTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1784983266: + { + input.readMessage( + getTargetHttpsProxiesSetSslCertificatesRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 1784983266 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SetSslCertificatesTargetHttpsProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1380,7 +1332,19 @@ public SetSslCertificatesTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetSslCertificatesTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesTargetSslProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesTargetSslProxyRequest.java index 8e9b72bd578f..bfc1f85e5674 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesTargetSslProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslCertificatesTargetSslProxyRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetSslCertificatesTargetSslProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1183526378: - { - com.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequest.Builder - subBuilder = null; - if (targetSslProxiesSetSslCertificatesRequestResource_ != null) { - subBuilder = targetSslProxiesSetSslCertificatesRequestResource_.toBuilder(); - } - targetSslProxiesSetSslCertificatesRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetSslProxiesSetSslCertificatesRequestResource_); - targetSslProxiesSetSslCertificatesRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1584600470: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetSslProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetSslCertificatesTargetSslProxyRequest_descriptor; @@ -402,7 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 338795853, targetSslProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -425,7 +345,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(338795853, targetSslProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -453,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTargetSslProxiesSetSslCertificatesRequestResource())) return false; } if (!getTargetSslProxy().equals(other.getTargetSslProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -476,7 +396,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_SSL_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetSslProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -608,17 +528,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetSslCertificatesTargetSslProxyRequest.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 @@ -751,7 +664,7 @@ public Builder mergeFrom( targetSslProxy_ = other.targetSslProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -766,19 +679,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetSslCertificatesTargetSslProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1183526378: + { + input.readMessage( + getTargetSslProxiesSetSslCertificatesRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1183526378 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1584600470: + { + targetSslProxy_ = input.readStringRequireUtf8(); + + break; + } // case -1584600470 + 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.compute.v1.SetSslCertificatesTargetSslProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1378,7 +1329,18 @@ public SetSslCertificatesTargetSslProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetSslCertificatesTargetSslProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslPolicyTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslPolicyTargetHttpsProxyRequest.java index ef9f0d97aba9..5749266f21f0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslPolicyTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslPolicyTargetHttpsProxyRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetSslPolicyTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1883230690: - { - com.google.cloud.compute.v1.SslPolicyReference.Builder subBuilder = null; - if (sslPolicyReferenceResource_ != null) { - subBuilder = sslPolicyReferenceResource_.toBuilder(); - } - sslPolicyReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.SslPolicyReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sslPolicyReferenceResource_); - sslPolicyReferenceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetSslPolicyTargetHttpsProxyRequest_descriptor; @@ -396,7 +319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sslPolicyReferenceResource_ != null) { output.writeMessage(235403836, getSslPolicyReferenceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -419,7 +342,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 235403836, getSslPolicyReferenceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -446,7 +369,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getTargetHttpsProxy().equals(other.getTargetHttpsProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -469,7 +392,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_HTTPS_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetHttpsProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -599,17 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetSslPolicyTargetHttpsProxyRequest.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 @@ -737,7 +653,7 @@ public Builder mergeFrom( targetHttpsProxy_ = other.targetHttpsProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,19 +668,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetSslPolicyTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1883230690: + { + input.readMessage( + getSslPolicyReferenceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1883230690 + 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.compute.v1.SetSslPolicyTargetHttpsProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1354,7 +1307,18 @@ public SetSslPolicyTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetSslPolicyTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslPolicyTargetSslProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslPolicyTargetSslProxyRequest.java index e8b86b29fb66..23775afda62e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslPolicyTargetSslProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetSslPolicyTargetSslProxyRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetSslPolicyTargetSslProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1883230690: - { - com.google.cloud.compute.v1.SslPolicyReference.Builder subBuilder = null; - if (sslPolicyReferenceResource_ != null) { - subBuilder = sslPolicyReferenceResource_.toBuilder(); - } - sslPolicyReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.SslPolicyReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sslPolicyReferenceResource_); - sslPolicyReferenceResource_ = subBuilder.buildPartial(); - } - - break; - } - case -1584600470: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetSslProxy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetSslPolicyTargetSslProxyRequest_descriptor; @@ -395,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 338795853, targetSslProxy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -418,7 +341,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(targetSslProxy_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(338795853, targetSslProxy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -445,7 +368,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getTargetSslProxy().equals(other.getTargetSslProxy())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -468,7 +391,7 @@ public int hashCode() { } hash = (37 * hash) + TARGET_SSL_PROXY_FIELD_NUMBER; hash = (53 * hash) + getTargetSslProxy().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -598,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetSslPolicyTargetSslProxyRequest.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 @@ -735,7 +651,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetSslPolicyTargetSslProxyR targetSslProxy_ = other.targetSslProxy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -750,19 +666,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetSslPolicyTargetSslProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1883230690: + { + input.readMessage( + getSslPolicyReferenceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1883230690 + case -1584600470: + { + targetSslProxy_ = input.readStringRequireUtf8(); + + break; + } // case -1584600470 + 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.compute.v1.SetSslPolicyTargetSslProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1351,7 +1304,18 @@ public SetSslPolicyTargetSslProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetSslPolicyTargetSslProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTagsInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTagsInstanceRequest.java index 7425cacc0d9f..52e6c0e19580 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTagsInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTagsInstanceRequest.java @@ -55,89 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetTagsInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1643484254: - { - com.google.cloud.compute.v1.Tags.Builder subBuilder = null; - if (tagsResource_ != null) { - subBuilder = tagsResource_.toBuilder(); - } - tagsResource_ = - input.readMessage(com.google.cloud.compute.v1.Tags.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tagsResource_); - tagsResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetTagsInstanceRequest_descriptor; @@ -456,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (tagsResource_ != null) { output.writeMessage(331435380, getTagsResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -481,7 +398,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(331435380, getTagsResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -508,7 +425,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTagsResource().equals(other.getTagsResource())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -533,7 +450,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -662,17 +579,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetTagsInstanceRequest.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 @@ -804,7 +714,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetTagsInstanceRequest othe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -819,18 +729,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetTagsInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1643484254: + { + input.readMessage(getTagsResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1643484254 + 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.compute.v1.SetTagsInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1529,7 +1482,18 @@ public SetTagsInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetTagsInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetForwardingRuleRequest.java index 8a0d5fdba91e..88737bfbed4f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetForwardingRuleRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetTargetForwardingRuleRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2135255054: - { - java.lang.String s = input.readStringRequireUtf8(); - - forwardingRule_ = s; - break; - } - case -105193598: - { - com.google.cloud.compute.v1.TargetReference.Builder subBuilder = null; - if (targetReferenceResource_ != null) { - subBuilder = targetReferenceResource_.toBuilder(); - } - targetReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetReferenceResource_); - targetReferenceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetTargetForwardingRuleRequest_descriptor; @@ -459,7 +375,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetReferenceResource_ != null) { output.writeMessage(523721712, getTargetReferenceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -485,7 +401,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 523721712, getTargetReferenceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -512,7 +428,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetReferenceResource()) { if (!getTargetReferenceResource().equals(other.getTargetReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -537,7 +453,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -667,17 +583,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetTargetForwardingRuleRequest.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 @@ -809,7 +718,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetTargetForwardingRuleRequ if (other.hasTargetReferenceResource()) { mergeTargetReferenceResource(other.getTargetReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -824,18 +733,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetTargetForwardingRuleRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2135255054: + { + forwardingRule_ = input.readStringRequireUtf8(); + + break; + } // case -2135255054 + case -105193598: + { + input.readMessage( + getTargetReferenceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -105193598 + 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.compute.v1.SetTargetForwardingRuleRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1489,18 @@ public SetTargetForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetTargetForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetGlobalForwardingRuleRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetGlobalForwardingRuleRequest.java index b3d3d42697d3..54439832eb49 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetGlobalForwardingRuleRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetGlobalForwardingRuleRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetTargetGlobalForwardingRuleRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2135255054: - { - java.lang.String s = input.readStringRequireUtf8(); - - forwardingRule_ = s; - break; - } - case -105193598: - { - com.google.cloud.compute.v1.TargetReference.Builder subBuilder = null; - if (targetReferenceResource_ != null) { - subBuilder = targetReferenceResource_.toBuilder(); - } - targetReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.TargetReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(targetReferenceResource_); - targetReferenceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetTargetGlobalForwardingRuleRequest_descriptor; @@ -396,7 +319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (targetReferenceResource_ != null) { output.writeMessage(523721712, getTargetReferenceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -419,7 +342,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 523721712, getTargetReferenceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -445,7 +368,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTargetReferenceResource()) { if (!getTargetReferenceResource().equals(other.getTargetReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -468,7 +391,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTargetReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -598,17 +521,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest.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 @@ -736,7 +652,7 @@ public Builder mergeFrom( if (other.hasTargetReferenceResource()) { mergeTargetReferenceResource(other.getTargetReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -751,19 +667,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetTargetGlobalForwardingRuleRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2135255054: + { + forwardingRule_ = input.readStringRequireUtf8(); + + break; + } // case -2135255054 + case -105193598: + { + input.readMessage( + getTargetReferenceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -105193598 + 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.compute.v1.SetTargetGlobalForwardingRuleRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1350,7 +1303,18 @@ public SetTargetGlobalForwardingRuleRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetTargetGlobalForwardingRuleRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetPoolsInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetPoolsInstanceGroupManagerRequest.java index 768ae6afd14d..00775e87525d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetPoolsInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetPoolsInstanceGroupManagerRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetTargetPoolsInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = s; - break; - } - case -2045765566: - { - com.google.cloud.compute.v1.InstanceGroupManagersSetTargetPoolsRequest.Builder - subBuilder = null; - if (instanceGroupManagersSetTargetPoolsRequestResource_ != null) { - subBuilder = instanceGroupManagersSetTargetPoolsRequestResource_.toBuilder(); - } - instanceGroupManagersSetTargetPoolsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagersSetTargetPoolsRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagersSetTargetPoolsRequestResource_); - instanceGroupManagersSetTargetPoolsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetTargetPoolsInstanceGroupManagerRequest_descriptor; @@ -469,7 +382,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instanceGroupManagersSetTargetPoolsRequestResource_ != null) { output.writeMessage(281150216, getInstanceGroupManagersSetTargetPoolsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -497,7 +410,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 281150216, getInstanceGroupManagersSetTargetPoolsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -526,7 +439,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -551,7 +464,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -683,17 +596,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest.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 @@ -833,7 +739,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -848,19 +754,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetTargetPoolsInstanceGroupManagerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + case -2045765566: + { + input.readMessage( + getInstanceGroupManagersSetTargetPoolsRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case -2045765566 + 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.compute.v1.SetTargetPoolsInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1582,7 +1533,19 @@ public SetTargetPoolsInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetTargetPoolsInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetPoolsRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetPoolsRegionInstanceGroupManagerRequest.java index dbd72a929264..aa0d685228f7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetPoolsRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetTargetPoolsRegionInstanceGroupManagerRequest.java @@ -57,94 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetTargetPoolsRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 629877738: - { - com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequest.Builder - subBuilder = null; - if (regionInstanceGroupManagersSetTargetPoolsRequestResource_ != null) { - subBuilder = regionInstanceGroupManagersSetTargetPoolsRequestResource_.toBuilder(); - } - regionInstanceGroupManagersSetTargetPoolsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupManagersSetTargetPoolsRequest - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupManagersSetTargetPoolsRequestResource_); - regionInstanceGroupManagersSetTargetPoolsRequestResource_ = - subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetTargetPoolsRegionInstanceGroupManagerRequest_descriptor; @@ -471,7 +383,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -499,7 +411,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -530,7 +442,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -557,7 +469,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -695,17 +607,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetTargetPoolsRegionInstanceGroupManagerRequest.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 @@ -848,7 +753,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -863,20 +768,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetTargetPoolsRegionInstanceGroupManagerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 629877738: + { + input.readMessage( + getRegionInstanceGroupManagersSetTargetPoolsRequestResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 629877738 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.SetTargetPoolsRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1603,7 +1552,19 @@ public SetTargetPoolsRegionInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetTargetPoolsRegionInstanceGroupManagerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapRegionTargetHttpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapRegionTargetHttpProxyRequest.java index 1203ad1c6e1f..5a600ec55801 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapRegionTargetHttpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapRegionTargetHttpProxyRequest.java @@ -57,90 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetUrlMapRegionTargetHttpProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1654979370: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1105356630: - { - com.google.cloud.compute.v1.UrlMapReference.Builder subBuilder = null; - if (urlMapReferenceResource_ != null) { - subBuilder = urlMapReferenceResource_.toBuilder(); - } - urlMapReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.UrlMapReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapReferenceResource_); - urlMapReferenceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetUrlMapRegionTargetHttpProxyRequest_descriptor; @@ -460,7 +376,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (urlMapReferenceResource_ != null) { output.writeMessage(398701333, getUrlMapReferenceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +402,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 398701333, getUrlMapReferenceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -513,7 +429,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMapReferenceResource()) { if (!getUrlMapReferenceResource().equals(other.getUrlMapReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -538,7 +454,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -670,17 +586,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest.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 @@ -815,7 +724,7 @@ public Builder mergeFrom( if (other.hasUrlMapReferenceResource()) { mergeUrlMapReferenceResource(other.getUrlMapReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -830,19 +739,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetUrlMapRegionTargetHttpProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1654979370: + { + targetHttpProxy_ = input.readStringRequireUtf8(); + + break; + } // case 1654979370 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1105356630: + { + input.readMessage( + getUrlMapReferenceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1105356630 + 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.compute.v1.SetUrlMapRegionTargetHttpProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1545,7 +1497,18 @@ public SetUrlMapRegionTargetHttpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetUrlMapRegionTargetHttpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapRegionTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapRegionTargetHttpsProxyRequest.java index a25840a9b14f..5960d56d0243 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapRegionTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapRegionTargetHttpsProxyRequest.java @@ -57,90 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetUrlMapRegionTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1105356630: - { - com.google.cloud.compute.v1.UrlMapReference.Builder subBuilder = null; - if (urlMapReferenceResource_ != null) { - subBuilder = urlMapReferenceResource_.toBuilder(); - } - urlMapReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.UrlMapReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapReferenceResource_); - urlMapReferenceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetUrlMapRegionTargetHttpsProxyRequest_descriptor; @@ -460,7 +376,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (urlMapReferenceResource_ != null) { output.writeMessage(398701333, getUrlMapReferenceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -486,7 +402,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 398701333, getUrlMapReferenceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -513,7 +429,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMapReferenceResource()) { if (!getUrlMapReferenceResource().equals(other.getUrlMapReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -538,7 +454,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -670,17 +586,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest.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 @@ -817,7 +726,7 @@ public Builder mergeFrom( if (other.hasUrlMapReferenceResource()) { mergeUrlMapReferenceResource(other.getUrlMapReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -832,19 +741,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1105356630: + { + input.readMessage( + getUrlMapReferenceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1105356630 + 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.compute.v1.SetUrlMapRegionTargetHttpsProxyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1547,7 +1499,18 @@ public SetUrlMapRegionTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetUrlMapRegionTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapTargetHttpProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapTargetHttpProxyRequest.java index 571afb340940..98463dd97e77 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapTargetHttpProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapTargetHttpProxyRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetUrlMapTargetHttpProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1654979370: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1105356630: - { - com.google.cloud.compute.v1.UrlMapReference.Builder subBuilder = null; - if (urlMapReferenceResource_ != null) { - subBuilder = urlMapReferenceResource_.toBuilder(); - } - urlMapReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.UrlMapReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapReferenceResource_); - urlMapReferenceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetUrlMapTargetHttpProxyRequest_descriptor; @@ -395,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (urlMapReferenceResource_ != null) { output.writeMessage(398701333, getUrlMapReferenceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -418,7 +341,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 398701333, getUrlMapReferenceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +367,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMapReferenceResource()) { if (!getUrlMapReferenceResource().equals(other.getUrlMapReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -467,7 +390,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -597,17 +520,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetUrlMapTargetHttpProxyRequest.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 @@ -732,7 +648,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetUrlMapTargetHttpProxyReq if (other.hasUrlMapReferenceResource()) { mergeUrlMapReferenceResource(other.getUrlMapReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -747,18 +663,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetUrlMapTargetHttpProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1654979370: + { + targetHttpProxy_ = input.readStringRequireUtf8(); + + break; + } // case 1654979370 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1105356630: + { + input.readMessage( + getUrlMapReferenceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1105356630 + 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.compute.v1.SetUrlMapTargetHttpProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1343,7 +1297,18 @@ public SetUrlMapTargetHttpProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetUrlMapTargetHttpProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapTargetHttpsProxyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapTargetHttpsProxyRequest.java index 2291bd6ac0c3..e7fa3c82903a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapTargetHttpsProxyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUrlMapTargetHttpsProxyRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetUrlMapTargetHttpsProxyRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 418693986: - { - java.lang.String s = input.readStringRequireUtf8(); - - targetHttpsProxy_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1105356630: - { - com.google.cloud.compute.v1.UrlMapReference.Builder subBuilder = null; - if (urlMapReferenceResource_ != null) { - subBuilder = urlMapReferenceResource_.toBuilder(); - } - urlMapReferenceResource_ = - input.readMessage( - com.google.cloud.compute.v1.UrlMapReference.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapReferenceResource_); - urlMapReferenceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetUrlMapTargetHttpsProxyRequest_descriptor; @@ -395,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (urlMapReferenceResource_ != null) { output.writeMessage(398701333, getUrlMapReferenceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -418,7 +341,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 398701333, getUrlMapReferenceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -444,7 +367,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMapReferenceResource()) { if (!getUrlMapReferenceResource().equals(other.getUrlMapReferenceResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -467,7 +390,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_REFERENCE_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapReferenceResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -597,17 +520,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetUrlMapTargetHttpsProxyRequest.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 @@ -734,7 +650,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetUrlMapTargetHttpsProxyRe if (other.hasUrlMapReferenceResource()) { mergeUrlMapReferenceResource(other.getUrlMapReferenceResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,18 +665,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetUrlMapTargetHttpsProxyRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 418693986: + { + targetHttpsProxy_ = input.readStringRequireUtf8(); + + break; + } // case 418693986 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1105356630: + { + input.readMessage( + getUrlMapReferenceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1105356630 + 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.compute.v1.SetUrlMapTargetHttpsProxyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1346,7 +1300,18 @@ public SetUrlMapTargetHttpsProxyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetUrlMapTargetHttpsProxyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUsageExportBucketProjectRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUsageExportBucketProjectRequest.java index 6f1d08ef175e..c0f0c06d7586 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUsageExportBucketProjectRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SetUsageExportBucketProjectRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetUsageExportBucketProjectRequest( - 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 162083674: - { - com.google.cloud.compute.v1.UsageExportLocation.Builder subBuilder = null; - if (usageExportLocationResource_ != null) { - subBuilder = usageExportLocationResource_.toBuilder(); - } - usageExportLocationResource_ = - input.readMessage( - com.google.cloud.compute.v1.UsageExportLocation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(usageExportLocationResource_); - usageExportLocationResource_ = subBuilder.buildPartial(); - } - - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SetUsageExportBucketProjectRequest_descriptor; @@ -335,7 +265,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -355,7 +285,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -381,7 +311,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUsageExportLocationResource().equals(other.getUsageExportLocationResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -402,7 +332,7 @@ public int hashCode() { hash = (37 * hash) + USAGE_EXPORT_LOCATION_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUsageExportLocationResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -532,17 +462,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SetUsageExportBucketProjectRequest.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 @@ -662,7 +585,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SetUsageExportBucketProject if (other.hasUsageExportLocationResource()) { mergeUsageExportLocationResource(other.getUsageExportLocationResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -677,19 +600,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SetUsageExportBucketProjectRequest 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 162083674: + { + input.readMessage( + getUsageExportLocationResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 162083674 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SetUsageExportBucketProjectRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1174,7 +1128,18 @@ public SetUsageExportBucketProjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetUsageExportBucketProjectRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShareSettings.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShareSettings.java index f5001f86ae70..8ceba1f0c3b4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShareSettings.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShareSettings.java @@ -52,70 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ShareSettings( - 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 1073699250: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - projectMap_ = - com.google.protobuf.MapField.newMapField( - ProjectMapDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.ShareSettingsProjectConfig> - projectMap__ = - input.readMessage( - ProjectMapDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - projectMap_.getMutableMap().put(projectMap__.getKey(), projectMap__.getValue()); - break; - } - case -1418699566: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - shareType_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ShareSettings_descriptor; @@ -551,7 +487,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 359533466, shareType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -576,7 +512,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(359533466, shareType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -597,7 +533,7 @@ public boolean equals(final java.lang.Object obj) { if (hasShareType()) { if (!getShareType().equals(other.getShareType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -616,7 +552,7 @@ public int hashCode() { hash = (37 * hash) + SHARE_TYPE_FIELD_NUMBER; hash = (53 * hash) + getShareType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -765,17 +701,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.ShareSettings.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 @@ -875,7 +804,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ShareSettings other) { shareType_ = other.shareType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -890,17 +819,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ShareSettings 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 1073699250: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.ShareSettingsProjectConfig> + projectMap__ = + input.readMessage( + ProjectMapDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableProjectMap() + .getMutableMap() + .put(projectMap__.getKey(), projectMap__.getValue()); + break; + } // case 1073699250 + case -1418699566: + { + shareType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1418699566 + 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.compute.v1.ShareSettings) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1252,7 +1214,18 @@ public ShareSettings parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ShareSettings(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShareSettingsProjectConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShareSettingsProjectConfig.java index 58f1ad138de4..390d77c1eb2a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShareSettingsProjectConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShareSettingsProjectConfig.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ShareSettingsProjectConfig( - 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 1420107786: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - projectId_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ShareSettingsProjectConfig_descriptor; @@ -196,7 +149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 177513473, projectId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -208,7 +161,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(177513473, projectId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -228,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { if (hasProjectId()) { if (!getProjectId().equals(other.getProjectId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -243,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + PROJECT_ID_FIELD_NUMBER; hash = (53 * hash) + getProjectId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -373,17 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ShareSettingsProjectConfig.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 @@ -480,7 +426,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ShareSettingsProjectConfig projectId_ = other.projectId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -495,18 +441,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ShareSettingsProjectConfig 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 1420107786: + { + projectId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1420107786 + 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.compute.v1.ShareSettingsProjectConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -664,7 +629,18 @@ public ShareSettingsProjectConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ShareSettingsProjectConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceConfig.java index 834a39f52229..daee78b29ad3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceConfig.java @@ -50,64 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ShieldedInstanceConfig( - 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 988549104: - { - bitField0_ |= 0x00000002; - enableSecureBoot_ = input.readBool(); - break; - } - case 1454871480: - { - bitField0_ |= 0x00000004; - enableVtpm_ = input.readBool(); - break; - } - case -1022399056: - { - bitField0_ |= 0x00000001; - enableIntegrityMonitoring_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ShieldedInstanceConfig_descriptor; @@ -246,7 +188,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(409071030, enableIntegrityMonitoring_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -266,7 +208,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeBoolSize( 409071030, enableIntegrityMonitoring_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -294,7 +236,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEnableVtpm()) { if (getEnableVtpm() != other.getEnableVtpm()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -317,7 +259,7 @@ public int hashCode() { hash = (37 * hash) + ENABLE_VTPM_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableVtpm()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -446,17 +388,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ShieldedInstanceConfig.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 @@ -569,7 +504,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ShieldedInstanceConfig othe if (other.hasEnableVtpm()) { setEnableVtpm(other.getEnableVtpm()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -584,18 +519,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ShieldedInstanceConfig 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 988549104: + { + enableSecureBoot_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 988549104 + case 1454871480: + { + enableVtpm_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 1454871480 + case -1022399056: + { + enableIntegrityMonitoring_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -1022399056 + 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.compute.v1.ShieldedInstanceConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -834,7 +800,18 @@ public ShieldedInstanceConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ShieldedInstanceConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIdentity.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIdentity.java index f7c325188d92..cd071f708fca 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIdentity.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIdentity.java @@ -52,87 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ShieldedInstanceIdentity( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case -1727381206: - { - com.google.cloud.compute.v1.ShieldedInstanceIdentityEntry.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = signingKey_.toBuilder(); - } - signingKey_ = - input.readMessage( - com.google.cloud.compute.v1.ShieldedInstanceIdentityEntry.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(signingKey_); - signingKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -388817638: - { - com.google.cloud.compute.v1.ShieldedInstanceIdentityEntry.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = encryptionKey_.toBuilder(); - } - encryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.ShieldedInstanceIdentityEntry.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(encryptionKey_); - encryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ShieldedInstanceIdentity_descriptor; @@ -347,7 +266,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(488268707, getEncryptionKey()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -366,7 +285,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(488268707, getEncryptionKey()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -394,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSigningKey()) { if (!getSigningKey().equals(other.getSigningKey())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -417,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + SIGNING_KEY_FIELD_NUMBER; hash = (53 * hash) + getSigningKey().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -690,7 +609,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ShieldedInstanceIdentity ot if (other.hasSigningKey()) { mergeSigningKey(other.getSigningKey()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -705,18 +624,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ShieldedInstanceIdentity 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26336418 + case -1727381206: + { + input.readMessage(getSigningKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -1727381206 + case -388817638: + { + input.readMessage(getEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -388817638 + 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.compute.v1.ShieldedInstanceIdentity) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1293,7 +1243,18 @@ public ShieldedInstanceIdentity parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ShieldedInstanceIdentity(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIdentityEntry.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIdentityEntry.java index 1de0f1023e3c..bc9c569a554f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIdentityEntry.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIdentityEntry.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ShieldedInstanceIdentityEntry( - 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 -1823383774: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - ekPub_ = s; - break; - } - case -693538582: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - ekCert_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ShieldedInstanceIdentityEntry_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 450178589, ekCert_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(450178589, ekCert_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEkPub()) { if (!getEkPub().equals(other.getEkPub())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +275,7 @@ public int hashCode() { hash = (37 * hash) + EK_PUB_FIELD_NUMBER; hash = (53 * hash) + getEkPub().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,17 +405,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ShieldedInstanceIdentityEntry.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 +516,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ShieldedInstanceIdentityEnt ekPub_ = other.ekPub_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -592,18 +531,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ShieldedInstanceIdentityEntry 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 -1823383774: + { + ekPub_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1823383774 + case -693538582: + { + ekCert_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -693538582 + 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.compute.v1.ShieldedInstanceIdentityEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -881,7 +845,18 @@ public ShieldedInstanceIdentityEntry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ShieldedInstanceIdentityEntry(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIntegrityPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIntegrityPolicy.java index bd63505c5d53..dab97ab009c6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIntegrityPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ShieldedInstanceIntegrityPolicy.java @@ -51,52 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ShieldedInstanceIntegrityPolicy( - 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 1963921720: - { - bitField0_ |= 0x00000001; - updateAutoLearnPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ShieldedInstanceIntegrityPolicy_descriptor; @@ -163,7 +117,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(245490215, updateAutoLearnPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -176,7 +130,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(245490215, updateAutoLearnPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -196,7 +150,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateAutoLearnPolicy()) { if (getUpdateAutoLearnPolicy() != other.getUpdateAutoLearnPolicy()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -211,7 +165,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_AUTO_LEARN_POLICY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUpdateAutoLearnPolicy()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -341,17 +295,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy.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 @@ -446,7 +393,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ShieldedInstanceIntegrityPo if (other.hasUpdateAutoLearnPolicy()) { setUpdateAutoLearnPolicy(other.getUpdateAutoLearnPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -461,18 +408,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ShieldedInstanceIntegrityPolicy 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 1963921720: + { + updateAutoLearnPolicy_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case 1963921720 + 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.compute.v1.ShieldedInstanceIntegrityPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -577,7 +543,18 @@ public ShieldedInstanceIntegrityPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ShieldedInstanceIntegrityPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SignedUrlKey.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SignedUrlKey.java index e944962c92f4..4a81d2320a13 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SignedUrlKey.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SignedUrlKey.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SignedUrlKey( - 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 -287456422: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - keyName_ = s; - break; - } - case -262112118: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - keyValue_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SignedUrlKey_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 504106897, keyValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(504106897, keyValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (hasKeyValue()) { if (!getKeyValue().equals(other.getKeyValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +274,7 @@ public int hashCode() { hash = (37 * hash) + KEY_VALUE_FIELD_NUMBER; hash = (53 * hash) + getKeyValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -457,17 +403,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SignedUrlKey.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 @@ -574,7 +513,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SignedUrlKey other) { keyValue_ = other.keyValue_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -589,17 +528,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SignedUrlKey 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 -287456422: + { + keyName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -287456422 + case -262112118: + { + keyValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -262112118 + 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.compute.v1.SignedUrlKey) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -877,7 +842,18 @@ public SignedUrlKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SignedUrlKey(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventInstanceRequest.java index a53585020e64..8a46129a34ee 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SimulateMaintenanceEventInstanceRequest.java @@ -56,66 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SimulateMaintenanceEventInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SimulateMaintenanceEventInstanceRequest_descriptor; @@ -309,7 +249,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -327,7 +267,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -346,7 +286,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstance().equals(other.getInstance())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -363,7 +303,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -495,17 +435,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest.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 @@ -614,7 +547,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,19 +562,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SimulateMaintenanceEventInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SimulateMaintenanceEventInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1017,7 +980,18 @@ public SimulateMaintenanceEventInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SimulateMaintenanceEventInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Snapshot.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Snapshot.java index aa86533c5c8f..c90bc03d3d23 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Snapshot.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Snapshot.java @@ -70,299 +70,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Snapshot( - 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 26840: - { - bitField0_ |= 0x00000100; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - creationTimestamp_ = s; - break; - } - case 346676210: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00008000) != 0)) { - subBuilder = snapshotEncryptionKey_.toBuilder(); - } - snapshotEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(snapshotEncryptionKey_); - snapshotEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00008000; - break; - } - case 363861312: - { - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - licenseCodes_ = newLongList(); - mutable_bitField0_ |= 0x00001000; - } - licenseCodes_.addLong(input.readInt64()); - break; - } - case 363861314: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00001000) != 0) && input.getBytesUntilLimit() > 0) { - licenseCodes_ = newLongList(); - mutable_bitField0_ |= 0x00001000; - } - while (input.getBytesUntilLimit() > 0) { - licenseCodes_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 549153354: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - chainName_ = s; - break; - } - case 563912378: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00200000; - sourceSnapshotSchedulePolicyId_ = s; - break; - } - case 994797226: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - snapshotType_ = s; - break; - } - case 1003200616: - { - bitField0_ |= 0x00000008; - creationSizeBytes_ = input.readInt64(); - break; - } - case 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - labelFingerprint_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00400000; - status_ = s; - break; - } - case 1886050330: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00100000; - sourceSnapshotSchedulePolicy_ = s; - break; - } - case -1872541030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - architecture_ = s; - break; - } - case -1764857416: - { - bitField0_ |= 0x00000040; - diskSizeGb_ = input.readInt64(); - break; - } - case -1670925102: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x10000000) != 0)) { - storageLocations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x10000000; - } - storageLocations_.add(s); - break; - } - case -1593826670: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00002000) != 0)) { - licenses_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00002000; - } - licenses_.add(s); - break; - } - case -1490811254: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - locationHint_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - description_ = s; - break; - } - case -897913544: - { - bitField0_ |= 0x00800000; - storageBytes_ = input.readInt64(); - break; - } - case -814534752: - { - bitField0_ |= 0x00000080; - downloadBytes_ = input.readInt64(); - break; - } - case -680936950: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - sourceDisk_ = s; - break; - } - case -661440822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; - sourceDiskId_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - selfLink_ = s; - break; - } - case -583589184: - { - bitField0_ |= 0x00000002; - autoCreated_ = input.readBool(); - break; - } - case -447253160: - { - bitField0_ |= 0x00002000; - satisfiesPzs_ = input.readBool(); - break; - } - case -369054638: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x01000000; - storageBytesStatus_ = s; - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000800; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case -42958070: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00040000) != 0)) { - subBuilder = sourceDiskEncryptionKey_.toBuilder(); - } - sourceDiskEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sourceDiskEncryptionKey_); - sourceDiskEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00040000; - 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_ & 0x00001000) != 0)) { - licenseCodes_.makeImmutable(); // C - } - if (((mutable_bitField0_ & 0x10000000) != 0)) { - storageLocations_ = storageLocations_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00002000) != 0)) { - licenses_ = licenses_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Snapshot_descriptor; @@ -2803,7 +2510,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00040000) != 0)) { output.writeMessage(531501153, getSourceDiskEncryptionKey()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2937,7 +2644,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 531501153, getSourceDiskEncryptionKey()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3059,7 +2766,7 @@ public boolean equals(final java.lang.Object obj) { if (!getStorageBytesStatus().equals(other.getStorageBytesStatus())) return false; } if (!getStorageLocationsList().equals(other.getStorageLocationsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3186,7 +2893,7 @@ public int hashCode() { hash = (37 * hash) + STORAGE_LOCATIONS_FIELD_NUMBER; hash = (53 * hash) + getStorageLocationsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3759,7 +3466,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Snapshot other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3774,17 +3481,226 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Snapshot 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 244202930 + case 346676210: + { + input.readMessage( + getSnapshotEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00040000; + break; + } // case 346676210 + case 363861312: + { + long v = input.readInt64(); + ensureLicenseCodesIsMutable(); + licenseCodes_.addLong(v); + break; + } // case 363861312 + case 363861314: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureLicenseCodesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + licenseCodes_.addLong(input.readInt64()); + } + input.popLimit(limit); + break; + } // case 363861314 + case 549153354: + { + chainName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 549153354 + case 563912378: + { + sourceSnapshotSchedulePolicyId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x01000000; + break; + } // case 563912378 + case 994797226: + { + snapshotType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case 994797226 + case 1003200616: + { + creationSizeBytes_ = input.readInt64(); + bitField0_ |= 0x00000008; + break; + } // case 1003200616 + case 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1424998602 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x02000000; + break; + } // case 1450082194 + case 1886050330: + { + sourceSnapshotSchedulePolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case 1886050330 + case -1872541030: + { + architecture_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1872541030 + case -1764857416: + { + diskSizeGb_ = input.readInt64(); + bitField0_ |= 0x00000040; + break; + } // case -1764857416 + case -1670925102: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureStorageLocationsIsMutable(); + storageLocations_.add(s); + break; + } // case -1670925102 + case -1593826670: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLicensesIsMutable(); + licenses_.add(s); + break; + } // case -1593826670 + case -1490811254: + { + locationHint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -1490811254 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -911466526 + case -897913544: + { + storageBytes_ = input.readInt64(); + bitField0_ |= 0x04000000; + break; + } // case -897913544 + case -814534752: + { + downloadBytes_ = input.readInt64(); + bitField0_ |= 0x00000080; + break; + } // case -814534752 + case -680936950: + { + sourceDisk_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00100000; + break; + } // case -680936950 + case -661440822: + { + sourceDiskId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case -661440822 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case -645248918 + case -583589184: + { + autoCreated_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -583589184 + case -447253160: + { + satisfiesPzs_ = input.readBool(); + bitField0_ |= 0x00010000; + break; + } // case -447253160 + case -369054638: + { + storageBytesStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x08000000; + break; + } // case -369054638 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + case -42958070: + { + input.readMessage( + getSourceDiskEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00200000; + break; + } // case -42958070 + 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.compute.v1.Snapshot) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7275,7 +7191,18 @@ public Snapshot parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Snapshot(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SnapshotList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SnapshotList.java index 4d4a973b9cd3..d09fae576a2c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SnapshotList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SnapshotList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SnapshotList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Snapshot.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SnapshotList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -823,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SnapshotList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SnapshotList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Snapshot m = + input.readMessage( + com.google.cloud.compute.v1.Snapshot.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.SnapshotList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2078,7 +2038,18 @@ public SnapshotList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SnapshotList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceDiskEncryptionKey.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceDiskEncryptionKey.java index 560f2dc64824..9c5041efb72b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceDiskEncryptionKey.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceDiskEncryptionKey.java @@ -51,70 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SourceDiskEncryptionKey( - 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 -2121681878: - { - com.google.cloud.compute.v1.CustomerEncryptionKey.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = diskEncryptionKey_.toBuilder(); - } - diskEncryptionKey_ = - input.readMessage( - com.google.cloud.compute.v1.CustomerEncryptionKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(diskEncryptionKey_); - diskEncryptionKey_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -680936950: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - sourceDisk_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SourceDiskEncryptionKey_descriptor; @@ -269,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 451753793, sourceDisk_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +222,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(451753793, sourceDisk_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +246,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceDisk()) { if (!getSourceDisk().equals(other.getSourceDisk())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +265,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_DISK_FIELD_NUMBER; hash = (53 * hash) + getSourceDisk().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -583,7 +519,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SourceDiskEncryptionKey oth sourceDisk_ = other.sourceDisk_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -598,18 +534,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SourceDiskEncryptionKey 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 -2121681878: + { + input.readMessage( + getDiskEncryptionKeyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case -2121681878 + case -680936950: + { + sourceDisk_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -680936950 + 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.compute.v1.SourceDiskEncryptionKey) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -974,7 +936,18 @@ public SourceDiskEncryptionKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SourceDiskEncryptionKey(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceInstanceParams.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceInstanceParams.java index c4a6bb7e8167..1cbc2f2446f7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceInstanceParams.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceInstanceParams.java @@ -52,62 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SourceInstanceParams( - 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 1884644986: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - diskConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - diskConfigs_.add( - input.readMessage( - com.google.cloud.compute.v1.DiskInstantiationConfig.parser(), - extensionRegistry)); - 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)) { - diskConfigs_ = java.util.Collections.unmodifiableList(diskConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SourceInstanceParams_descriptor; @@ -215,7 +159,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < diskConfigs_.size(); i++) { output.writeMessage(235580623, diskConfigs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -228,7 +172,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(235580623, diskConfigs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -245,7 +189,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.SourceInstanceParams) obj; if (!getDiskConfigsList().equals(other.getDiskConfigsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -260,7 +204,7 @@ public int hashCode() { hash = (37 * hash) + DISK_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + getDiskConfigsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -389,19 +333,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SourceInstanceParams.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) { - getDiskConfigsFieldBuilder(); - } } @java.lang.Override @@ -409,10 +344,11 @@ public Builder clear() { super.clear(); if (diskConfigsBuilder_ == null) { diskConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + diskConfigs_ = null; diskConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -527,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SourceInstanceParams other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -542,17 +478,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SourceInstanceParams 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 1884644986: + { + com.google.cloud.compute.v1.DiskInstantiationConfig m = + input.readMessage( + com.google.cloud.compute.v1.DiskInstantiationConfig.parser(), + extensionRegistry); + if (diskConfigsBuilder_ == null) { + ensureDiskConfigsIsMutable(); + diskConfigs_.add(m); + } else { + diskConfigsBuilder_.addMessage(m); + } + break; + } // case 1884644986 + 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.compute.v1.SourceInstanceParams) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -967,7 +931,18 @@ public SourceInstanceParams parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SourceInstanceParams(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceInstanceProperties.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceInstanceProperties.java index 8a72f48a9523..0961a2eed82f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceInstanceProperties.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SourceInstanceProperties.java @@ -59,205 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SourceInstanceProperties( - 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 28418250: - { - com.google.cloud.compute.v1.Tags.Builder subBuilder = null; - if (((bitField0_ & 0x00000100) != 0)) { - subBuilder = tags_.toBuilder(); - } - tags_ = - input.readMessage(com.google.cloud.compute.v1.Tags.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tags_); - tags_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000100; - break; - } - case 421881946: - { - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - networkInterfaces_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000400; - } - networkInterfaces_.add( - input.readMessage( - com.google.cloud.compute.v1.NetworkInterface.parser(), extensionRegistry)); - break; - } - case 694933882: - { - com.google.cloud.compute.v1.Metadata.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = metadata_.toBuilder(); - } - metadata_ = - input.readMessage( - com.google.cloud.compute.v1.Metadata.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(metadata_); - metadata_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 764752818: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - disks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - disks_.add( - input.readMessage( - com.google.cloud.compute.v1.SavedAttachedDisk.parser(), extensionRegistry)); - break; - } - case 1821688210: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - machineType_ = s; - break; - } - case 1887531794: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - keyRevocationActionType_ = s; - break; - } - case 1943302074: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - minCpuPlatform_ = s; - break; - } - case -2074668670: - { - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - serviceAccounts_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00001000; - } - serviceAccounts_.add( - input.readMessage( - com.google.cloud.compute.v1.ServiceAccount.parser(), extensionRegistry)); - break; - } - case -1201460062: - { - com.google.cloud.compute.v1.Scheduling.Builder subBuilder = null; - if (((bitField0_ & 0x00000080) != 0)) { - subBuilder = scheduling_.toBuilder(); - } - scheduling_ = - input.readMessage( - com.google.cloud.compute.v1.Scheduling.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(scheduling_); - scheduling_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000080; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -630849712: - { - bitField0_ |= 0x00000002; - deletionProtection_ = input.readBool(); - break; - } - case -586206342: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - guestAccelerators_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000010; - } - guestAccelerators_.add( - input.readMessage( - com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry)); - break; - } - case -553116704: - { - bitField0_ |= 0x00000001; - canIpForward_ = input.readBool(); - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000040; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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_ & 0x00000400) != 0)) { - networkInterfaces_ = java.util.Collections.unmodifiableList(networkInterfaces_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - disks_ = java.util.Collections.unmodifiableList(disks_); - } - if (((mutable_bitField0_ & 0x00001000) != 0)) { - serviceAccounts_ = java.util.Collections.unmodifiableList(serviceAccounts_); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - guestAccelerators_ = java.util.Collections.unmodifiableList(guestAccelerators_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SourceInstanceProperties_descriptor; @@ -1378,7 +1179,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1444,7 +1245,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1501,7 +1302,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTags()) { if (!getTags().equals(other.getTags())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1568,7 +1369,7 @@ public int hashCode() { hash = (37 * hash) + TAGS_FIELD_NUMBER; hash = (53 * hash) + getTags().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1749,16 +1550,18 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (disksBuilder_ == null) { disks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + disks_ = null; disksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); if (guestAcceleratorsBuilder_ == null) { guestAccelerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + guestAccelerators_ = null; guestAcceleratorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); keyRevocationActionType_ = ""; bitField0_ = (bitField0_ & ~0x00000020); internalGetMutableLabels().clear(); @@ -1774,10 +1577,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000200); if (networkInterfacesBuilder_ == null) { networkInterfaces_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000400); } else { + networkInterfaces_ = null; networkInterfacesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000400); if (schedulingBuilder_ == null) { scheduling_ = null; } else { @@ -1786,10 +1590,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000800); if (serviceAccountsBuilder_ == null) { serviceAccounts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); } else { + serviceAccounts_ = null; serviceAccountsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00001000); if (tagsBuilder_ == null) { tags_ = null; } else { @@ -2106,7 +1911,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SourceInstanceProperties ot if (other.hasTags()) { mergeTags(other.getTags()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2121,18 +1926,148 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SourceInstanceProperties 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 28418250: + { + input.readMessage(getTagsFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00002000; + break; + } // case 28418250 + case 421881946: + { + com.google.cloud.compute.v1.NetworkInterface m = + input.readMessage( + com.google.cloud.compute.v1.NetworkInterface.parser(), extensionRegistry); + if (networkInterfacesBuilder_ == null) { + ensureNetworkInterfacesIsMutable(); + networkInterfaces_.add(m); + } else { + networkInterfacesBuilder_.addMessage(m); + } + break; + } // case 421881946 + case 694933882: + { + input.readMessage(getMetadataFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000100; + break; + } // case 694933882 + case 764752818: + { + com.google.cloud.compute.v1.SavedAttachedDisk m = + input.readMessage( + com.google.cloud.compute.v1.SavedAttachedDisk.parser(), extensionRegistry); + if (disksBuilder_ == null) { + ensureDisksIsMutable(); + disks_.add(m); + } else { + disksBuilder_.addMessage(m); + } + break; + } // case 764752818 + case 1821688210: + { + machineType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1821688210 + case 1887531794: + { + keyRevocationActionType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1887531794 + case 1943302074: + { + minCpuPlatform_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1943302074 + case -2074668670: + { + com.google.cloud.compute.v1.ServiceAccount m = + input.readMessage( + com.google.cloud.compute.v1.ServiceAccount.parser(), extensionRegistry); + if (serviceAccountsBuilder_ == null) { + ensureServiceAccountsIsMutable(); + serviceAccounts_.add(m); + } else { + serviceAccountsBuilder_.addMessage(m); + } + break; + } // case -2074668670 + case -1201460062: + { + input.readMessage(getSchedulingFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case -1201460062 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -630849712: + { + deletionProtection_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -630849712 + case -586206342: + { + com.google.cloud.compute.v1.AcceleratorConfig m = + input.readMessage( + com.google.cloud.compute.v1.AcceleratorConfig.parser(), extensionRegistry); + if (guestAcceleratorsBuilder_ == null) { + ensureGuestAcceleratorsIsMutable(); + guestAccelerators_.add(m); + } else { + guestAcceleratorsBuilder_.addMessage(m); + } + break; + } // case -586206342 + case -553116704: + { + canIpForward_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -553116704 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.SourceInstanceProperties) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4961,7 +4896,18 @@ public SourceInstanceProperties parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SourceInstanceProperties(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificate.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificate.java index d2edaf431f68..a4f4061026d2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificate.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificate.java @@ -62,171 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslCertificate( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - name_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - type_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - region_ = s; - break; - } - case -1907852038: - { - com.google.cloud.compute.v1.SslCertificateManagedSslCertificate.Builder subBuilder = - null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = managed_.toBuilder(); - } - managed_ = - input.readMessage( - com.google.cloud.compute.v1.SslCertificateManagedSslCertificate.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(managed_); - managed_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case -1660695198: - { - com.google.cloud.compute.v1.SslCertificateSelfManagedSslCertificate.Builder - subBuilder = null; - if (((bitField0_ & 0x00000800) != 0)) { - subBuilder = selfManaged_.toBuilder(); - } - selfManaged_ = - input.readMessage( - com.google.cloud.compute.v1.SslCertificateSelfManagedSslCertificate.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(selfManaged_); - selfManaged_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000800; - break; - } - case -1560671046: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - certificate_ = s; - break; - } - case -1404318438: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - privateKey_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -769437846: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - expireTime_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - selfLink_ = s; - break; - } - case -64504038: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - subjectAlternativeNames_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00001000; - } - subjectAlternativeNames_.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_ & 0x00001000) != 0)) { - subjectAlternativeNames_ = subjectAlternativeNames_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslCertificate_descriptor; @@ -1314,7 +1149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 528807907, subjectAlternativeNames_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1371,7 +1206,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getSubjectAlternativeNamesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1441,7 +1276,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1508,7 +1343,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1905,7 +1740,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SslCertificate other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1920,17 +1755,116 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslCertificate 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 28604882 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1111570338 + case -1907852038: + { + input.readMessage(getManagedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case -1907852038 + case -1660695198: + { + input.readMessage(getSelfManagedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000800; + break; + } // case -1660695198 + case -1560671046: + { + certificate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1560671046 + case -1404318438: + { + privateKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -1404318438 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -769437846: + { + expireTime_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -769437846 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -645248918 + case -64504038: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSubjectAlternativeNamesIsMutable(); + subjectAlternativeNames_.add(s); + break; + } // case -64504038 + 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.compute.v1.SslCertificate) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3836,7 +3770,18 @@ public SslCertificate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslCertificate(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateAggregatedList.java index c9509f6cd778..48966ecd959d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslCertificateAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.SslCertificatesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslCertificateAggregatedList_descriptor; @@ -709,7 +596,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -754,7 +641,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -792,7 +679,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -831,7 +718,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1160,7 +1047,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SslCertificateAggregatedLis if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1175,18 +1062,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslCertificateAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.SslCertificatesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.SslCertificateAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2244,7 +2192,18 @@ public SslCertificateAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslCertificateAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateList.java index c605d590fa3e..fc88d2a7081d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslCertificateList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.SslCertificate.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslCertificateList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SslCertificateList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslCertificateList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.SslCertificate m = + input.readMessage( + com.google.cloud.compute.v1.SslCertificate.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.SslCertificateList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2080,7 +2040,18 @@ public SslCertificateList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslCertificateList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateManagedSslCertificate.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateManagedSslCertificate.java index dd71d4bed755..83d1232db8fe 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateManagedSslCertificate.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateManagedSslCertificate.java @@ -55,81 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslCertificateManagedSslCertificate( - 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 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - status_ = s; - break; - } - case 1815486842: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - domains_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - domains_.add(s); - break; - } - case -1412522390: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - domainStatus_ = - com.google.protobuf.MapField.newMapField( - DomainStatusDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry domainStatus__ = - input.readMessage( - DomainStatusDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - domainStatus_.getMutableMap().put(domainStatus__.getKey(), domainStatus__.getValue()); - 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_ & 0x00000002) != 0)) { - domains_ = domains_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslCertificateManagedSslCertificate_descriptor; @@ -639,7 +564,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetDomainStatus(), DomainStatusDefaultEntryHolder.defaultEntry, 360305613); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -669,7 +594,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(360305613, domainStatus__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -691,7 +616,7 @@ public boolean equals(final java.lang.Object obj) { if (hasStatus()) { if (!getStatus().equals(other.getStatus())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -714,7 +639,7 @@ public int hashCode() { hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + getStatus().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -864,17 +789,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.SslCertificateManagedSslCertificate.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 @@ -995,7 +913,7 @@ public Builder mergeFrom( status_ = other.status_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1010,19 +928,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslCertificateManagedSslCertificate 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 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1450082194 + case 1815486842: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDomainsIsMutable(); + domains_.add(s); + break; + } // case 1815486842 + case -1412522390: + { + com.google.protobuf.MapEntry domainStatus__ = + input.readMessage( + DomainStatusDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableDomainStatus() + .getMutableMap() + .put(domainStatus__.getKey(), domainStatus__.getValue()); + break; + } // case -1412522390 + 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.compute.v1.SslCertificateManagedSslCertificate) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1517,7 +1471,18 @@ public SslCertificateManagedSslCertificate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslCertificateManagedSslCertificate(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateSelfManagedSslCertificate.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateSelfManagedSslCertificate.java index 42f752ac12b1..c2497b8af22a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateSelfManagedSslCertificate.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificateSelfManagedSslCertificate.java @@ -55,60 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslCertificateSelfManagedSslCertificate( - 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 -1560671046: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - certificate_ = s; - break; - } - case -1404318438: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - privateKey_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslCertificateSelfManagedSslCertificate_descriptor; @@ -273,7 +219,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 361331107, privateKey_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +234,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(361331107, privateKey_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +258,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPrivateKey()) { if (!getPrivateKey().equals(other.getPrivateKey())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +277,7 @@ public int hashCode() { hash = (37 * hash) + PRIVATE_KEY_FIELD_NUMBER; hash = (53 * hash) + getPrivateKey().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -463,17 +409,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SslCertificateSelfManagedSslCertificate.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 @@ -586,7 +525,7 @@ public Builder mergeFrom( privateKey_ = other.privateKey_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -601,19 +540,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslCertificateSelfManagedSslCertificate 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 -1560671046: + { + certificate_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1560671046 + case -1404318438: + { + privateKey_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1404318438 + 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.compute.v1.SslCertificateSelfManagedSslCertificate) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -893,7 +856,18 @@ public SslCertificateSelfManagedSslCertificate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslCertificateSelfManagedSslCertificate(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificatesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificatesScopedList.java index c95ae386b816..fa6572703c81 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificatesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslCertificatesScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslCertificatesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1366914950: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sslCertificates_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sslCertificates_.add( - input.readMessage( - com.google.cloud.compute.v1.SslCertificate.parser(), extensionRegistry)); - 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)) { - sslCertificates_ = java.util.Collections.unmodifiableList(sslCertificates_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslCertificatesScopedList_descriptor; @@ -274,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < sslCertificates_.size(); i++) { output.writeMessage(366006543, sslCertificates_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +220,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 366006543, sslCertificates_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,10 +410,11 @@ public Builder clear() { super.clear(); if (sslCertificatesBuilder_ == null) { sslCertificates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + sslCertificates_ = null; sslCertificatesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -618,7 +548,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SslCertificatesScopedList o if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,18 +563,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslCertificatesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1366914950: + { + com.google.cloud.compute.v1.SslCertificate m = + input.readMessage( + com.google.cloud.compute.v1.SslCertificate.parser(), extensionRegistry); + if (sslCertificatesBuilder_ == null) { + ensureSslCertificatesIsMutable(); + sslCertificates_.add(m); + } else { + sslCertificatesBuilder_.addMessage(m); + } + break; + } // case -1366914950 + 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.compute.v1.SslCertificatesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1223,7 +1185,18 @@ public SslCertificatesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslCertificatesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesAggregatedList.java index 9361fd36c780..3d11e2d5fd11 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesAggregatedList.java @@ -56,126 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslPoliciesAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - id_ = s; - break; - } - case 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000020) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000020; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.SslPoliciesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - selfLink_ = 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_ & 0x00000040) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslPoliciesAggregatedList_descriptor; @@ -765,7 +645,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000010) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -812,7 +692,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -854,7 +734,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -897,7 +777,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1237,7 +1117,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SslPoliciesAggregatedList o if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1252,18 +1132,85 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslPoliciesAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26842 + case 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24987818 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000080; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.SslPoliciesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -645248918 + 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.compute.v1.SslPoliciesAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2396,7 +2343,18 @@ public SslPoliciesAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslPoliciesAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesList.java index 253bc311cf01..664e1d04c6f2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesList.java @@ -55,104 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslPoliciesList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.SslPolicy.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslPoliciesList_descriptor; @@ -572,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -822,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1000,7 +903,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SslPoliciesList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1015,17 +918,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslPoliciesList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.SslPolicy m = + input.readMessage( + com.google.cloud.compute.v1.SslPolicy.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.SslPoliciesList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2077,7 +2037,18 @@ public SslPoliciesList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslPoliciesList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesListAvailableFeaturesResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesListAvailableFeaturesResponse.java index f201d64abc39..e804eece43cf 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesListAvailableFeaturesResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesListAvailableFeaturesResponse.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslPoliciesListAvailableFeaturesResponse( - 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 1969693162: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - features_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - features_.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)) { - features_ = features_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslPoliciesListAvailableFeaturesResponse_descriptor; @@ -175,7 +122,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < features_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 246211645, features_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -192,7 +139,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getFeaturesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -209,7 +156,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse) obj; if (!getFeaturesList().equals(other.getFeaturesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -224,7 +171,7 @@ public int hashCode() { hash = (37 * hash) + FEATURES_FIELD_NUMBER; hash = (53 * hash) + getFeaturesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -355,17 +302,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse.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 @@ -471,7 +411,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -486,19 +426,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslPoliciesListAvailableFeaturesResponse 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 1969693162: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFeaturesIsMutable(); + features_.add(s); + break; + } // case 1969693162 + 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.compute.v1.SslPoliciesListAvailableFeaturesResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -652,7 +611,18 @@ public SslPoliciesListAvailableFeaturesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslPoliciesListAvailableFeaturesResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesScopedList.java index 64c0d7d3ba15..36103afa1183 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPoliciesScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslPoliciesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1679528218: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sslPolicies_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sslPolicies_.add( - input.readMessage( - com.google.cloud.compute.v1.SslPolicy.parser(), extensionRegistry)); - 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)) { - sslPolicies_ = java.util.Collections.unmodifiableList(sslPolicies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslPoliciesScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < sslPolicies_.size(); i++) { output.writeMessage(209941027, sslPolicies_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(209941027, sslPolicies_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (sslPoliciesBuilder_ == null) { sslPolicies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + sslPolicies_ = null; sslPoliciesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SslPoliciesScopedList other if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,18 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslPoliciesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 1679528218: + { + com.google.cloud.compute.v1.SslPolicy m = + input.readMessage( + com.google.cloud.compute.v1.SslPolicy.parser(), extensionRegistry); + if (sslPoliciesBuilder_ == null) { + ensureSslPoliciesIsMutable(); + sslPolicies_.add(m); + } else { + sslPoliciesBuilder_.addMessage(m); + } + break; + } // case 1679528218 + 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.compute.v1.SslPoliciesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1213,7 +1176,18 @@ public SslPoliciesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslPoliciesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPolicy.java index 0a4b4a0a0bfc..a0a336a7cb81 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPolicy.java @@ -63,155 +63,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslPolicy( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 65247546: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - minTlsVersion_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 278317658: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - customFeatures_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - customFeatures_.add(s); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - region_ = s; - break; - } - case 1819561290: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - profile_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - fingerprint_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - selfLink_ = s; - break; - } - case -542827558: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - enabledFeatures_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - enabledFeatures_.add(s); - break; - } - case -310238534: - { - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - warnings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00001000; - } - warnings_.add( - input.readMessage( - com.google.cloud.compute.v1.Warnings.parser(), extensionRegistry)); - 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_ & 0x00000002) != 0)) { - customFeatures_ = customFeatures_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - enabledFeatures_ = enabledFeatures_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00001000) != 0)) { - warnings_ = java.util.Collections.unmodifiableList(warnings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslPolicy_descriptor; @@ -1469,7 +1320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < warnings_.size(); i++) { output.writeMessage(498091095, warnings_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1528,7 +1379,7 @@ public int getSerializedSize() { for (int i = 0; i < warnings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(498091095, warnings_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1586,7 +1437,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSelfLink().equals(other.getSelfLink())) return false; } if (!getWarningsList().equals(other.getWarningsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1649,7 +1500,7 @@ public int hashCode() { hash = (37 * hash) + WARNINGS_FIELD_NUMBER; hash = (53 * hash) + getWarningsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1777,19 +1628,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SslPolicy.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) { - getWarningsFieldBuilder(); - } } @java.lang.Override @@ -1821,10 +1663,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000800); if (warningsBuilder_ == null) { warnings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); } else { + warnings_ = null; warningsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00001000); return this; } @@ -2058,7 +1901,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SslPolicy other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2073,17 +1916,118 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslPolicy 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26989658 + case 65247546: + { + minTlsVersion_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 65247546 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 278317658: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCustomFeaturesIsMutable(); + customFeatures_.add(s); + break; + } // case 278317658 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1111570338 + case 1819561290: + { + profile_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1819561290 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1877428002 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -645248918 + case -542827558: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureEnabledFeaturesIsMutable(); + enabledFeatures_.add(s); + break; + } // case -542827558 + case -310238534: + { + com.google.cloud.compute.v1.Warnings m = + input.readMessage( + com.google.cloud.compute.v1.Warnings.parser(), extensionRegistry); + if (warningsBuilder_ == null) { + ensureWarningsIsMutable(); + warnings_.add(m); + } else { + warningsBuilder_.addMessage(m); + } + break; + } // case -310238534 + 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.compute.v1.SslPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3964,7 +3908,18 @@ public SslPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPolicyReference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPolicyReference.java index 536c1cfdc1a4..c8e564e50b47 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPolicyReference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SslPolicyReference.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SslPolicyReference( - 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 -1933445590: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - sslPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SslPolicyReference_descriptor; @@ -195,7 +148,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 295190213, sslPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +160,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(295190213, sslPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +180,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSslPolicy()) { if (!getSslPolicy().equals(other.getSslPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +195,7 @@ public int hashCode() { hash = (37 * hash) + SSL_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSslPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -370,17 +323,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SslPolicyReference.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 @@ -476,7 +422,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SslPolicyReference other) { sslPolicy_ = other.sslPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -491,17 +437,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SslPolicyReference 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 -1933445590: + { + sslPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1933445590 + 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.compute.v1.SslPolicyReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -659,7 +625,18 @@ public SslPolicyReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SslPolicyReference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StartInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StartInstanceRequest.java index e18e1d055bfe..8a703c1b097f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StartInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StartInstanceRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StartInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_StartInstanceRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.StartInstanceRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.StartInstanceRequest other) zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,17 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.StartInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.StartInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1190,18 @@ public StartInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StartInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StartWithEncryptionKeyInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StartWithEncryptionKeyInstanceRequest.java index 62ced77689ea..6731ebb851b9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StartWithEncryptionKeyInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StartWithEncryptionKeyInstanceRequest.java @@ -57,92 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StartWithEncryptionKeyInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -761267206: - { - com.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequest.Builder - subBuilder = null; - if (instancesStartWithEncryptionKeyRequestResource_ != null) { - subBuilder = instancesStartWithEncryptionKeyRequestResource_.toBuilder(); - } - instancesStartWithEncryptionKeyRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstancesStartWithEncryptionKeyRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instancesStartWithEncryptionKeyRequestResource_); - instancesStartWithEncryptionKeyRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_StartWithEncryptionKeyInstanceRequest_descriptor; @@ -465,7 +379,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (instancesStartWithEncryptionKeyRequestResource_ != null) { output.writeMessage(441712511, getInstancesStartWithEncryptionKeyRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -491,7 +405,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 441712511, getInstancesStartWithEncryptionKeyRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -520,7 +434,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -545,7 +459,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -677,17 +591,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest.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 @@ -825,7 +732,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -840,19 +747,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.StartWithEncryptionKeyInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -761267206: + { + input.readMessage( + getInstancesStartWithEncryptionKeyRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -761267206 + 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.compute.v1.StartWithEncryptionKeyInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1567,7 +1518,18 @@ public StartWithEncryptionKeyInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StartWithEncryptionKeyInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicy.java index caef51607347..0dfdc7ae7bbc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicy.java @@ -49,63 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StatefulPolicy( - 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 21072210: - { - com.google.cloud.compute.v1.StatefulPolicyPreservedState.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = preservedState_.toBuilder(); - } - preservedState_ = - input.readMessage( - com.google.cloud.compute.v1.StatefulPolicyPreservedState.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(preservedState_); - preservedState_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_StatefulPolicy_descriptor; @@ -175,7 +118,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2634026, getPreservedState()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -188,7 +131,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2634026, getPreservedState()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -208,7 +151,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPreservedState()) { if (!getPreservedState().equals(other.getPreservedState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +166,7 @@ public int hashCode() { hash = (37 * hash) + PRESERVED_STATE_FIELD_NUMBER; hash = (53 * hash) + getPreservedState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -465,7 +408,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.StatefulPolicy other) { if (other.hasPreservedState()) { mergePreservedState(other.getPreservedState()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -480,17 +423,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.StatefulPolicy 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 21072210: + { + input.readMessage(getPreservedStateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 21072210 + 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.compute.v1.StatefulPolicy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -684,7 +647,18 @@ public StatefulPolicy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StatefulPolicy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicyPreservedState.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicyPreservedState.java index 6e46310771c4..5221140086f7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicyPreservedState.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicyPreservedState.java @@ -50,63 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StatefulPolicyPreservedState( - 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 764752818: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - disks_ = - com.google.protobuf.MapField.newMapField(DisksDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.compute.v1.StatefulPolicyPreservedStateDiskDevice> - disks__ = - input.readMessage( - DisksDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - disks_.getMutableMap().put(disks__.getKey(), disks__.getValue()); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_StatefulPolicyPreservedState_descriptor; @@ -276,7 +219,7 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetDisks(), DisksDefaultEntryHolder.defaultEntry, 95594102); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -298,7 +241,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(95594102, disks__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -315,7 +258,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.StatefulPolicyPreservedState) obj; if (!internalGetDisks().equals(other.internalGetDisks())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +273,7 @@ public int hashCode() { hash = (37 * hash) + DISKS_FIELD_NUMBER; hash = (53 * hash) + internalGetDisks().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -480,17 +423,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.StatefulPolicyPreservedState.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 @@ -578,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.StatefulPolicyPreservedStat if (other == com.google.cloud.compute.v1.StatefulPolicyPreservedState.getDefaultInstance()) return this; internalGetMutableDisks().mergeFrom(other.internalGetDisks()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -593,18 +529,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.StatefulPolicyPreservedState 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 764752818: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.compute.v1.StatefulPolicyPreservedStateDiskDevice> + disks__ = + input.readMessage( + DisksDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableDisks().getMutableMap().put(disks__.getKey(), disks__.getValue()); + break; + } // case 764752818 + 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.compute.v1.StatefulPolicyPreservedState) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -837,7 +798,18 @@ public StatefulPolicyPreservedState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StatefulPolicyPreservedState(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicyPreservedStateDiskDevice.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicyPreservedStateDiskDevice.java index 019481f127ab..f8777cea1833 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicyPreservedStateDiskDevice.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StatefulPolicyPreservedStateDiskDevice.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StatefulPolicyPreservedStateDiskDevice( - 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 -576876070: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - autoDelete_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_StatefulPolicyPreservedStateDiskDevice_descriptor; @@ -327,7 +280,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 464761403, autoDelete_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +292,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(464761403, autoDelete_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +312,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAutoDelete()) { if (!getAutoDelete().equals(other.getAutoDelete())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -374,7 +327,7 @@ public int hashCode() { hash = (37 * hash) + AUTO_DELETE_FIELD_NUMBER; hash = (53 * hash) + getAutoDelete().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -505,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.StatefulPolicyPreservedStateDiskDevice.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 @@ -617,7 +563,7 @@ public Builder mergeFrom( autoDelete_ = other.autoDelete_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -632,19 +578,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.StatefulPolicyPreservedStateDiskDevice 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 -576876070: + { + autoDelete_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -576876070 + 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.compute.v1.StatefulPolicyPreservedStateDiskDevice) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -810,7 +774,18 @@ public StatefulPolicyPreservedStateDiskDevice parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StatefulPolicyPreservedStateDiskDevice(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StopInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StopInstanceRequest.java index 2eac98f87277..049617faca9c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StopInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/StopInstanceRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private StopInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_StopInstanceRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.StopInstanceRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.StopInstanceRequest other) zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,17 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.StopInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.StopInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1190,18 @@ public StopInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new StopInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Subnetwork.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Subnetwork.java index e0ba0ad112c6..4cd41ba5d268 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Subnetwork.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Subnetwork.java @@ -71,229 +71,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Subnetwork( - 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 26840: - { - bitField0_ |= 0x00000040; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - name_ = s; - break; - } - case 28050354: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00080000; - role_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 386216050: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - privateIpv6GoogleAccess_ = s; - break; - } - case 784938578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - ipCidrRange_ = s; - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00400000; - state_ = s; - break; - } - case 1093271322: - { - if (!((mutable_bitField0_ & 0x00100000) != 0)) { - secondaryIpRanges_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00100000; - } - secondaryIpRanges_.add( - input.readMessage( - com.google.cloud.compute.v1.SubnetworkSecondaryRange.parser(), - extensionRegistry)); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; - region_ = s; - break; - } - case 1114393522: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - externalIpv6Prefix_ = s; - break; - } - case 1212355360: - { - bitField0_ |= 0x00000004; - enableFlowLogs_ = input.readBool(); - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - network_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - fingerprint_ = s; - break; - } - case -2109837230: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - ipv6CidrRange_ = s; - break; - } - case -1763710734: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - purpose_ = s; - break; - } - case -1484569366: - { - com.google.cloud.compute.v1.SubnetworkLogConfig.Builder subBuilder = null; - if (((bitField0_ & 0x00001000) != 0)) { - subBuilder = logConfig_.toBuilder(); - } - logConfig_ = - input.readMessage( - com.google.cloud.compute.v1.SubnetworkLogConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(logConfig_); - logConfig_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00001000; - break; - } - case -923032976: - { - bitField0_ |= 0x00008000; - privateIpGoogleAccess_ = input.readBool(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -887696246: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00200000; - stackType_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00100000; - selfLink_ = s; - break; - } - case -616028214: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - gatewayAddress_ = s; - break; - } - case -257698070: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - ipv6AccessType_ = s; - break; - } - case -244806846: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - internalIpv6Prefix_ = 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_ & 0x00100000) != 0)) { - secondaryIpRanges_ = java.util.Collections.unmodifiableList(secondaryIpRanges_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Subnetwork_descriptor; @@ -2906,7 +2683,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 506270056, internalIpv6Prefix_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2995,7 +2772,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(506270056, internalIpv6Prefix_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3103,7 +2880,7 @@ public boolean equals(final java.lang.Object obj) { if (hasState()) { if (!getState().equals(other.getState())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3210,7 +2987,7 @@ public int hashCode() { hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + getState().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3404,10 +3181,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00080000); if (secondaryIpRangesBuilder_ == null) { secondaryIpRanges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00100000); } else { + secondaryIpRanges_ = null; secondaryIpRangesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00100000); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00200000); stackType_ = ""; @@ -3732,7 +3510,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Subnetwork other) { state_ = other.state_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3747,17 +3525,183 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Subnetwork 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000040; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 26989658 + case 28050354: + { + role_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case 28050354 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 386216050: + { + privateIpv6GoogleAccess_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 386216050 + case 784938578: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 784938578 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00800000; + break; + } // case 878060682 + case 1093271322: + { + com.google.cloud.compute.v1.SubnetworkSecondaryRange m = + input.readMessage( + com.google.cloud.compute.v1.SubnetworkSecondaryRange.parser(), + extensionRegistry); + if (secondaryIpRangesBuilder_ == null) { + ensureSecondaryIpRangesIsMutable(); + secondaryIpRanges_.add(m); + } else { + secondaryIpRangesBuilder_.addMessage(m); + } + break; + } // case 1093271322 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case 1111570338 + case 1114393522: + { + externalIpv6Prefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1114393522 + case 1212355360: + { + enableFlowLogs_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 1212355360 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 1862979954 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1877428002 + case -2109837230: + { + ipv6CidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -2109837230 + case -1763710734: + { + purpose_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case -1763710734 + case -1484569366: + { + input.readMessage(getLogConfigFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case -1484569366 + case -923032976: + { + privateIpGoogleAccess_ = input.readBool(); + bitField0_ |= 0x00008000; + break; + } // case -923032976 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -887696246: + { + stackType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00400000; + break; + } // case -887696246 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00200000; + break; + } // case -645248918 + case -616028214: + { + gatewayAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -616028214 + case -257698070: + { + ipv6AccessType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -257698070 + case -244806846: + { + internalIpv6Prefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -244806846 + 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.compute.v1.Subnetwork) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6899,7 +6843,18 @@ public Subnetwork parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Subnetwork(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkAggregatedList.java index 03be7ae68251..9636c8305847 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SubnetworkAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.SubnetworksScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SubnetworkAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1157,7 +1044,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SubnetworkAggregatedList ot if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1172,18 +1059,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SubnetworkAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.SubnetworksScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.SubnetworkAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2232,7 +2180,18 @@ public SubnetworkAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubnetworkAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkList.java index 8015d100154a..3859ee366d91 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SubnetworkList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Subnetwork.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SubnetworkList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SubnetworkList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SubnetworkList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Subnetwork m = + input.readMessage( + com.google.cloud.compute.v1.Subnetwork.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.SubnetworkList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public SubnetworkList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubnetworkList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkLogConfig.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkLogConfig.java index c62982cc0e7e..55ab2ed67377 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkLogConfig.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkLogConfig.java @@ -55,92 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SubnetworkLogConfig( - 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 694933882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - metadata_ = s; - break; - } - case 1399352338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - aggregationInterval_ = s; - break; - } - case 1466995426: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - filterExpr_ = s; - break; - } - case -1800852456: - { - bitField0_ |= 0x00000002; - enable_ = input.readBool(); - break; - } - case -1267274166: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - metadataFields_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - metadataFields_.add(s); - break; - } - case -53764411: - { - bitField0_ |= 0x00000008; - flowSampling_ = input.readFloat(); - 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_ & 0x00000020) != 0)) { - metadataFields_ = metadataFields_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SubnetworkLogConfig_descriptor; @@ -798,7 +712,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { output.writeFloat(530150360, flowSampling_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -831,7 +745,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(530150360, flowSampling_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -869,7 +783,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMetadata().equals(other.getMetadata())) return false; } if (!getMetadataFieldsList().equals(other.getMetadataFieldsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -904,7 +818,7 @@ public int hashCode() { hash = (37 * hash) + METADATA_FIELDS_FIELD_NUMBER; hash = (53 * hash) + getMetadataFieldsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1033,17 +947,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SubnetworkLogConfig.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 @@ -1197,7 +1104,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SubnetworkLogConfig other) } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1212,17 +1119,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SubnetworkLogConfig 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 694933882: + { + metadata_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 694933882 + case 1399352338: + { + aggregationInterval_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1399352338 + case 1466995426: + { + filterExpr_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1466995426 + case -1800852456: + { + enable_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case -1800852456 + case -1267274166: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMetadataFieldsIsMutable(); + metadataFields_.add(s); + break; + } // case -1267274166 + case -53764411: + { + flowSampling_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case -53764411 + 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.compute.v1.SubnetworkLogConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1934,7 +1892,18 @@ public SubnetworkLogConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubnetworkLogConfig(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkSecondaryRange.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkSecondaryRange.java index adfe6f1132aa..ec478a352ff4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkSecondaryRange.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworkSecondaryRange.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SubnetworkSecondaryRange( - 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 784938578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - ipCidrRange_ = s; - break; - } - case -1637236118: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - rangeName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SubnetworkSecondaryRange_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 332216397, rangeName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(332216397, rangeName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRangeName()) { if (!getRangeName().equals(other.getRangeName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +275,7 @@ public int hashCode() { hash = (37 * hash) + RANGE_NAME_FIELD_NUMBER; hash = (53 * hash) + getRangeName().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SubnetworkSecondaryRange.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 @@ -576,7 +515,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SubnetworkSecondaryRange ot rangeName_ = other.rangeName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -591,18 +530,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SubnetworkSecondaryRange 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 784938578: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 784938578 + case -1637236118: + { + rangeName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1637236118 + 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.compute.v1.SubnetworkSecondaryRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -880,7 +844,18 @@ public SubnetworkSecondaryRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubnetworkSecondaryRange(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksExpandIpCidrRangeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksExpandIpCidrRangeRequest.java index 9c7bce429fef..99fd8bfe8d8d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksExpandIpCidrRangeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksExpandIpCidrRangeRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SubnetworksExpandIpCidrRangeRequest( - 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 784938578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - ipCidrRange_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SubnetworksExpandIpCidrRangeRequest_descriptor; @@ -197,7 +150,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 98117322, ipCidrRange_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -209,7 +162,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(98117322, ipCidrRange_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -229,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { if (hasIpCidrRange()) { if (!getIpCidrRange().equals(other.getIpCidrRange())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -244,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + IP_CIDR_RANGE_FIELD_NUMBER; hash = (53 * hash) + getIpCidrRange().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -373,17 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequest.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 @@ -483,7 +429,7 @@ public Builder mergeFrom( ipCidrRange_ = other.ipCidrRange_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -498,19 +444,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SubnetworksExpandIpCidrRangeRequest 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 784938578: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 784938578 + 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.compute.v1.SubnetworksExpandIpCidrRangeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -670,7 +634,18 @@ public SubnetworksExpandIpCidrRangeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubnetworksExpandIpCidrRangeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksScopedList.java index 9668f5c11cc8..6c24b9d7655c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SubnetworksScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -968142294: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - subnetworks_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - subnetworks_.add( - input.readMessage( - com.google.cloud.compute.v1.Subnetwork.parser(), extensionRegistry)); - 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)) { - subnetworks_ = java.util.Collections.unmodifiableList(subnetworks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_SubnetworksScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < subnetworks_.size(); i++) { output.writeMessage(415853125, subnetworks_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(415853125, subnetworks_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (subnetworksBuilder_ == null) { subnetworks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + subnetworks_ = null; subnetworksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SubnetworksScopedList other if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,18 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SubnetworksScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -968142294: + { + com.google.cloud.compute.v1.Subnetwork m = + input.readMessage( + com.google.cloud.compute.v1.Subnetwork.parser(), extensionRegistry); + if (subnetworksBuilder_ == null) { + ensureSubnetworksIsMutable(); + subnetworks_.add(m); + } else { + subnetworksBuilder_.addMessage(m); + } + break; + } // case -968142294 + 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.compute.v1.SubnetworksScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1214,7 +1177,18 @@ public SubnetworksScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubnetworksScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksSetPrivateIpGoogleAccessRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksSetPrivateIpGoogleAccessRequest.java index 8550996ab1b6..71f93055176f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksSetPrivateIpGoogleAccessRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SubnetworksSetPrivateIpGoogleAccessRequest.java @@ -51,52 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SubnetworksSetPrivateIpGoogleAccessRequest( - 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 -923032976: - { - bitField0_ |= 0x00000001; - privateIpGoogleAccess_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SubnetworksSetPrivateIpGoogleAccessRequest_descriptor; @@ -151,7 +105,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(421491790, privateIpGoogleAccess_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -164,7 +118,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(421491790, privateIpGoogleAccess_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -184,7 +138,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPrivateIpGoogleAccess()) { if (getPrivateIpGoogleAccess() != other.getPrivateIpGoogleAccess()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -199,7 +153,7 @@ public int hashCode() { hash = (37 * hash) + PRIVATE_IP_GOOGLE_ACCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPrivateIpGoogleAccess()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -330,17 +284,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.SubnetworksSetPrivateIpGoogleAccessRequest.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 @@ -441,7 +388,7 @@ public Builder mergeFrom( if (other.hasPrivateIpGoogleAccess()) { setPrivateIpGoogleAccess(other.getPrivateIpGoogleAccess()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -456,19 +403,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SubnetworksSetPrivateIpGoogleAccessRequest 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 -923032976: + { + privateIpGoogleAccess_ = input.readBool(); + bitField0_ |= 0x00000001; + break; + } // case -923032976 + 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.compute.v1.SubnetworksSetPrivateIpGoogleAccessRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -552,7 +517,19 @@ public SubnetworksSetPrivateIpGoogleAccessRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SubnetworksSetPrivateIpGoogleAccessRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Subsetting.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Subsetting.java index adc854997429..97fa7a3f7ff2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Subsetting.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Subsetting.java @@ -52,53 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Subsetting( - 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 728574354: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - policy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Subsetting_descriptor; @@ -355,7 +308,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 91071794, policy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -367,7 +320,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(91071794, policy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -386,7 +339,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -401,7 +354,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +483,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Subsetting.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 @@ -636,7 +582,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Subsetting other) { policy_ = other.policy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -651,17 +597,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Subsetting 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 728574354: + { + policy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 728574354 + 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.compute.v1.Subsetting) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -825,7 +791,18 @@ public Subsetting parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Subsetting(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SuspendInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SuspendInstanceRequest.java index 0f06f75efaba..3f66078587cd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SuspendInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SuspendInstanceRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SuspendInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SuspendInstanceRequest_descriptor; @@ -384,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +337,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +360,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +381,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -578,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SuspendInstanceRequest.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 @@ -706,7 +631,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SuspendInstanceRequest othe zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +646,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SuspendInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.SuspendInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1228,7 +1190,18 @@ public SuspendInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SuspendInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SwitchToCustomModeNetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SwitchToCustomModeNetworkRequest.java index 5bda700ea5c8..429277109db1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SwitchToCustomModeNetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/SwitchToCustomModeNetworkRequest.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SwitchToCustomModeNetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_SwitchToCustomModeNetworkRequest_descriptor; @@ -321,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +278,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -361,7 +300,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -380,7 +319,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +449,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest.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 @@ -633,7 +565,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.SwitchToCustomModeNetworkRe requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,18 +580,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.SwitchToCustomModeNetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 1862979954 + 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.compute.v1.SwitchToCustomModeNetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1040,7 +1003,18 @@ public SwitchToCustomModeNetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SwitchToCustomModeNetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TCPHealthCheck.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TCPHealthCheck.java index 6c90d75caa69..8b6de917a45c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TCPHealthCheck.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TCPHealthCheck.java @@ -55,87 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TCPHealthCheck( - 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 27575304: - { - bitField0_ |= 0x00000001; - port_ = input.readInt32(); - break; - } - case 175608954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - request_ = s; - break; - } - case 332274762: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - portName_ = s; - break; - } - case 412724778: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - portSpecification_ = s; - break; - } - case 1282993138: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - proxyHeader_ = s; - break; - } - case 1572381194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - response_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TCPHealthCheck_descriptor; @@ -850,7 +769,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000020) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 196547649, response_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -878,7 +797,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(196547649, response_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -918,7 +837,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResponse()) { if (!getResponse().equals(other.getResponse())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -953,7 +872,7 @@ public int hashCode() { hash = (37 * hash) + RESPONSE_FIELD_NUMBER; hash = (53 * hash) + getResponse().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1081,17 +1000,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TCPHealthCheck.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 @@ -1240,7 +1152,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TCPHealthCheck other) { response_ = other.response_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1255,17 +1167,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TCPHealthCheck 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 27575304: + { + port_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 27575304 + case 175608954: + { + request_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 175608954 + case 332274762: + { + portName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 332274762 + case 412724778: + { + portSpecification_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 412724778 + case 1282993138: + { + proxyHeader_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 1282993138 + case 1572381194: + { + response_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1572381194 + 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.compute.v1.TCPHealthCheck) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1982,7 +1944,18 @@ public TCPHealthCheck parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TCPHealthCheck(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Tags.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Tags.java index 5e6b3e5c9a6c..14a256f4238b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Tags.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Tags.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Tags( - 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 804208130: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add(s); - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - fingerprint_ = 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_ & 0x00000002) != 0)) { - items_ = items_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Tags_descriptor; @@ -273,7 +213,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 234678500, fingerprint_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -293,7 +233,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(234678500, fingerprint_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFingerprint().equals(other.getFingerprint())) return false; } if (!getItemsList().equals(other.getItemsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -332,7 +272,7 @@ public int hashCode() { hash = (37 * hash) + ITEMS_FIELD_NUMBER; hash = (53 * hash) + getItemsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -460,17 +400,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Tags.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 @@ -582,7 +515,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Tags other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -597,17 +530,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Tags 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 804208130: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureItemsIsMutable(); + items_.add(s); + break; + } // case 804208130 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1877428002 + 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.compute.v1.Tags) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -933,7 +893,18 @@ public Tags parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Tags(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetGrpcProxy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetGrpcProxy.java index afc900fac62f..186655e897d3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetGrpcProxy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetGrpcProxy.java @@ -59,114 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetGrpcProxy( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 356167698: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - selfLinkWithId_ = s; - break; - } - case 814583104: - { - bitField0_ |= 0x00000200; - validateForProxyless_ = input.readBool(); - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - fingerprint_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - urlMap_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetGrpcProxy_descriptor; @@ -805,7 +697,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -846,7 +738,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -902,7 +794,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValidateForProxyless()) { if (getValidateForProxyless() != other.getValidateForProxyless()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -953,7 +845,7 @@ public int hashCode() { hash = (37 * hash) + VALIDATE_FOR_PROXYLESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateForProxyless()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1082,17 +974,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetGrpcProxy.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 @@ -1283,7 +1168,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetGrpcProxy other) { if (other.hasValidateForProxyless()) { setValidateForProxyless(other.getValidateForProxyless()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1298,17 +1183,91 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetGrpcProxy 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 356167698: + { + selfLinkWithId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 356167698 + case 814583104: + { + validateForProxyless_ = input.readBool(); + bitField0_ |= 0x00000200; + break; + } // case 814583104 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1877428002 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -1358801822 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -645248918 + 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.compute.v1.TargetGrpcProxy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2440,7 +2399,18 @@ public TargetGrpcProxy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetGrpcProxy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetGrpcProxyList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetGrpcProxyList.java index 7ee095d0423a..3505bad00ca7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetGrpcProxyList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetGrpcProxyList.java @@ -55,104 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetGrpcProxyList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetGrpcProxy.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetGrpcProxyList_descriptor; @@ -572,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -822,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetGrpcProxyList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetGrpcProxyList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.TargetGrpcProxy m = + input.readMessage( + com.google.cloud.compute.v1.TargetGrpcProxy.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetGrpcProxyList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public TargetGrpcProxyList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetGrpcProxyList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxiesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxiesScopedList.java index 8c43ba4e28ab..7e52028d3e08 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxiesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxiesScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpProxiesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1297176090: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - targetHttpProxies_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - targetHttpProxies_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetHttpProxy.parser(), extensionRegistry)); - 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)) { - targetHttpProxies_ = java.util.Collections.unmodifiableList(targetHttpProxies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpProxiesScopedList_descriptor; @@ -274,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < targetHttpProxies_.size(); i++) { output.writeMessage(162147011, targetHttpProxies_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +220,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 162147011, targetHttpProxies_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,10 +410,11 @@ public Builder clear() { super.clear(); if (targetHttpProxiesBuilder_ == null) { targetHttpProxies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + targetHttpProxies_ = null; targetHttpProxiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -618,7 +548,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetHttpProxiesScopedList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,18 +563,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpProxiesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 1297176090: + { + com.google.cloud.compute.v1.TargetHttpProxy m = + input.readMessage( + com.google.cloud.compute.v1.TargetHttpProxy.parser(), extensionRegistry); + if (targetHttpProxiesBuilder_ == null) { + ensureTargetHttpProxiesIsMutable(); + targetHttpProxies_.add(m); + } else { + targetHttpProxiesBuilder_.addMessage(m); + } + break; + } // case 1297176090 + 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.compute.v1.TargetHttpProxiesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1246,7 +1208,18 @@ public TargetHttpProxiesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpProxiesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxy.java index 80c236a1dff0..9094813d3723 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxy.java @@ -59,114 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpProxy( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - region_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - fingerprint_ = s; - break; - } - case -2006762640: - { - bitField0_ |= 0x00000040; - proxyBind_ = input.readBool(); - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - urlMap_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpProxy_descriptor; @@ -805,7 +697,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -845,7 +737,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -901,7 +793,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMap()) { if (!getUrlMap().equals(other.getUrlMap())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -952,7 +844,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_FIELD_NUMBER; hash = (53 * hash) + getUrlMap().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1081,17 +973,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetHttpProxy.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 @@ -1282,7 +1167,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetHttpProxy other) { urlMap_ = other.urlMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1297,17 +1182,91 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpProxy 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1111570338 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 1877428002 + case -2006762640: + { + proxyBind_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case -2006762640 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -1358801822 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -645248918 + 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.compute.v1.TargetHttpProxy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2439,7 +2398,18 @@ public TargetHttpProxy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpProxy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyAggregatedList.java index e70ffcf3be6a..df08928db798 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyAggregatedList.java @@ -55,103 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpProxyAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.TargetHttpProxiesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpProxyAggregatedList_descriptor; @@ -649,7 +552,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -691,7 +594,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -725,7 +628,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSelfLink().equals(other.getSelfLink())) return false; } if (!getUnreachablesList().equals(other.getUnreachablesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -760,7 +663,7 @@ public int hashCode() { hash = (37 * hash) + UNREACHABLES_FIELD_NUMBER; hash = (53 * hash) + getUnreachablesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -909,17 +812,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.TargetHttpProxyAggregatedList.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 @@ -1070,7 +966,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetHttpProxyAggregatedLi } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1085,18 +981,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpProxyAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.TargetHttpProxiesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetHttpProxyAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1969,7 +1920,18 @@ public TargetHttpProxyAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpProxyAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyList.java index 18a7f4818ede..e31d46d63ebc 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpProxyList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpProxyList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetHttpProxy.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpProxyList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetHttpProxyList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,17 +921,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpProxyList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.TargetHttpProxy m = + input.readMessage( + com.google.cloud.compute.v1.TargetHttpProxy.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetHttpProxyList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2081,7 +2041,18 @@ public TargetHttpProxyList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpProxyList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesScopedList.java index 271687869136..e138090773d9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpsProxiesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1362104238: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - targetHttpsProxies_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - targetHttpsProxies_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetHttpsProxy.parser(), extensionRegistry)); - 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)) { - targetHttpsProxies_ = java.util.Collections.unmodifiableList(targetHttpsProxies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpsProxiesScopedList_descriptor; @@ -279,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < targetHttpsProxies_.size(); i++) { output.writeMessage(366607882, targetHttpsProxies_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -296,7 +225,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 366607882, targetHttpsProxies_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -317,7 +246,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -336,7 +265,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -486,10 +415,11 @@ public Builder clear() { super.clear(); if (targetHttpsProxiesBuilder_ == null) { targetHttpsProxies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + targetHttpsProxies_ = null; targetHttpsProxiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -623,7 +553,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetHttpsProxiesScopedLis if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -638,18 +568,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpsProxiesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1362104238: + { + com.google.cloud.compute.v1.TargetHttpsProxy m = + input.readMessage( + com.google.cloud.compute.v1.TargetHttpsProxy.parser(), extensionRegistry); + if (targetHttpsProxiesBuilder_ == null) { + ensureTargetHttpsProxiesIsMutable(); + targetHttpsProxies_.add(m); + } else { + targetHttpsProxiesBuilder_.addMessage(m); + } + break; + } // case -1362104238 + 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.compute.v1.TargetHttpsProxiesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1252,7 +1214,18 @@ public TargetHttpsProxiesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpsProxiesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetCertificateMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetCertificateMapRequest.java index 416d385bc548..c2671092bcc9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetCertificateMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetCertificateMapRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpsProxiesSetCertificateMapRequest( - 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 1251710370: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - certificateMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetCertificateMapRequest_descriptor; @@ -197,7 +150,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 156463796, certificateMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -209,7 +162,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(156463796, certificateMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -229,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCertificateMap()) { if (!getCertificateMap().equals(other.getCertificateMap())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -244,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + CERTIFICATE_MAP_FIELD_NUMBER; hash = (53 * hash) + getCertificateMap().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -375,17 +328,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TargetHttpsProxiesSetCertificateMapRequest.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 @@ -488,7 +434,7 @@ public Builder mergeFrom( certificateMap_ = other.certificateMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -503,19 +449,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpsProxiesSetCertificateMapRequest 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 1251710370: + { + certificateMap_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1251710370 + 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.compute.v1.TargetHttpsProxiesSetCertificateMapRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -676,7 +640,19 @@ public TargetHttpsProxiesSetCertificateMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpsProxiesSetCertificateMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetQuicOverrideRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetQuicOverrideRequest.java index 70446a5c2627..e40e404995f2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetQuicOverrideRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetQuicOverrideRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpsProxiesSetQuicOverrideRequest( - 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 -642349718: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - quicOverride_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetQuicOverrideRequest_descriptor; @@ -382,7 +335,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456577197, quicOverride_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -394,7 +347,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456577197, quicOverride_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -414,7 +367,7 @@ public boolean equals(final java.lang.Object obj) { if (hasQuicOverride()) { if (!getQuicOverride().equals(other.getQuicOverride())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -429,7 +382,7 @@ public int hashCode() { hash = (37 * hash) + QUIC_OVERRIDE_FIELD_NUMBER; hash = (53 * hash) + getQuicOverride().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -560,17 +513,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TargetHttpsProxiesSetQuicOverrideRequest.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 @@ -672,7 +618,7 @@ public Builder mergeFrom( quicOverride_ = other.quicOverride_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -687,19 +633,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpsProxiesSetQuicOverrideRequest 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 -642349718: + { + quicOverride_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -642349718 + 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.compute.v1.TargetHttpsProxiesSetQuicOverrideRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -865,7 +829,18 @@ public TargetHttpsProxiesSetQuicOverrideRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpsProxiesSetQuicOverrideRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetSslCertificatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetSslCertificatesRequest.java index 537ea1813b65..88fbad8626a0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetSslCertificatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxiesSetSslCertificatesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpsProxiesSetSslCertificatesRequest( - 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 -1366914950: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sslCertificates_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sslCertificates_.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)) { - sslCertificates_ = sslCertificates_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpsProxiesSetSslCertificatesRequest_descriptor; @@ -200,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 366006543, sslCertificates_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -217,7 +164,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getSslCertificatesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -234,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequest) obj; if (!getSslCertificatesList().equals(other.getSslCertificatesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -249,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + SSL_CERTIFICATES_FIELD_NUMBER; hash = (53 * hash) + getSslCertificatesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -381,17 +328,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequest.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 @@ -499,7 +439,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -514,19 +454,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpsProxiesSetSslCertificatesRequest 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 -1366914950: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSslCertificatesIsMutable(); + sslCertificates_.add(s); + break; + } // case -1366914950 + 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.compute.v1.TargetHttpsProxiesSetSslCertificatesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -736,7 +695,19 @@ public TargetHttpsProxiesSetSslCertificatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpsProxiesSetSslCertificatesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxy.java index fb2a15825e7b..7036a7a9a433 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxy.java @@ -65,162 +65,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpsProxy( - 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 26840: - { - bitField0_ |= 0x00000020; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - creationTimestamp_ = s; - break; - } - case 271564226: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - authorizationPolicy_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - region_ = s; - break; - } - case 1251710370: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - certificateMap_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - fingerprint_ = s; - break; - } - case -2006762640: - { - bitField0_ |= 0x00000100; - proxyBind_ = input.readBool(); - break; - } - case -1933445590: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - sslPolicy_ = s; - break; - } - case -1928365166: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - serverTlsPolicy_ = s; - break; - } - case -1366914950: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00002000) != 0)) { - sslCertificates_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00002000; - } - sslCertificates_.add(s); - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - urlMap_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - selfLink_ = s; - break; - } - case -642349718: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - quicOverride_ = 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_ & 0x00002000) != 0)) { - sslCertificates_ = sslCertificates_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpsProxy_descriptor; @@ -1441,7 +1285,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456577197, quicOverride_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1505,7 +1349,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456577197, quicOverride_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1582,7 +1426,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMap()) { if (!getUrlMap().equals(other.getUrlMap())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1657,7 +1501,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_FIELD_NUMBER; hash = (53 * hash) + getUrlMap().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1786,17 +1630,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetHttpsProxy.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 @@ -2059,7 +1896,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetHttpsProxy other) { urlMap_ = other.urlMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2074,17 +1911,128 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpsProxy 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 244202930 + case 271564226: + { + authorizationPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 271564226 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 1111570338 + case 1251710370: + { + certificateMap_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 1251710370 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1877428002 + case -2006762640: + { + proxyBind_ = input.readBool(); + bitField0_ |= 0x00000100; + break; + } // case -2006762640 + case -1933445590: + { + sslPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case -1933445590 + case -1928365166: + { + serverTlsPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case -1928365166 + case -1366914950: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSslCertificatesIsMutable(); + sslCertificates_.add(s); + break; + } // case -1366914950 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case -1358801822 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -645248918 + case -642349718: + { + quicOverride_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -642349718 + 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.compute.v1.TargetHttpsProxy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3990,7 +3938,18 @@ public TargetHttpsProxy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpsProxy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyAggregatedList.java index 3c30f8105b93..e593783032a0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyAggregatedList.java @@ -56,119 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpsProxyAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.TargetHttpsProxiesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpsProxyAggregatedList_descriptor; @@ -715,7 +602,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -760,7 +647,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -798,7 +685,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -837,7 +724,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1166,7 +1053,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetHttpsProxyAggregatedL if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1181,18 +1068,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpsProxyAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.TargetHttpsProxiesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetHttpsProxyAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2251,7 +2199,18 @@ public TargetHttpsProxyAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpsProxyAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyList.java index 0b84fb8f1807..f45095e0f52a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetHttpsProxyList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetHttpsProxyList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetHttpsProxy.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetHttpsProxyList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetHttpsProxyList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,17 +921,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetHttpsProxyList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.TargetHttpsProxy m = + input.readMessage( + com.google.cloud.compute.v1.TargetHttpsProxy.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetHttpsProxyList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2081,7 +2041,18 @@ public TargetHttpsProxyList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetHttpsProxyList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstance.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstance.java index f5543305eca2..b0ab911a97fd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstance.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstance.java @@ -60,115 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetInstance( - 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 26840: - { - bitField0_ |= 0x00000004; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - instance_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - network_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = s; - break; - } - case -216723326: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - natPolicy_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetInstance_descriptor; @@ -976,7 +867,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 509780496, natPolicy_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1016,7 +907,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(509780496, natPolicy_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1072,7 +963,7 @@ public boolean equals(final java.lang.Object obj) { if (hasZone()) { if (!getZone().equals(other.getZone())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1123,7 +1014,7 @@ public int hashCode() { hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1252,17 +1143,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetInstance.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 @@ -1455,7 +1339,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetInstance other) { zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1470,17 +1354,91 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetInstance 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 29957474: + { + zone_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 146056362 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1862979954 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -645248918 + case -216723326: + { + natPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -216723326 + 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.compute.v1.TargetInstance) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2671,7 +2629,18 @@ public TargetInstance parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetInstance(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstanceAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstanceAggregatedList.java index 9dc787771720..2af4123282d6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstanceAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstanceAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetInstanceAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.TargetInstancesScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetInstanceAggregatedList_descriptor; @@ -709,7 +596,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -754,7 +641,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -792,7 +679,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -831,7 +718,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1160,7 +1047,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetInstanceAggregatedLis if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1175,18 +1062,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetInstanceAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.TargetInstancesScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetInstanceAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2244,7 +2192,18 @@ public TargetInstanceAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetInstanceAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstanceList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstanceList.java index 0e089e5dd83b..a57985dced47 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstanceList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstanceList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetInstanceList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetInstance.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetInstanceList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetInstanceList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetInstanceList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.TargetInstance m = + input.readMessage( + com.google.cloud.compute.v1.TargetInstance.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetInstanceList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2080,7 +2040,18 @@ public TargetInstanceList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetInstanceList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstancesScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstancesScopedList.java index 283443c7630a..05be80c74114 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstancesScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetInstancesScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetInstancesScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1151645054: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - targetInstances_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - targetInstances_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetInstance.parser(), extensionRegistry)); - 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)) { - targetInstances_ = java.util.Collections.unmodifiableList(targetInstances_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetInstancesScopedList_descriptor; @@ -274,7 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < targetInstances_.size(); i++) { output.writeMessage(392915280, targetInstances_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +220,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 392915280, targetInstances_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,10 +410,11 @@ public Builder clear() { super.clear(); if (targetInstancesBuilder_ == null) { targetInstances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + targetInstances_ = null; targetInstancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -618,7 +548,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetInstancesScopedList o if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,18 +563,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetInstancesScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1151645054: + { + com.google.cloud.compute.v1.TargetInstance m = + input.readMessage( + com.google.cloud.compute.v1.TargetInstance.parser(), extensionRegistry); + if (targetInstancesBuilder_ == null) { + ensureTargetInstancesIsMutable(); + targetInstances_.add(m); + } else { + targetInstancesBuilder_.addMessage(m); + } + break; + } // case -1151645054 + 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.compute.v1.TargetInstancesScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1223,7 +1185,18 @@ public TargetInstancesScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetInstancesScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPool.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPool.java index 6d8b4617c3ec..031df1d9dfce 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPool.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPool.java @@ -61,140 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetPool( - 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 26840: - { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 232780786: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - instances_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - instances_.add(s); - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 367076298: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - backupPool_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - region_ = s; - break; - } - case 1701336053: - { - bitField0_ |= 0x00000008; - failoverRatio_ = input.readFloat(); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -708002446: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - healthChecks_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - healthChecks_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = s; - break; - } - case -583858806: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - sessionAffinity_ = 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_ & 0x00000040) != 0)) { - instances_ = instances_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - healthChecks_ = healthChecks_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetPool_descriptor; @@ -1256,7 +1122,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000200) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 463888561, sessionAffinity_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1312,7 +1178,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000200) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(463888561, sessionAffinity_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1370,7 +1236,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSessionAffinity()) { if (!getSessionAffinity().equals(other.getSessionAffinity())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1429,7 +1295,7 @@ public int hashCode() { hash = (37 * hash) + SESSION_AFFINITY_FIELD_NUMBER; hash = (53 * hash) + getSessionAffinity().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1558,17 +1424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetPool.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 @@ -1793,7 +1652,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetPool other) { sessionAffinity_ = other.sessionAffinity_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1808,17 +1667,105 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetPool 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000020; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 26989658 + case 232780786: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInstancesIsMutable(); + instances_.add(s); + break; + } // case 232780786 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 367076298: + { + backupPool_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 367076298 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1111570338 + case 1701336053: + { + failoverRatio_ = input.readFloat(); + bitField0_ |= 0x00000008; + break; + } // case 1701336053 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -708002446: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureHealthChecksIsMutable(); + healthChecks_.add(s); + break; + } // case -708002446 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -645248918 + case -583858806: + { + sessionAffinity_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -583858806 + 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.compute.v1.TargetPool) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3292,7 +3239,18 @@ public TargetPool parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetPool(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolAggregatedList.java index c19bfe6fdd66..664c661be3ca 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetPoolAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.TargetPoolsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetPoolAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1157,7 +1044,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetPoolAggregatedList ot if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1172,18 +1059,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetPoolAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.TargetPoolsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetPoolAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2232,7 +2180,18 @@ public TargetPoolAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetPoolAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolInstanceHealth.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolInstanceHealth.java index 11f79008dd9e..aa007724e97e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolInstanceHealth.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolInstanceHealth.java @@ -52,67 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetPoolInstanceHealth( - 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 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - kind_ = s; - break; - } - case -1250600534: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - healthStatus_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - healthStatus_.add( - input.readMessage( - com.google.cloud.compute.v1.HealthStatus.parser(), extensionRegistry)); - 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)) { - healthStatus_ = java.util.Collections.unmodifiableList(healthStatus_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetPoolInstanceHealth_descriptor; @@ -242,7 +181,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < healthStatus_.size(); i++) { output.writeMessage(380545845, healthStatus_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -258,7 +197,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(380545845, healthStatus_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -279,7 +218,7 @@ public boolean equals(final java.lang.Object obj) { if (hasKind()) { if (!getKind().equals(other.getKind())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -298,7 +237,7 @@ public int hashCode() { hash = (37 * hash) + KIND_FIELD_NUMBER; hash = (53 * hash) + getKind().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -426,19 +365,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetPoolInstanceHealth.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) { - getHealthStatusFieldBuilder(); - } } @java.lang.Override @@ -446,10 +376,11 @@ public Builder clear() { super.clear(); if (healthStatusBuilder_ == null) { healthStatus_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + healthStatus_ = null; healthStatusBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -577,7 +508,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetPoolInstanceHealth ot kind_ = other.kind_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -592,18 +523,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetPoolInstanceHealth 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 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26336418 + case -1250600534: + { + com.google.cloud.compute.v1.HealthStatus m = + input.readMessage( + com.google.cloud.compute.v1.HealthStatus.parser(), extensionRegistry); + if (healthStatusBuilder_ == null) { + ensureHealthStatusIsMutable(); + healthStatus_.add(m); + } else { + healthStatusBuilder_.addMessage(m); + } + break; + } // case -1250600534 + 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.compute.v1.TargetPoolInstanceHealth) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -968,7 +931,18 @@ public TargetPoolInstanceHealth parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetPoolInstanceHealth(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolList.java index b57734194705..3661a48ac7f7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetPoolList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetPool.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetPoolList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetPoolList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetPoolList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.TargetPool m = + input.readMessage( + com.google.cloud.compute.v1.TargetPool.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetPoolList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public TargetPoolList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetPoolList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsAddHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsAddHealthCheckRequest.java index 4b8c604fdb77..d019b8c8f535 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsAddHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsAddHealthCheckRequest.java @@ -52,62 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetPoolsAddHealthCheckRequest( - 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 -708002446: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - healthChecks_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - healthChecks_.add( - input.readMessage( - com.google.cloud.compute.v1.HealthCheckReference.parser(), - extensionRegistry)); - 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)) { - healthChecks_ = java.util.Collections.unmodifiableList(healthChecks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetPoolsAddHealthCheckRequest_descriptor; @@ -210,7 +154,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < healthChecks_.size(); i++) { output.writeMessage(448370606, healthChecks_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -223,7 +167,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(448370606, healthChecks_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -240,7 +184,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequest) obj; if (!getHealthChecksList().equals(other.getHealthChecksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -255,7 +199,7 @@ public int hashCode() { hash = (37 * hash) + HEALTH_CHECKS_FIELD_NUMBER; hash = (53 * hash) + getHealthChecksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -384,19 +328,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequest.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) { - getHealthChecksFieldBuilder(); - } } @java.lang.Override @@ -404,10 +339,11 @@ public Builder clear() { super.clear(); if (healthChecksBuilder_ == null) { healthChecks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + healthChecks_ = null; healthChecksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -524,7 +460,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetPoolsAddHealthCheckRe } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -539,18 +475,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetPoolsAddHealthCheckRequest 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 -708002446: + { + com.google.cloud.compute.v1.HealthCheckReference m = + input.readMessage( + com.google.cloud.compute.v1.HealthCheckReference.parser(), + extensionRegistry); + if (healthChecksBuilder_ == null) { + ensureHealthChecksIsMutable(); + healthChecks_.add(m); + } else { + healthChecksBuilder_.addMessage(m); + } + break; + } // case -708002446 + 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.compute.v1.TargetPoolsAddHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -964,7 +927,18 @@ public TargetPoolsAddHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetPoolsAddHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsAddInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsAddInstanceRequest.java index 87119b0fd36c..ede2a72ba8e6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsAddInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsAddInstanceRequest.java @@ -51,61 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetPoolsAddInstanceRequest( - 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 232780786: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceReference.parser(), extensionRegistry)); - 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)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetPoolsAddInstanceRequest_descriptor; @@ -207,7 +152,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { output.writeMessage(29097598, instances_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +164,7 @@ public int getSerializedSize() { for (int i = 0; i < instances_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(29097598, instances_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.TargetPoolsAddInstanceRequest) obj; if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -251,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -380,19 +325,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetPoolsAddInstanceRequest.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) { - getInstancesFieldBuilder(); - } } @java.lang.Override @@ -400,10 +336,11 @@ public Builder clear() { super.clear(); if (instancesBuilder_ == null) { instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instances_ = null; instancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -518,7 +455,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetPoolsAddInstanceReque } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -533,18 +470,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetPoolsAddInstanceRequest 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 232780786: + { + com.google.cloud.compute.v1.InstanceReference m = + input.readMessage( + com.google.cloud.compute.v1.InstanceReference.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 232780786 + 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.compute.v1.TargetPoolsAddInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -933,7 +896,18 @@ public TargetPoolsAddInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetPoolsAddInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsRemoveHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsRemoveHealthCheckRequest.java index 3b477420e1a5..34610b4c3a55 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsRemoveHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsRemoveHealthCheckRequest.java @@ -53,62 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetPoolsRemoveHealthCheckRequest( - 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 -708002446: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - healthChecks_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - healthChecks_.add( - input.readMessage( - com.google.cloud.compute.v1.HealthCheckReference.parser(), - extensionRegistry)); - 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)) { - healthChecks_ = java.util.Collections.unmodifiableList(healthChecks_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetPoolsRemoveHealthCheckRequest_descriptor; @@ -211,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < healthChecks_.size(); i++) { output.writeMessage(448370606, healthChecks_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -224,7 +168,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(448370606, healthChecks_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -241,7 +185,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequest) obj; if (!getHealthChecksList().equals(other.getHealthChecksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -256,7 +200,7 @@ public int hashCode() { hash = (37 * hash) + HEALTH_CHECKS_FIELD_NUMBER; hash = (53 * hash) + getHealthChecksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -385,19 +329,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequest.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) { - getHealthChecksFieldBuilder(); - } } @java.lang.Override @@ -405,10 +340,11 @@ public Builder clear() { super.clear(); if (healthChecksBuilder_ == null) { healthChecks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + healthChecks_ = null; healthChecksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -526,7 +462,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -541,19 +477,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetPoolsRemoveHealthCheckRequest 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 -708002446: + { + com.google.cloud.compute.v1.HealthCheckReference m = + input.readMessage( + com.google.cloud.compute.v1.HealthCheckReference.parser(), + extensionRegistry); + if (healthChecksBuilder_ == null) { + ensureHealthChecksIsMutable(); + healthChecks_.add(m); + } else { + healthChecksBuilder_.addMessage(m); + } + break; + } // case -708002446 + 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.compute.v1.TargetPoolsRemoveHealthCheckRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -968,7 +930,18 @@ public TargetPoolsRemoveHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetPoolsRemoveHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsRemoveInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsRemoveInstanceRequest.java index 513122f5fbae..e156036cd908 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsRemoveInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsRemoveInstanceRequest.java @@ -52,61 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetPoolsRemoveInstanceRequest( - 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 232780786: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - instances_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - instances_.add( - input.readMessage( - com.google.cloud.compute.v1.InstanceReference.parser(), extensionRegistry)); - 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)) { - instances_ = java.util.Collections.unmodifiableList(instances_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetPoolsRemoveInstanceRequest_descriptor; @@ -208,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < instances_.size(); i++) { output.writeMessage(29097598, instances_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -220,7 +165,7 @@ public int getSerializedSize() { for (int i = 0; i < instances_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(29097598, instances_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -237,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequest) obj; if (!getInstancesList().equals(other.getInstancesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -252,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + INSTANCES_FIELD_NUMBER; hash = (53 * hash) + getInstancesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -381,19 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequest.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) { - getInstancesFieldBuilder(); - } } @java.lang.Override @@ -401,10 +337,11 @@ public Builder clear() { super.clear(); if (instancesBuilder_ == null) { instances_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + instances_ = null; instancesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -521,7 +458,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetPoolsRemoveInstanceRe } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -536,18 +473,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetPoolsRemoveInstanceRequest 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 232780786: + { + com.google.cloud.compute.v1.InstanceReference m = + input.readMessage( + com.google.cloud.compute.v1.InstanceReference.parser(), extensionRegistry); + if (instancesBuilder_ == null) { + ensureInstancesIsMutable(); + instances_.add(m); + } else { + instancesBuilder_.addMessage(m); + } + break; + } // case 232780786 + 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.compute.v1.TargetPoolsRemoveInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -937,7 +900,18 @@ public TargetPoolsRemoveInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetPoolsRemoveInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsScopedList.java index 727987bf489b..6c4f026aae0f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetPoolsScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetPoolsScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1606386358: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - targetPools_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - targetPools_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetPool.parser(), extensionRegistry)); - 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)) { - targetPools_ = java.util.Collections.unmodifiableList(targetPools_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetPoolsScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < targetPools_.size(); i++) { output.writeMessage(336072617, targetPools_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(336072617, targetPools_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (targetPoolsBuilder_ == null) { targetPools_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + targetPools_ = null; targetPoolsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetPoolsScopedList other if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,18 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetPoolsScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1606386358: + { + com.google.cloud.compute.v1.TargetPool m = + input.readMessage( + com.google.cloud.compute.v1.TargetPool.parser(), extensionRegistry); + if (targetPoolsBuilder_ == null) { + ensureTargetPoolsIsMutable(); + targetPools_.add(m); + } else { + targetPoolsBuilder_.addMessage(m); + } + break; + } // case -1606386358 + 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.compute.v1.TargetPoolsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1214,7 +1177,18 @@ public TargetPoolsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetPoolsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetReference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetReference.java index d356ad4e06a1..8b6086c6c658 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetReference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetReference.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetReference( - 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 1542687882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - target_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetReference_descriptor; @@ -177,7 +130,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 192835985, target_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -189,7 +142,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(192835985, target_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -209,7 +162,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTarget()) { if (!getTarget().equals(other.getTarget())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -224,7 +177,7 @@ public int hashCode() { hash = (37 * hash) + TARGET_FIELD_NUMBER; hash = (53 * hash) + getTarget().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -352,17 +305,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetReference.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 @@ -458,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetReference other) { target_ = other.target_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -473,17 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetReference 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 1542687882: + { + target_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1542687882 + 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.compute.v1.TargetReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -605,7 +571,18 @@ public TargetReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetReference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetBackendServiceRequest.java index fc932b35b35b..4e493b59279f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetBackendServiceRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetSslProxiesSetBackendServiceRequest( - 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 -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - service_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetSslProxiesSetBackendServiceRequest_descriptor; @@ -197,7 +150,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 373540533, service_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -209,7 +162,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(373540533, service_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -229,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { if (hasService()) { if (!getService().equals(other.getService())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -244,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -375,17 +328,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TargetSslProxiesSetBackendServiceRequest.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 @@ -487,7 +433,7 @@ public Builder mergeFrom( service_ = other.service_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -502,19 +448,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetSslProxiesSetBackendServiceRequest 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 -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1306643030 + 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.compute.v1.TargetSslProxiesSetBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -674,7 +638,18 @@ public TargetSslProxiesSetBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetSslProxiesSetBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetCertificateMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetCertificateMapRequest.java index 6c50f960adb4..884b4e4a347a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetCertificateMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetCertificateMapRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetSslProxiesSetCertificateMapRequest( - 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 1251710370: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - certificateMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetSslProxiesSetCertificateMapRequest_descriptor; @@ -197,7 +150,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 156463796, certificateMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -209,7 +162,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(156463796, certificateMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -229,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCertificateMap()) { if (!getCertificateMap().equals(other.getCertificateMap())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -244,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + CERTIFICATE_MAP_FIELD_NUMBER; hash = (53 * hash) + getCertificateMap().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -375,17 +328,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TargetSslProxiesSetCertificateMapRequest.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 @@ -487,7 +433,7 @@ public Builder mergeFrom( certificateMap_ = other.certificateMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -502,19 +448,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetSslProxiesSetCertificateMapRequest 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 1251710370: + { + certificateMap_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1251710370 + 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.compute.v1.TargetSslProxiesSetCertificateMapRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -674,7 +638,18 @@ public TargetSslProxiesSetCertificateMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetSslProxiesSetCertificateMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetProxyHeaderRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetProxyHeaderRequest.java index 2ec96ff6b933..7c70ccf4740f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetProxyHeaderRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetProxyHeaderRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetSslProxiesSetProxyHeaderRequest( - 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 1282993138: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - proxyHeader_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetSslProxiesSetProxyHeaderRequest_descriptor; @@ -327,7 +280,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 160374142, proxyHeader_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +292,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(160374142, proxyHeader_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +312,7 @@ public boolean equals(final java.lang.Object obj) { if (hasProxyHeader()) { if (!getProxyHeader().equals(other.getProxyHeader())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -374,7 +327,7 @@ public int hashCode() { hash = (37 * hash) + PROXY_HEADER_FIELD_NUMBER; hash = (53 * hash) + getProxyHeader().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -505,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TargetSslProxiesSetProxyHeaderRequest.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 @@ -615,7 +561,7 @@ public Builder mergeFrom( proxyHeader_ = other.proxyHeader_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -630,19 +576,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetSslProxiesSetProxyHeaderRequest 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 1282993138: + { + proxyHeader_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1282993138 + 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.compute.v1.TargetSslProxiesSetProxyHeaderRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -808,7 +772,18 @@ public TargetSslProxiesSetProxyHeaderRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetSslProxiesSetProxyHeaderRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetSslCertificatesRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetSslCertificatesRequest.java index 910255a1955f..e596df72cee0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetSslCertificatesRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxiesSetSslCertificatesRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetSslProxiesSetSslCertificatesRequest( - 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 -1366914950: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sslCertificates_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sslCertificates_.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)) { - sslCertificates_ = sslCertificates_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetSslProxiesSetSslCertificatesRequest_descriptor; @@ -200,7 +147,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 366006543, sslCertificates_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -217,7 +164,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getSslCertificatesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -234,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequest) obj; if (!getSslCertificatesList().equals(other.getSslCertificatesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -249,7 +196,7 @@ public int hashCode() { hash = (37 * hash) + SSL_CERTIFICATES_FIELD_NUMBER; hash = (53 * hash) + getSslCertificatesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -380,17 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequest.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 @@ -496,7 +436,7 @@ public Builder mergeFrom( } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -511,19 +451,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetSslProxiesSetSslCertificatesRequest 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 -1366914950: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSslCertificatesIsMutable(); + sslCertificates_.add(s); + break; + } // case -1366914950 + 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.compute.v1.TargetSslProxiesSetSslCertificatesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -732,7 +691,19 @@ public TargetSslProxiesSetSslCertificatesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetSslProxiesSetSslCertificatesRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxy.java index 25a6fec4e4a6..47e389f4bb34 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxy.java @@ -61,128 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetSslProxy( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - creationTimestamp_ = s; - break; - } - case 1251710370: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - certificateMap_ = s; - break; - } - case 1282993138: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - proxyHeader_ = s; - break; - } - case -1933445590: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - sslPolicy_ = s; - break; - } - case -1366914950: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - sslCertificates_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000200; - } - sslCertificates_.add(s); - break; - } - case -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - service_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - selfLink_ = 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_ & 0x00000200) != 0)) { - sslCertificates_ = sslCertificates_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetSslProxy_descriptor; @@ -1045,7 +923,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1093,7 +971,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1150,7 +1028,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSslPolicy()) { if (!getSslPolicy().equals(other.getSslPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1205,7 +1083,7 @@ public int hashCode() { hash = (37 * hash) + SSL_POLICY_FIELD_NUMBER; hash = (53 * hash) + getSslPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1334,17 +1212,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetSslProxy.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 @@ -1554,7 +1425,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetSslProxy other) { sslPolicy_ = other.sslPolicy_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1569,17 +1440,98 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetSslProxy 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 1251710370: + { + certificateMap_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1251710370 + case 1282993138: + { + proxyHeader_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1282993138 + case -1933445590: + { + sslPolicy_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -1933445590 + case -1366914950: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSslCertificatesIsMutable(); + sslCertificates_.add(s); + break; + } // case -1366914950 + case -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -1306643030 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case -645248918 + 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.compute.v1.TargetSslProxy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2938,7 +2890,18 @@ public TargetSslProxy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetSslProxy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxyList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxyList.java index 8da078d0ba43..beadd7e3be87 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxyList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetSslProxyList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetSslProxyList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetSslProxy.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetSslProxyList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetSslProxyList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetSslProxyList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.TargetSslProxy m = + input.readMessage( + com.google.cloud.compute.v1.TargetSslProxy.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetSslProxyList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2080,7 +2040,18 @@ public TargetSslProxyList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetSslProxyList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxiesSetBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxiesSetBackendServiceRequest.java index 03f11f657307..f5deb72068b1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxiesSetBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxiesSetBackendServiceRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetTcpProxiesSetBackendServiceRequest( - 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 -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - service_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetTcpProxiesSetBackendServiceRequest_descriptor; @@ -197,7 +150,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 373540533, service_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -209,7 +162,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(373540533, service_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -229,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { if (hasService()) { if (!getService().equals(other.getService())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -244,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -375,17 +328,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TargetTcpProxiesSetBackendServiceRequest.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 @@ -487,7 +433,7 @@ public Builder mergeFrom( service_ = other.service_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -502,19 +448,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetTcpProxiesSetBackendServiceRequest 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 -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1306643030 + 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.compute.v1.TargetTcpProxiesSetBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -674,7 +638,18 @@ public TargetTcpProxiesSetBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetTcpProxiesSetBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxiesSetProxyHeaderRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxiesSetProxyHeaderRequest.java index 79d1452879bf..3513f738238a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxiesSetProxyHeaderRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxiesSetProxyHeaderRequest.java @@ -53,53 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetTcpProxiesSetProxyHeaderRequest( - 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 1282993138: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - proxyHeader_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetTcpProxiesSetProxyHeaderRequest_descriptor; @@ -327,7 +280,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 160374142, proxyHeader_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +292,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(160374142, proxyHeader_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +312,7 @@ public boolean equals(final java.lang.Object obj) { if (hasProxyHeader()) { if (!getProxyHeader().equals(other.getProxyHeader())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -374,7 +327,7 @@ public int hashCode() { hash = (37 * hash) + PROXY_HEADER_FIELD_NUMBER; hash = (53 * hash) + getProxyHeader().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -505,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TargetTcpProxiesSetProxyHeaderRequest.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 @@ -615,7 +561,7 @@ public Builder mergeFrom( proxyHeader_ = other.proxyHeader_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -630,19 +576,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetTcpProxiesSetProxyHeaderRequest 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 1282993138: + { + proxyHeader_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1282993138 + 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.compute.v1.TargetTcpProxiesSetProxyHeaderRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -808,7 +772,18 @@ public TargetTcpProxiesSetProxyHeaderRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetTcpProxiesSetProxyHeaderRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxy.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxy.java index 3c03d2aca597..644de86cb38d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxy.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxy.java @@ -59,114 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetTcpProxy( - 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 26840: - { - bitField0_ |= 0x00000004; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - region_ = s; - break; - } - case 1282993138: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - proxyHeader_ = s; - break; - } - case -2006762640: - { - bitField0_ |= 0x00000020; - proxyBind_ = input.readBool(); - break; - } - case -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - service_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetTcpProxy_descriptor; @@ -933,7 +825,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000100) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -973,7 +865,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000100) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1029,7 +921,7 @@ public boolean equals(final java.lang.Object obj) { if (hasService()) { if (!getService().equals(other.getService())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1080,7 +972,7 @@ public int hashCode() { hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1209,17 +1101,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetTcpProxy.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 +1295,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetTcpProxy other) { service_ = other.service_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1425,17 +1310,91 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetTcpProxy 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1111570338 + case 1282993138: + { + proxyHeader_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1282993138 + case -2006762640: + { + proxyBind_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case -2006762640 + case -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -1306643030 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -645248918 + 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.compute.v1.TargetTcpProxy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2573,7 +2532,18 @@ public TargetTcpProxy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetTcpProxy(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxyList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxyList.java index ff8bbc700fee..809d274035f9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxyList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetTcpProxyList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetTcpProxyList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetTcpProxy.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetTcpProxyList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetTcpProxyList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetTcpProxyList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.TargetTcpProxy m = + input.readMessage( + com.google.cloud.compute.v1.TargetTcpProxy.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetTcpProxyList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2080,7 +2040,18 @@ public TargetTcpProxyList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetTcpProxyList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGateway.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGateway.java index 0427ff67e09c..a1d224d17b59 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGateway.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGateway.java @@ -61,134 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetVpnGateway( - 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 26840: - { - bitField0_ |= 0x00000004; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 836495450: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - tunnels_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000400; - } - tunnels_.add(s); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - region_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - status_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - network_ = s; - break; - } - case -1768396374: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - forwardingRules_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - forwardingRules_.add(s); - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - selfLink_ = 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_ & 0x00000400) != 0)) { - tunnels_ = tunnels_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - forwardingRules_ = forwardingRules_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetVpnGateway_descriptor; @@ -1060,7 +932,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000080) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1113,7 +985,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000080) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1167,7 +1039,7 @@ public boolean equals(final java.lang.Object obj) { if (!getStatus().equals(other.getStatus())) return false; } if (!getTunnelsList().equals(other.getTunnelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1222,7 +1094,7 @@ public int hashCode() { hash = (37 * hash) + TUNNELS_FIELD_NUMBER; hash = (53 * hash) + getTunnelsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1351,17 +1223,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TargetVpnGateway.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 @@ -1577,7 +1442,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetVpnGateway other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1592,17 +1457,99 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetVpnGateway 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 836495450: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTunnelsIsMutable(); + tunnels_.add(s); + break; + } // case 836495450 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1111570338 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1450082194 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1862979954 + case -1768396374: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureForwardingRulesIsMutable(); + forwardingRules_.add(s); + break; + } // case -1768396374 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -645248918 + 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.compute.v1.TargetVpnGateway) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3009,7 +2956,18 @@ public TargetVpnGateway parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetVpnGateway(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayAggregatedList.java index a5d0427a4047..a2344d34c771 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayAggregatedList.java @@ -56,119 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetVpnGatewayAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.TargetVpnGatewaysScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetVpnGatewayAggregatedList_descriptor; @@ -715,7 +602,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -760,7 +647,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -798,7 +685,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -837,7 +724,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1166,7 +1053,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetVpnGatewayAggregatedL if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1181,18 +1068,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetVpnGatewayAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.TargetVpnGatewaysScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetVpnGatewayAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2251,7 +2199,18 @@ public TargetVpnGatewayAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetVpnGatewayAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayList.java index 780bf8631ed7..cd4f9c7e78ef 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewayList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetVpnGatewayList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetVpnGateway.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetVpnGatewayList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetVpnGatewayList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,17 +921,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetVpnGatewayList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.TargetVpnGateway m = + input.readMessage( + com.google.cloud.compute.v1.TargetVpnGateway.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.TargetVpnGatewayList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2081,7 +2041,18 @@ public TargetVpnGatewayList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetVpnGatewayList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewaysScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewaysScopedList.java index 127855f40f0d..c996e271f750 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewaysScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TargetVpnGatewaysScopedList.java @@ -51,77 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TargetVpnGatewaysScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case -1080800190: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - targetVpnGateways_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - targetVpnGateways_.add( - input.readMessage( - com.google.cloud.compute.v1.TargetVpnGateway.parser(), extensionRegistry)); - 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)) { - targetVpnGateways_ = java.util.Collections.unmodifiableList(targetVpnGateways_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TargetVpnGatewaysScopedList_descriptor; @@ -279,7 +208,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < targetVpnGateways_.size(); i++) { output.writeMessage(401770888, targetVpnGateways_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -296,7 +225,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 401770888, targetVpnGateways_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -317,7 +246,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -336,7 +265,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -486,10 +415,11 @@ public Builder clear() { super.clear(); if (targetVpnGatewaysBuilder_ == null) { targetVpnGateways_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + targetVpnGateways_ = null; targetVpnGatewaysBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -623,7 +553,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TargetVpnGatewaysScopedList if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -638,18 +568,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TargetVpnGatewaysScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case -1080800190: + { + com.google.cloud.compute.v1.TargetVpnGateway m = + input.readMessage( + com.google.cloud.compute.v1.TargetVpnGateway.parser(), extensionRegistry); + if (targetVpnGatewaysBuilder_ == null) { + ensureTargetVpnGatewaysIsMutable(); + targetVpnGateways_.add(m); + } else { + targetVpnGatewaysBuilder_.addMessage(m); + } + break; + } // case -1080800190 + 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.compute.v1.TargetVpnGatewaysScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1251,7 +1213,18 @@ public TargetVpnGatewaysScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TargetVpnGatewaysScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestFailure.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestFailure.java index ecc64f00b461..93fb0c503677 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestFailure.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestFailure.java @@ -57,114 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestFailure( - 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 25668930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - host_ = s; - break; - } - case 27468074: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - path_ = s; - break; - } - case 151104376: - { - bitField0_ |= 0x00000010; - expectedRedirectResponseCode_ = input.readInt32(); - break; - } - case 343412424: - { - bitField0_ |= 0x00000002; - actualRedirectResponseCode_ = input.readInt32(); - break; - } - case 1071898994: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - expectedService_ = s; - break; - } - case 2067495986: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - headers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - headers_.add( - input.readMessage( - com.google.cloud.compute.v1.UrlMapTestHeader.parser(), extensionRegistry)); - break; - } - case -1998363630: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - actualOutputUrl_ = s; - break; - } - case -823228222: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - expectedOutputUrl_ = s; - break; - } - case -771930078: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - actualService_ = 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_ & 0x00000040) != 0)) { - headers_ = java.util.Collections.unmodifiableList(headers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestFailure_descriptor; @@ -741,7 +633,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 440379652, actualService_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -782,7 +674,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(440379652, actualService_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -831,7 +723,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPath()) { if (!getPath().equals(other.getPath())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -878,7 +770,7 @@ public int hashCode() { hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1006,19 +898,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestFailure.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) { - getHeadersFieldBuilder(); - } } @java.lang.Override @@ -1038,10 +921,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000020); if (headersBuilder_ == null) { headers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + headers_ = null; headersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); host_ = ""; bitField0_ = (bitField0_ & ~0x00000080); path_ = ""; @@ -1229,7 +1113,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TestFailure other) { path_ = other.path_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1244,17 +1128,92 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestFailure 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 25668930: + { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 25668930 + case 27468074: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 27468074 + case 151104376: + { + expectedRedirectResponseCode_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 151104376 + case 343412424: + { + actualRedirectResponseCode_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 343412424 + case 1071898994: + { + expectedService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1071898994 + case 2067495986: + { + com.google.cloud.compute.v1.UrlMapTestHeader m = + input.readMessage( + com.google.cloud.compute.v1.UrlMapTestHeader.parser(), extensionRegistry); + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(m); + } else { + headersBuilder_.addMessage(m); + } + break; + } // case 2067495986 + case -1998363630: + { + actualOutputUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1998363630 + case -823228222: + { + expectedOutputUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -823228222 + case -771930078: + { + actualService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -771930078 + 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.compute.v1.TestFailure) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2496,7 +2455,18 @@ public TestFailure parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestFailure(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsDiskRequest.java index 140817c8dd89..66ca686d0c1a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsDiskRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsDiskRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsDiskRequest_descriptor; @@ -374,7 +297,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -397,7 +320,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -422,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -443,7 +366,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -573,17 +496,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsDiskRequest.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 @@ -701,7 +617,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TestIamPermissionsDiskReque zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -716,18 +632,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsDiskRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsDiskRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1291,7 +1246,18 @@ public TestIamPermissionsDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsExternalVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsExternalVpnGatewayRequest.java index defdb8655710..07284c431237 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsExternalVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsExternalVpnGatewayRequest.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsExternalVpnGatewayRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsExternalVpnGatewayRequest_descriptor; @@ -316,7 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +266,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +309,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -512,17 +442,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsExternalVpnGatewayRequest.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 @@ -640,7 +563,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -655,19 +578,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsExternalVpnGatewayRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsExternalVpnGatewayRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1129,7 +1084,19 @@ public TestIamPermissionsExternalVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsExternalVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsFirewallPolicyRequest.java index 126a580d5bf4..46a4673901d7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsFirewallPolicyRequest.java @@ -54,69 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsFirewallPolicyRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsFirewallPolicyRequest_descriptor; @@ -256,7 +193,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -273,7 +210,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -296,7 +233,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -313,7 +250,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -445,17 +382,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsFirewallPolicyRequest.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 @@ -564,7 +494,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -579,19 +509,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsFirewallPolicyRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -945,7 +901,18 @@ public TestIamPermissionsFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsImageRequest.java index 2a2a00aeb511..d7a055558b7e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsImageRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsImageRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsImageRequest_descriptor; @@ -315,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -335,7 +265,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +289,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -378,7 +308,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +438,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsImageRequest.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 @@ -629,7 +552,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TestIamPermissionsImageRequ if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,18 +567,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsImageRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsImageRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1113,7 +1069,18 @@ public TestIamPermissionsImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsInstanceRequest.java index 424b94995011..925a05a26b37 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsInstanceRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsInstanceRequest_descriptor; @@ -375,7 +298,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -398,7 +321,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -423,7 +346,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -444,7 +367,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -574,17 +497,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsInstanceRequest.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 @@ -704,7 +620,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TestIamPermissionsInstanceR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -719,19 +635,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1296,7 +1250,18 @@ public TestIamPermissionsInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsInstanceTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsInstanceTemplateRequest.java index 7c890aa8a2e1..c093ba5615a4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsInstanceTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsInstanceTemplateRequest.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsInstanceTemplateRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsInstanceTemplateRequest_descriptor; @@ -316,7 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +266,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +309,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -511,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsInstanceTemplateRequest.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 +560,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -652,19 +575,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsInstanceTemplateRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsInstanceTemplateRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1125,7 +1080,19 @@ public TestIamPermissionsInstanceTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsInstanceTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseCodeRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseCodeRequest.java index 6e1bc8b66979..9b1337faae2b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseCodeRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseCodeRequest.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsLicenseCodeRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsLicenseCodeRequest_descriptor; @@ -316,7 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +266,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +309,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,17 +439,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsLicenseCodeRequest.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 @@ -633,7 +556,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,19 +571,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsLicenseCodeRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsLicenseCodeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1120,7 +1075,18 @@ public TestIamPermissionsLicenseCodeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsLicenseCodeRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseRequest.java index ef1016770c2a..c666e4956ad7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsLicenseRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsLicenseRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsLicenseRequest_descriptor; @@ -315,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -335,7 +265,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +289,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -378,7 +308,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +438,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsLicenseRequest.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 @@ -631,7 +554,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TestIamPermissionsLicenseRe if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,18 +569,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsLicenseRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsLicenseRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1116,7 +1072,18 @@ public TestIamPermissionsLicenseRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsLicenseRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsMachineImageRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsMachineImageRequest.java index 2f6bdd2491b4..67f9a688d5c5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsMachineImageRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsMachineImageRequest.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsMachineImageRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsMachineImageRequest_descriptor; @@ -316,7 +246,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +266,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -360,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -379,7 +309,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -511,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsMachineImageRequest.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 @@ -635,7 +558,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -650,19 +573,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsMachineImageRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsMachineImageRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1122,7 +1077,18 @@ public TestIamPermissionsMachineImageRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsMachineImageRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkEndpointGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkEndpointGroupRequest.java index 52e2f1cf82f8..b7d7bdbdd5f5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkEndpointGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkEndpointGroupRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsNetworkEndpointGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkEndpointGroupRequest_descriptor; @@ -377,7 +300,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -400,7 +323,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -426,7 +349,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -447,7 +370,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -580,17 +503,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupRequest.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 @@ -716,7 +632,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -731,20 +647,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsNetworkEndpointGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsNetworkEndpointGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1312,7 +1265,19 @@ public TestIamPermissionsNetworkEndpointGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsNetworkEndpointGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkFirewallPolicyRequest.java index 11b155e84dc7..261d33761a2a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNetworkFirewallPolicyRequest.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsNetworkFirewallPolicyRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsNetworkFirewallPolicyRequest_descriptor; @@ -317,7 +247,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -337,7 +267,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -381,7 +311,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -519,17 +449,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest.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 @@ -648,7 +571,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -663,20 +586,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1138,7 +1092,19 @@ public TestIamPermissionsNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsNetworkFirewallPolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNodeGroupRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNodeGroupRequest.java index 2e7db05381f8..7014628b7533 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNodeGroupRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNodeGroupRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsNodeGroupRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsNodeGroupRequest_descriptor; @@ -375,7 +298,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -398,7 +321,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -423,7 +346,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -444,7 +367,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -574,17 +497,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest.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 @@ -704,7 +620,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TestIamPermissionsNodeGroup zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -719,19 +635,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsNodeGroupRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsNodeGroupRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1297,7 +1251,18 @@ public TestIamPermissionsNodeGroupRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsNodeGroupRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNodeTemplateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNodeTemplateRequest.java index 73a816acfd8e..bcce929c59ed 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNodeTemplateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsNodeTemplateRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsNodeTemplateRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsNodeTemplateRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -577,17 +500,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsNodeTemplateRequest.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 @@ -708,7 +624,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -723,19 +639,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsNodeTemplateRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsNodeTemplateRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1301,7 +1255,18 @@ public TestIamPermissionsNodeTemplateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsNodeTemplateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsPacketMirroringRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsPacketMirroringRequest.java index c5be455153af..15c3d984cd3c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsPacketMirroringRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsPacketMirroringRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsPacketMirroringRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsPacketMirroringRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -577,17 +500,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsPacketMirroringRequest.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 @@ -710,7 +626,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,19 +641,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsPacketMirroringRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsPacketMirroringRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1303,7 +1257,18 @@ public TestIamPermissionsPacketMirroringRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsPacketMirroringRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsRegionDiskRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsRegionDiskRequest.java index 9a7289f226bf..7969ef8d6b93 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsRegionDiskRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsRegionDiskRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsRegionDiskRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsRegionDiskRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -575,17 +498,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsRegionDiskRequest.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 @@ -706,7 +622,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,19 +637,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsRegionDiskRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsRegionDiskRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1299,7 +1253,18 @@ public TestIamPermissionsRegionDiskRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsRegionDiskRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsRegionNetworkFirewallPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsRegionNetworkFirewallPolicyRequest.java index 9adf867e48af..967b7a08cd5f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsRegionNetworkFirewallPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsRegionNetworkFirewallPolicyRequest.java @@ -57,83 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsRegionNetworkFirewallPolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsRegionNetworkFirewallPolicyRequest_descriptor; @@ -378,7 +301,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -401,7 +324,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +351,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -449,7 +372,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -589,17 +512,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsRegionNetworkFirewallPolicyRequest.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 +645,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,20 +660,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsRegionNetworkFirewallPolicyRequest - 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsRegionNetworkFirewallPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1328,8 +1281,19 @@ public TestIamPermissionsRegionNetworkFirewallPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsRegionNetworkFirewallPolicyRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsReservationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsReservationRequest.java index df57967e9d36..20dfde0f282c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsReservationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsReservationRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsReservationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsReservationRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -575,17 +498,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsReservationRequest.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 @@ -706,7 +622,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,19 +637,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsReservationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsReservationRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1299,7 +1253,18 @@ public TestIamPermissionsReservationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsReservationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsResourcePolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsResourcePolicyRequest.java index 35981dd0f140..4c160cb60b80 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsResourcePolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsResourcePolicyRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsResourcePolicyRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsResourcePolicyRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -577,17 +500,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsResourcePolicyRequest.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 @@ -710,7 +626,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -725,19 +641,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsResourcePolicyRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsResourcePolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1303,7 +1257,18 @@ public TestIamPermissionsResourcePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsResourcePolicyRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsServiceAttachmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsServiceAttachmentRequest.java index 3d3c2421f7bb..db8a8bba6483 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsServiceAttachmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsServiceAttachmentRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsServiceAttachmentRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsServiceAttachmentRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -577,17 +500,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.TestIamPermissionsServiceAttachmentRequest.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 @@ -711,7 +627,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -726,19 +642,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsServiceAttachmentRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsServiceAttachmentRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1305,7 +1259,19 @@ public TestIamPermissionsServiceAttachmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsServiceAttachmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsSnapshotRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsSnapshotRequest.java index 1b7d85dca116..504bc0748174 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsSnapshotRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsSnapshotRequest.java @@ -54,76 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsSnapshotRequest( - 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 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsSnapshotRequest_descriptor; @@ -315,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -335,7 +265,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +289,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -378,7 +308,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -508,17 +438,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsSnapshotRequest.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 @@ -631,7 +554,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TestIamPermissionsSnapshotR if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -646,19 +569,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsSnapshotRequest 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 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsSnapshotRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1117,7 +1072,18 @@ public TestIamPermissionsSnapshotRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsSnapshotRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsSubnetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsSubnetworkRequest.java index 4208831196ea..734778fda2f1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsSubnetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsSubnetworkRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsSubnetworkRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsSubnetworkRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -575,17 +498,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsSubnetworkRequest.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 @@ -706,7 +622,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,19 +637,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsSubnetworkRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsSubnetworkRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1299,7 +1253,18 @@ public TestIamPermissionsSubnetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsSubnetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsVpnGatewayRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsVpnGatewayRequest.java index c5489cb26409..5a1baccbe1a6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsVpnGatewayRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestIamPermissionsVpnGatewayRequest.java @@ -56,83 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsVpnGatewayRequest( - 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 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1566449778: - { - java.lang.String s = input.readStringRequireUtf8(); - - resource_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -781249230: - { - com.google.cloud.compute.v1.TestPermissionsRequest.Builder subBuilder = null; - if (testPermissionsRequestResource_ != null) { - subBuilder = testPermissionsRequestResource_.toBuilder(); - } - testPermissionsRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.TestPermissionsRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testPermissionsRequestResource_); - testPermissionsRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestIamPermissionsVpnGatewayRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (testPermissionsRequestResource_ != null) { output.writeMessage(439214758, getTestPermissionsRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439214758, getTestPermissionsRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestPermissionsRequestResource().equals(other.getTestPermissionsRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PERMISSIONS_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getTestPermissionsRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -575,17 +498,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestIamPermissionsVpnGatewayRequest.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 @@ -706,7 +622,7 @@ public Builder mergeFrom( if (other.hasTestPermissionsRequestResource()) { mergeTestPermissionsRequestResource(other.getTestPermissionsRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,19 +637,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestIamPermissionsVpnGatewayRequest 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 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1566449778: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 1566449778 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -781249230: + { + input.readMessage( + getTestPermissionsRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -781249230 + 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.compute.v1.TestIamPermissionsVpnGatewayRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1299,7 +1253,18 @@ public TestIamPermissionsVpnGatewayRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsVpnGatewayRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestPermissionsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestPermissionsRequest.java index 253c1ccc13ac..efd3b982d70f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestPermissionsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestPermissionsRequest.java @@ -51,59 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestPermissionsRequest( - 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 479700002: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - permissions_.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)) { - permissions_ = permissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestPermissionsRequest_descriptor; @@ -197,7 +144,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < permissions_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 59962500, permissions_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -214,7 +161,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getPermissionsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -231,7 +178,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.TestPermissionsRequest) obj; if (!getPermissionsList().equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -246,7 +193,7 @@ public int hashCode() { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -374,17 +321,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestPermissionsRequest.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 @@ -485,7 +425,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TestPermissionsRequest othe } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -500,18 +440,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestPermissionsRequest 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 479700002: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePermissionsIsMutable(); + permissions_.add(s); + break; + } // case 479700002 + 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.compute.v1.TestPermissionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -717,7 +677,18 @@ public TestPermissionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestPermissionsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestPermissionsResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestPermissionsResponse.java index 2da9c4a541de..098522a7bc4c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestPermissionsResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/TestPermissionsResponse.java @@ -51,59 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestPermissionsResponse( - 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 479700002: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - permissions_.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)) { - permissions_ = permissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_TestPermissionsResponse_descriptor; @@ -197,7 +144,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < permissions_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 59962500, permissions_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -214,7 +161,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getPermissionsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -231,7 +178,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.TestPermissionsResponse) obj; if (!getPermissionsList().equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -246,7 +193,7 @@ public int hashCode() { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -374,17 +321,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.TestPermissionsResponse.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 @@ -485,7 +425,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.TestPermissionsResponse oth } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -500,18 +440,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.TestPermissionsResponse 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 479700002: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePermissionsIsMutable(); + permissions_.add(s); + break; + } // case 479700002 + 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.compute.v1.TestPermissionsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -717,7 +677,18 @@ public TestPermissionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestPermissionsResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Uint128.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Uint128.java index 6a7f95c49b31..7b5e26dea509 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Uint128.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Uint128.java @@ -49,58 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Uint128( - 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 858784: - { - bitField0_ |= 0x00000002; - low_ = input.readUInt64(); - break; - } - case 25619728: - { - bitField0_ |= 0x00000001; - high_ = input.readUInt64(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_Uint128_descriptor; @@ -179,7 +127,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeUInt64(3202466, high_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -194,7 +142,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3202466, high_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -217,7 +165,7 @@ public boolean equals(final java.lang.Object obj) { if (hasLow()) { if (getLow() != other.getLow()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -236,7 +184,7 @@ public int hashCode() { hash = (37 * hash) + LOW_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getLow()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -363,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Uint128.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 +416,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Uint128 other) { if (other.hasLow()) { setLow(other.getLow()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -490,17 +431,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Uint128 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 858784: + { + low_ = input.readUInt64(); + bitField0_ |= 0x00000002; + break; + } // case 858784 + case 25619728: + { + high_ = input.readUInt64(); + bitField0_ |= 0x00000001; + break; + } // case 25619728 + 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.compute.v1.Uint128) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -624,7 +591,18 @@ public Uint128 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Uint128(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateAccessConfigInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateAccessConfigInstanceRequest.java index eabd556e50a4..356af3a67cc3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateAccessConfigInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateAccessConfigInstanceRequest.java @@ -57,97 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateAccessConfigInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1371864254: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkInterface_ = s; - break; - } - case -1192362878: - { - com.google.cloud.compute.v1.AccessConfig.Builder subBuilder = null; - if (accessConfigResource_ != null) { - subBuilder = accessConfigResource_.toBuilder(); - } - accessConfigResource_ = - input.readMessage( - com.google.cloud.compute.v1.AccessConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(accessConfigResource_); - accessConfigResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateAccessConfigInstanceRequest_descriptor; @@ -518,7 +427,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (accessConfigResource_ != null) { output.writeMessage(387825552, getAccessConfigResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -548,7 +457,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 387825552, getAccessConfigResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -576,7 +485,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -603,7 +512,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -733,17 +642,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest.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 @@ -884,7 +786,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateAccessConfigInstanceR zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -899,19 +801,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateAccessConfigInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1371864254: + { + networkInterface_ = input.readStringRequireUtf8(); + + break; + } // case -1371864254 + case -1192362878: + { + input.readMessage( + getAccessConfigResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1192362878 + 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.compute.v1.UpdateAccessConfigInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1718,7 +1669,18 @@ public UpdateAccessConfigInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAccessConfigInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateAutoscalerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateAutoscalerRequest.java index 22bee48df7cf..c5e710b50d04 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateAutoscalerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateAutoscalerRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateAutoscalerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1660928946: - { - com.google.cloud.compute.v1.Autoscaler.Builder subBuilder = null; - if (autoscalerResource_ != null) { - subBuilder = autoscalerResource_.toBuilder(); - } - autoscalerResource_ = - input.readMessage( - com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalerResource_); - autoscalerResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -156895558: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - autoscaler_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateAutoscalerRequest_descriptor; @@ -472,7 +388,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517258967, autoscaler_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -498,7 +414,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517258967, autoscaler_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -528,7 +444,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -555,7 +471,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -684,17 +600,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateAutoscalerRequest.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 @@ -830,7 +739,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateAutoscalerRequest oth zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -845,18 +754,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateAutoscalerRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1660928946: + { + input.readMessage( + getAutoscalerResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1660928946 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -156895558: + { + autoscaler_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -156895558 + 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.compute.v1.UpdateAutoscalerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1570,7 +1523,18 @@ public UpdateAutoscalerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAutoscalerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateBackendBucketRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateBackendBucketRequest.java index d6af4f435530..08412e1545a9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateBackendBucketRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateBackendBucketRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateBackendBucketRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 733712298: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendBucket_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1248905022: - { - com.google.cloud.compute.v1.BackendBucket.Builder subBuilder = null; - if (backendBucketResource_ != null) { - subBuilder = backendBucketResource_.toBuilder(); - } - backendBucketResource_ = - input.readMessage( - com.google.cloud.compute.v1.BackendBucket.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backendBucketResource_); - backendBucketResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateBackendBucketRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backendBucketResource_ != null) { output.writeMessage(380757784, getBackendBucketResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +339,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 380757784, getBackendBucketResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -595,17 +518,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateBackendBucketRequest.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 @@ -730,7 +646,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateBackendBucketRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -745,18 +661,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateBackendBucketRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 733712298: + { + backendBucket_ = input.readStringRequireUtf8(); + + break; + } // case 733712298 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1248905022: + { + input.readMessage( + getBackendBucketResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1248905022 + 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.compute.v1.UpdateBackendBucketRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1340,7 +1294,18 @@ public UpdateBackendBucketRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateBackendBucketRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateBackendServiceRequest.java index 49accf852d58..6462dec99a2a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateBackendServiceRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = s; - break; - } - case -1514273510: - { - com.google.cloud.compute.v1.BackendService.Builder subBuilder = null; - if (backendServiceResource_ != null) { - subBuilder = backendServiceResource_.toBuilder(); - } - backendServiceResource_ = - input.readMessage( - com.google.cloud.compute.v1.BackendService.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backendServiceResource_); - backendServiceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateBackendServiceRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backendServiceResource_ != null) { output.writeMessage(347586723, getBackendServiceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +339,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 347586723, getBackendServiceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -595,17 +518,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateBackendServiceRequest.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 @@ -730,7 +646,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateBackendServiceRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -745,18 +661,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + case -1514273510: + { + input.readMessage( + getBackendServiceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1514273510 + 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.compute.v1.UpdateBackendServiceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1341,7 +1295,18 @@ public UpdateBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateDisplayDeviceInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateDisplayDeviceInstanceRequest.java index 94eb31c36965..d8313b8d1b6f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateDisplayDeviceInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateDisplayDeviceInstanceRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateDisplayDeviceInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1977478446: - { - com.google.cloud.compute.v1.DisplayDevice.Builder subBuilder = null; - if (displayDeviceResource_ != null) { - subBuilder = displayDeviceResource_.toBuilder(); - } - displayDeviceResource_ = - input.readMessage( - com.google.cloud.compute.v1.DisplayDevice.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(displayDeviceResource_); - displayDeviceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateDisplayDeviceInstanceRequest_descriptor; @@ -458,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (displayDeviceResource_ != null) { output.writeMessage(289686106, getDisplayDeviceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +400,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 289686106, getDisplayDeviceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -511,7 +427,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -536,7 +452,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -666,17 +582,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest.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 @@ -810,7 +719,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateDisplayDeviceInstance zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -825,19 +734,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateDisplayDeviceInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1977478446: + { + input.readMessage( + getDisplayDeviceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1977478446 + 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.compute.v1.UpdateDisplayDeviceInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1539,7 +1491,18 @@ public UpdateDisplayDeviceInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateDisplayDeviceInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateFirewallRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateFirewallRequest.java index 2c611a4fcde8..fd444c66ce12 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateFirewallRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateFirewallRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateFirewallRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 331400042: - { - com.google.cloud.compute.v1.Firewall.Builder subBuilder = null; - if (firewallResource_ != null) { - subBuilder = firewallResource_.toBuilder(); - } - firewallResource_ = - input.readMessage( - com.google.cloud.compute.v1.Firewall.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(firewallResource_); - firewallResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -206837758: - { - java.lang.String s = input.readStringRequireUtf8(); - - firewall_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateFirewallRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewall_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 511016192, firewall_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -415,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firewall_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(511016192, firewall_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -441,7 +364,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -464,7 +387,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -593,17 +516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateFirewallRequest.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 @@ -728,7 +644,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateFirewallRequest other requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -743,18 +659,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateFirewallRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 331400042: + { + input.readMessage( + getFirewallResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 331400042 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -206837758: + { + firewall_ = input.readStringRequireUtf8(); + + break; + } // case -206837758 + 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.compute.v1.UpdateFirewallRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1338,7 +1292,18 @@ public UpdateFirewallRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateFirewallRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateHealthCheckRequest.java index 47728210bdac..d1fc97cbcdc2 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateHealthCheckRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateHealthCheckRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1615400258: - { - com.google.cloud.compute.v1.HealthCheck.Builder subBuilder = null; - if (healthCheckResource_ != null) { - subBuilder = healthCheckResource_.toBuilder(); - } - healthCheckResource_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(healthCheckResource_); - healthCheckResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheck_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateHealthCheckRequest_descriptor; @@ -393,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 308876645, healthCheck_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -416,7 +339,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(308876645, healthCheck_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -442,7 +365,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +388,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -594,17 +517,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateHealthCheckRequest.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 +645,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateHealthCheckRequest ot requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,18 +660,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateHealthCheckRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1615400258: + { + input.readMessage( + getHealthCheckResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1615400258 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + + break; + } // case -1823954134 + 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.compute.v1.UpdateHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1339,7 +1293,18 @@ public UpdateHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateInstanceRequest.java index 88d40beebcac..a907070dbe48 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateInstanceRequest.java @@ -57,104 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - requestId_ = s; - break; - } - case 528824426: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - mostDisruptiveAllowedAction_ = s; - break; - } - case 1727906754: - { - com.google.cloud.compute.v1.Instance.Builder subBuilder = null; - if (instanceResource_ != null) { - subBuilder = instanceResource_.toBuilder(); - } - instanceResource_ = - input.readMessage( - com.google.cloud.compute.v1.Instance.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceResource_); - instanceResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2130430814: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - minimalAction_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateInstanceRequest_descriptor; @@ -857,7 +759,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 270567060, minimalAction_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -891,7 +793,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(270567060, minimalAction_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -927,7 +829,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -960,7 +862,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1089,17 +991,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateInstanceRequest.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 @@ -1253,7 +1148,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateInstanceRequest other zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1268,18 +1163,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 296879706 + case 528824426: + { + mostDisruptiveAllowedAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 528824426 + case 1727906754: + { + input.readMessage( + getInstanceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1727906754 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2130430814: + { + minimalAction_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -2130430814 + 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.compute.v1.UpdateInstanceRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2231,7 +2182,18 @@ public UpdateInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateNetworkInterfaceInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateNetworkInterfaceInstanceRequest.java index cc60fa089706..eee5c62d9701 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateNetworkInterfaceInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateNetworkInterfaceInstanceRequest.java @@ -58,97 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateNetworkInterfaceInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1688448982: - { - com.google.cloud.compute.v1.NetworkInterface.Builder subBuilder = null; - if (networkInterfaceResource_ != null) { - subBuilder = networkInterfaceResource_.toBuilder(); - } - networkInterfaceResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworkInterface.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networkInterfaceResource_); - networkInterfaceResource_ = subBuilder.buildPartial(); - } - - break; - } - case -1371864254: - { - java.lang.String s = input.readStringRequireUtf8(); - - networkInterface_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateNetworkInterfaceInstanceRequest_descriptor; @@ -520,7 +429,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkInterface_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 365387880, networkInterface_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -550,7 +459,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(365387880, networkInterface_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -578,7 +487,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -605,7 +514,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -737,17 +646,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest.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 @@ -889,7 +791,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -904,19 +806,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateNetworkInterfaceInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1688448982: + { + input.readMessage( + getNetworkInterfaceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1688448982 + case -1371864254: + { + networkInterface_ = input.readStringRequireUtf8(); + + break; + } // case -1371864254 + 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.compute.v1.UpdateNetworkInterfaceInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1727,7 +1678,18 @@ public UpdateNetworkInterfaceInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateNetworkInterfaceInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePeeringNetworkRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePeeringNetworkRequest.java index 4bd6a918b983..313ff6bcc2f6 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePeeringNetworkRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePeeringNetworkRequest.java @@ -54,84 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdatePeeringNetworkRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1795467978: - { - com.google.cloud.compute.v1.NetworksUpdatePeeringRequest.Builder subBuilder = null; - if (networksUpdatePeeringRequestResource_ != null) { - subBuilder = networksUpdatePeeringRequestResource_.toBuilder(); - } - networksUpdatePeeringRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.NetworksUpdatePeeringRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(networksUpdatePeeringRequestResource_); - networksUpdatePeeringRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - - network_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdatePeeringNetworkRequest_descriptor; @@ -397,7 +319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 232872494, network_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -420,7 +342,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(network_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(232872494, network_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -448,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -471,7 +393,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -601,17 +523,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdatePeeringNetworkRequest.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 @@ -737,7 +652,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdatePeeringNetworkRequest requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -752,18 +667,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdatePeeringNetworkRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1795467978: + { + input.readMessage( + getNetworksUpdatePeeringRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 1795467978 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + + break; + } // case 1862979954 + 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.compute.v1.UpdatePeeringNetworkRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1355,7 +1309,18 @@ public UpdatePeeringNetworkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdatePeeringNetworkRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePerInstanceConfigsInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePerInstanceConfigsInstanceGroupManagerRequest.java index dc6f150ad35c..e57e94b91820 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePerInstanceConfigsInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePerInstanceConfigsInstanceGroupManagerRequest.java @@ -57,94 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdatePerInstanceConfigsInstanceGroupManagerRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1131218418: - { - com.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReq.Builder - subBuilder = null; - if (instanceGroupManagersUpdatePerInstanceConfigsReqResource_ != null) { - subBuilder = instanceGroupManagersUpdatePerInstanceConfigsReqResource_.toBuilder(); - } - instanceGroupManagersUpdatePerInstanceConfigsReqResource_ = - input.readMessage( - com.google.cloud.compute.v1.InstanceGroupManagersUpdatePerInstanceConfigsReq - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(instanceGroupManagersUpdatePerInstanceConfigsReqResource_); - instanceGroupManagersUpdatePerInstanceConfigsReqResource_ = - subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdatePerInstanceConfigsInstanceGroupManagerRequest_descriptor; @@ -471,7 +383,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -499,7 +411,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -531,7 +443,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestId().equals(other.getRequestId())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -558,7 +470,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -697,17 +609,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest.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 @@ -852,7 +757,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -867,20 +772,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest - 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1131218418: + { + input.readMessage( + getInstanceGroupManagersUpdatePerInstanceConfigsReqResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 1131218418 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.UpdatePerInstanceConfigsInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1609,8 +1558,19 @@ public UpdatePerInstanceConfigsInstanceGroupManagerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdatePerInstanceConfigsInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.java index 71b8c4bdbee1..baccb2e5afe1 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.java @@ -58,94 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 712292666: - { - com.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReq.Builder - subBuilder = null; - if (regionInstanceGroupManagerUpdateInstanceConfigReqResource_ != null) { - subBuilder = regionInstanceGroupManagerUpdateInstanceConfigReqResource_.toBuilder(); - } - regionInstanceGroupManagerUpdateInstanceConfigReqResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionInstanceGroupManagerUpdateInstanceConfigReq - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionInstanceGroupManagerUpdateInstanceConfigReqResource_); - regionInstanceGroupManagerUpdateInstanceConfigReqResource_ = - subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1994907162: - { - java.lang.String s = input.readStringRequireUtf8(); - - instanceGroupManager_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest_descriptor; @@ -473,7 +385,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceGroupManager_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 249363395, instanceGroupManager_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -501,7 +413,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 249363395, instanceGroupManager_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -533,7 +445,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -561,7 +473,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -715,17 +627,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.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 @@ -873,7 +778,7 @@ public Builder mergeFrom( requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -888,20 +793,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest - 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 712292666: + { + input.readMessage( + getRegionInstanceGroupManagerUpdateInstanceConfigReqResourceFieldBuilder() + .getBuilder(), + extensionRegistry); + + break; + } // case 712292666 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1994907162: + { + instanceGroupManager_ = input.readStringRequireUtf8(); + + break; + } // case 1994907162 + 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.compute.v1.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1632,8 +1581,19 @@ public UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest parsePartialFro com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionAutoscalerRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionAutoscalerRequest.java index 52aef5f3e152..a505d9401627 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionAutoscalerRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionAutoscalerRequest.java @@ -55,90 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateRegionAutoscalerRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1660928946: - { - com.google.cloud.compute.v1.Autoscaler.Builder subBuilder = null; - if (autoscalerResource_ != null) { - subBuilder = autoscalerResource_.toBuilder(); - } - autoscalerResource_ = - input.readMessage( - com.google.cloud.compute.v1.Autoscaler.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(autoscalerResource_); - autoscalerResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -156895558: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - autoscaler_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateRegionAutoscalerRequest_descriptor; @@ -472,7 +388,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 517258967, autoscaler_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -498,7 +414,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(517258967, autoscaler_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -528,7 +444,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -555,7 +471,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -685,17 +601,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateRegionAutoscalerRequest.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 @@ -831,7 +740,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateRegionAutoscalerReque requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -846,18 +755,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateRegionAutoscalerRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1660928946: + { + input.readMessage( + getAutoscalerResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1660928946 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -156895558: + { + autoscaler_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -156895558 + 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.compute.v1.UpdateRegionAutoscalerRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1571,7 +1524,18 @@ public UpdateRegionAutoscalerRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateRegionAutoscalerRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionBackendServiceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionBackendServiceRequest.java index 193fdea850b9..736b15872a29 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionBackendServiceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionBackendServiceRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateRegionBackendServiceRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - - backendService_ = s; - break; - } - case -1514273510: - { - com.google.cloud.compute.v1.BackendService.Builder subBuilder = null; - if (backendServiceResource_ != null) { - subBuilder = backendServiceResource_.toBuilder(); - } - backendServiceResource_ = - input.readMessage( - com.google.cloud.compute.v1.BackendService.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backendServiceResource_); - backendServiceResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateRegionBackendServiceRequest_descriptor; @@ -458,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (backendServiceResource_ != null) { output.writeMessage(347586723, getBackendServiceResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +400,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 347586723, getBackendServiceResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -511,7 +427,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -536,7 +452,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -666,17 +582,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateRegionBackendServiceRequest.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 @@ -810,7 +719,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateRegionBackendServiceR requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -825,19 +734,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateRegionBackendServiceRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + + break; + } // case -1839398830 + case -1514273510: + { + input.readMessage( + getBackendServiceResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -1514273510 + 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.compute.v1.UpdateRegionBackendServiceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1539,7 +1491,18 @@ public UpdateRegionBackendServiceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateRegionBackendServiceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionCommitmentRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionCommitmentRequest.java index 9586bda391ea..a092326951f0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionCommitmentRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionCommitmentRequest.java @@ -57,104 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateRegionCommitmentRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 851511154: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - paths_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case 1953927106: - { - com.google.cloud.compute.v1.Commitment.Builder subBuilder = null; - if (commitmentResource_ != null) { - subBuilder = commitmentResource_.toBuilder(); - } - commitmentResource_ = - input.readMessage( - com.google.cloud.compute.v1.Commitment.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(commitmentResource_); - commitmentResource_ = subBuilder.buildPartial(); - } - - break; - } - case -437888854: - { - java.lang.String s = input.readStringRequireUtf8(); - - commitment_ = s; - break; - } - case -294329070: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - updateMask_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateRegionCommitmentRequest_descriptor; @@ -589,7 +491,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 500079778, updateMask_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -621,7 +523,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(500079778, updateMask_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -656,7 +558,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; } @@ -689,7 +591,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; } @@ -819,17 +721,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateRegionCommitmentRequest.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 @@ -983,7 +878,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateRegionCommitmentReque updateMask_ = other.updateMask_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -998,18 +893,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateRegionCommitmentRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 851511154: + { + paths_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 851511154 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case 1953927106: + { + input.readMessage( + getCommitmentResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1953927106 + case -437888854: + { + commitment_ = input.readStringRequireUtf8(); + + break; + } // case -437888854 + case -294329070: + { + updateMask_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -294329070 + 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.compute.v1.UpdateRegionCommitmentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1913,7 +1864,18 @@ public UpdateRegionCommitmentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateRegionCommitmentRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionHealthCheckRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionHealthCheckRequest.java index 822ce50d652a..b56afa3d0278 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionHealthCheckRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionHealthCheckRequest.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateRegionHealthCheckRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1615400258: - { - com.google.cloud.compute.v1.HealthCheck.Builder subBuilder = null; - if (healthCheckResource_ != null) { - subBuilder = healthCheckResource_.toBuilder(); - } - healthCheckResource_ = - input.readMessage( - com.google.cloud.compute.v1.HealthCheck.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(healthCheckResource_); - healthCheckResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1823954134: - { - java.lang.String s = input.readStringRequireUtf8(); - - healthCheck_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateRegionHealthCheckRequest_descriptor; @@ -458,7 +374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 308876645, healthCheck_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -484,7 +400,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(healthCheck_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(308876645, healthCheck_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -511,7 +427,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRequestId()) { if (!getRequestId().equals(other.getRequestId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -536,7 +452,7 @@ public int hashCode() { hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; hash = (53 * hash) + getRequestId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -666,17 +582,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateRegionHealthCheckRequest.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 @@ -808,7 +717,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateRegionHealthCheckRequ requestId_ = other.requestId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -823,18 +732,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateRegionHealthCheckRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1615400258: + { + input.readMessage( + getHealthCheckResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1615400258 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1823954134: + { + healthCheck_ = input.readStringRequireUtf8(); + + break; + } // case -1823954134 + 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.compute.v1.UpdateRegionHealthCheckRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1534,7 +1487,18 @@ public UpdateRegionHealthCheckRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateRegionHealthCheckRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionUrlMapRequest.java index 421bad980510..a979d44b4d23 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRegionUrlMapRequest.java @@ -55,89 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateRegionUrlMapRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1349403402: - { - com.google.cloud.compute.v1.UrlMap.Builder subBuilder = null; - if (urlMapResource_ != null) { - subBuilder = urlMapResource_.toBuilder(); - } - urlMapResource_ = - input.readMessage(com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapResource_); - urlMapResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateRegionUrlMapRequest_descriptor; @@ -456,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -481,7 +398,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -508,7 +425,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMapResource()) { if (!getUrlMapResource().equals(other.getUrlMapResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -533,7 +450,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -663,17 +580,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateRegionUrlMapRequest.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 @@ -805,7 +715,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateRegionUrlMapRequest o if (other.hasUrlMapResource()) { mergeUrlMapResource(other.getUrlMapResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -820,18 +730,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateRegionUrlMapRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1349403402: + { + input.readMessage(getUrlMapResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1349403402 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + 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.compute.v1.UpdateRegionUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1530,7 +1483,18 @@ public UpdateRegionUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateRegionUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateReservationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateReservationRequest.java index 221e45e37c41..d4cbd1440010 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateReservationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateReservationRequest.java @@ -57,104 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateReservationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - requestId_ = s; - break; - } - case 380247650: - { - java.lang.String s = input.readStringRequireUtf8(); - - reservation_ = s; - break; - } - case 851511154: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - paths_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2014725878: - { - com.google.cloud.compute.v1.Reservation.Builder subBuilder = null; - if (reservationResource_ != null) { - subBuilder = reservationResource_.toBuilder(); - } - reservationResource_ = - input.readMessage( - com.google.cloud.compute.v1.Reservation.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(reservationResource_); - reservationResource_ = subBuilder.buildPartial(); - } - - break; - } - case -294329070: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - updateMask_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateReservationRequest_descriptor; @@ -589,7 +491,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 500079778, updateMask_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -621,7 +523,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(500079778, updateMask_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -656,7 +558,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -689,7 +591,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -818,17 +720,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateReservationRequest.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 @@ -982,7 +877,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateReservationRequest ot zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -997,18 +892,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateReservationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 296879706 + case 380247650: + { + reservation_ = input.readStringRequireUtf8(); + + break; + } // case 380247650 + case 851511154: + { + paths_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 851511154 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2014725878: + { + input.readMessage( + getReservationResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case -2014725878 + case -294329070: + { + updateMask_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -294329070 + 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.compute.v1.UpdateReservationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1912,7 +1863,18 @@ public UpdateReservationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateReservationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRouterRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRouterRequest.java index 13ca990e1b5c..c2927484a74d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRouterRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateRouterRequest.java @@ -55,89 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateRouterRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1188870730: - { - java.lang.String s = input.readStringRequireUtf8(); - - router_ = s; - break; - } - case 1241776674: - { - com.google.cloud.compute.v1.Router.Builder subBuilder = null; - if (routerResource_ != null) { - subBuilder = routerResource_.toBuilder(); - } - routerResource_ = - input.readMessage(com.google.cloud.compute.v1.Router.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(routerResource_); - routerResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateRouterRequest_descriptor; @@ -456,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -481,7 +398,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -508,7 +425,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRouterResource()) { if (!getRouterResource().equals(other.getRouterResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -533,7 +450,7 @@ public int hashCode() { hash = (37 * hash) + ROUTER_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getRouterResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -662,17 +579,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateRouterRequest.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 @@ -804,7 +714,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateRouterRequest other) if (other.hasRouterResource()) { mergeRouterResource(other.getRouterResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -819,17 +729,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateRouterRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1188870730: + { + router_ = input.readStringRequireUtf8(); + + break; + } // case 1188870730 + case 1241776674: + { + input.readMessage(getRouterResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1241776674 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.UpdateRouterRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1528,7 +1482,18 @@ public UpdateRouterRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateRouterRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateShieldedInstanceConfigInstanceRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateShieldedInstanceConfigInstanceRequest.java index 2831528e0b12..9e922929487c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateShieldedInstanceConfigInstanceRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateShieldedInstanceConfigInstanceRequest.java @@ -57,91 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateShieldedInstanceConfigInstanceRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 146056362: - { - java.lang.String s = input.readStringRequireUtf8(); - - instance_ = s; - break; - } - case 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -2118493502: - { - com.google.cloud.compute.v1.ShieldedInstanceConfig.Builder subBuilder = null; - if (shieldedInstanceConfigResource_ != null) { - subBuilder = shieldedInstanceConfigResource_.toBuilder(); - } - shieldedInstanceConfigResource_ = - input.readMessage( - com.google.cloud.compute.v1.ShieldedInstanceConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(shieldedInstanceConfigResource_); - shieldedInstanceConfigResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateShieldedInstanceConfigInstanceRequest_descriptor; @@ -461,7 +376,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (shieldedInstanceConfigResource_ != null) { output.writeMessage(272059224, getShieldedInstanceConfigResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +402,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 272059224, getShieldedInstanceConfigResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -516,7 +431,7 @@ public boolean equals(final java.lang.Object obj) { return false; } if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -541,7 +456,7 @@ public int hashCode() { } hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -674,17 +589,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest.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 @@ -823,7 +731,7 @@ public Builder mergeFrom( zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -838,19 +746,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateShieldedInstanceConfigInstanceRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 146056362: + { + instance_ = input.readStringRequireUtf8(); + + break; + } // case 146056362 + case 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -2118493502: + { + input.readMessage( + getShieldedInstanceConfigResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -2118493502 + 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.compute.v1.UpdateShieldedInstanceConfigInstanceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1560,7 +1512,19 @@ public UpdateShieldedInstanceConfigInstanceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateShieldedInstanceConfigInstanceRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateUrlMapRequest.java index 217e0e8c7089..a9f7c14b0475 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UpdateUrlMapRequest.java @@ -54,82 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateUrlMapRequest( - 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 296879706: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - requestId_ = s; - break; - } - case 1349403402: - { - com.google.cloud.compute.v1.UrlMap.Builder subBuilder = null; - if (urlMapResource_ != null) { - subBuilder = urlMapResource_.toBuilder(); - } - urlMapResource_ = - input.readMessage(com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapResource_); - urlMapResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UpdateUrlMapRequest_descriptor; @@ -392,7 +316,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -414,7 +338,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -440,7 +364,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMapResource()) { if (!getUrlMapResource().equals(other.getUrlMapResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -463,7 +387,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -592,17 +516,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UpdateUrlMapRequest.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 @@ -727,7 +644,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UpdateUrlMapRequest other) if (other.hasUrlMapResource()) { mergeUrlMapResource(other.getUrlMapResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -742,17 +659,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UpdateUrlMapRequest 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 296879706: + { + requestId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 296879706 + case 1349403402: + { + input.readMessage(getUrlMapResourceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 1349403402 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + 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.compute.v1.UpdateUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1335,7 +1290,18 @@ public UpdateUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMap.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMap.java index 11ad55fa2159..bb3b8c595311 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMap.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMap.java @@ -62,198 +62,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlMap( - 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 26840: - { - bitField0_ |= 0x00000080; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 882012426: - { - if (!((mutable_bitField0_ & 0x00004000) != 0)) { - tests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00004000; - } - tests_.add( - input.readMessage( - com.google.cloud.compute.v1.UrlMapTest.parser(), extensionRegistry)); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - region_ = s; - break; - } - case 1877428002: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - fingerprint_ = s; - break; - } - case -2121653542: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - pathMatchers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - pathMatchers_.add( - input.readMessage( - com.google.cloud.compute.v1.PathMatcher.parser(), extensionRegistry)); - break; - } - case -1800528638: - { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - hostRules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000080; - } - hostRules_.add( - input.readMessage( - com.google.cloud.compute.v1.HostRule.parser(), extensionRegistry)); - break; - } - case -1670348478: - { - com.google.cloud.compute.v1.HttpHeaderAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000040) != 0)) { - subBuilder = headerAction_.toBuilder(); - } - headerAction_ = - input.readMessage( - com.google.cloud.compute.v1.HttpHeaderAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(headerAction_); - headerAction_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000040; - break; - } - case -1418940590: - { - com.google.cloud.compute.v1.HttpRedirectAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000008) != 0)) { - subBuilder = defaultUrlRedirect_.toBuilder(); - } - defaultUrlRedirect_ = - input.readMessage( - com.google.cloud.compute.v1.HttpRedirectAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(defaultUrlRedirect_); - defaultUrlRedirect_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000008; - break; - } - case -1333029446: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - defaultService_ = s; - break; - } - case -1263611566: - { - com.google.cloud.compute.v1.HttpRouteAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = defaultRouteAction_.toBuilder(); - } - defaultRouteAction_ = - input.readMessage( - com.google.cloud.compute.v1.HttpRouteAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(defaultRouteAction_); - defaultRouteAction_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - selfLink_ = 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_ & 0x00004000) != 0)) { - tests_ = java.util.Collections.unmodifiableList(tests_); - } - if (((mutable_bitField0_ & 0x00000800) != 0)) { - pathMatchers_ = java.util.Collections.unmodifiableList(pathMatchers_); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - hostRules_ = java.util.Collections.unmodifiableList(hostRules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlMap_descriptor; @@ -1237,7 +1045,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000800) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1299,7 +1107,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000800) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1365,7 +1173,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSelfLink().equals(other.getSelfLink())) return false; } if (!getTestsList().equals(other.getTestsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1436,7 +1244,7 @@ public int hashCode() { hash = (37 * hash) + TESTS_FIELD_NUMBER; hash = (53 * hash) + getTestsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1615,10 +1423,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000040); if (hostRulesBuilder_ == null) { hostRules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); } else { + hostRules_ = null; hostRulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000080); id_ = 0L; bitField0_ = (bitField0_ & ~0x00000100); kind_ = ""; @@ -1627,20 +1436,22 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (pathMatchersBuilder_ == null) { pathMatchers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + pathMatchers_ = null; pathMatchersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); region_ = ""; bitField0_ = (bitField0_ & ~0x00001000); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00002000); if (testsBuilder_ == null) { tests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00004000); } else { + tests_ = null; testsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00004000); return this; } @@ -1939,7 +1750,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlMap other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1954,17 +1765,144 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlMap 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000100; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 882012426: + { + com.google.cloud.compute.v1.UrlMapTest m = + input.readMessage( + com.google.cloud.compute.v1.UrlMapTest.parser(), extensionRegistry); + if (testsBuilder_ == null) { + ensureTestsIsMutable(); + tests_.add(m); + } else { + testsBuilder_.addMessage(m); + } + break; + } // case 882012426 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 1111570338 + case 1877428002: + { + fingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 1877428002 + case -2121653542: + { + com.google.cloud.compute.v1.PathMatcher m = + input.readMessage( + com.google.cloud.compute.v1.PathMatcher.parser(), extensionRegistry); + if (pathMatchersBuilder_ == null) { + ensurePathMatchersIsMutable(); + pathMatchers_.add(m); + } else { + pathMatchersBuilder_.addMessage(m); + } + break; + } // case -2121653542 + case -1800528638: + { + com.google.cloud.compute.v1.HostRule m = + input.readMessage( + com.google.cloud.compute.v1.HostRule.parser(), extensionRegistry); + if (hostRulesBuilder_ == null) { + ensureHostRulesIsMutable(); + hostRules_.add(m); + } else { + hostRulesBuilder_.addMessage(m); + } + break; + } // case -1800528638 + case -1670348478: + { + input.readMessage(getHeaderActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case -1670348478 + case -1418940590: + { + input.readMessage( + getDefaultUrlRedirectFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case -1418940590 + case -1333029446: + { + defaultService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1333029446 + case -1263611566: + { + input.readMessage( + getDefaultRouteActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1263611566 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case -645248918 + 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.compute.v1.UrlMap) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4658,7 +4596,18 @@ public UrlMap parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlMap(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapList.java index 3648869621f1..fdfec7eb7e9c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlMapList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlMapList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -636,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -671,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -823,10 +725,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1001,7 +904,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlMapList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +919,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlMapList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.UrlMap m = + input.readMessage( + com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.UrlMapList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2076,7 +2036,18 @@ public UrlMapList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlMapList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapReference.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapReference.java index 57cf8771cf99..a47e199dcbd7 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapReference.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapReference.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlMapReference( - 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 -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlMapReference_descriptor; @@ -177,7 +130,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -189,7 +142,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -209,7 +162,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUrlMap()) { if (!getUrlMap().equals(other.getUrlMap())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -224,7 +177,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAP_FIELD_NUMBER; hash = (53 * hash) + getUrlMap().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -352,17 +305,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UrlMapReference.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 @@ -458,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlMapReference other) { urlMap_ = other.urlMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -473,17 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlMapReference 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 -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1358801822 + 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.compute.v1.UrlMapReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -605,7 +571,18 @@ public UrlMapReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlMapReference(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapTest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapTest.java index 5cbdc03c4c23..bdd4b82efed0 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapTest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapTest.java @@ -57,101 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlMapTest( - 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 25668930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - host_ = s; - break; - } - case 27468074: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - path_ = s; - break; - } - case 151104376: - { - bitField0_ |= 0x00000004; - expectedRedirectResponseCode_ = input.readInt32(); - break; - } - case 2067495986: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - headers_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - headers_.add( - input.readMessage( - com.google.cloud.compute.v1.UrlMapTestHeader.parser(), extensionRegistry)); - break; - } - case -1306643030: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - service_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - description_ = s; - break; - } - case -823228222: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - expectedOutputUrl_ = 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_ & 0x00000008) != 0)) { - headers_ = java.util.Collections.unmodifiableList(headers_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlMapTest_descriptor; @@ -625,7 +530,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 433967384, expectedOutputUrl_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -658,7 +563,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(433967384, expectedOutputUrl_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -699,7 +604,7 @@ public boolean equals(final java.lang.Object obj) { if (hasService()) { if (!getService().equals(other.getService())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -738,7 +643,7 @@ public int hashCode() { hash = (37 * hash) + SERVICE_FIELD_NUMBER; hash = (53 * hash) + getService().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -867,19 +772,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UrlMapTest.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) { - getHeadersFieldBuilder(); - } } @java.lang.Override @@ -893,10 +789,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (headersBuilder_ == null) { headers_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + headers_ = null; headersBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); host_ = ""; bitField0_ = (bitField0_ & ~0x00000010); path_ = ""; @@ -1070,7 +967,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlMapTest other) { service_ = other.service_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1085,17 +982,80 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlMapTest 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 25668930: + { + host_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 25668930 + case 27468074: + { + path_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 27468074 + case 151104376: + { + expectedRedirectResponseCode_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 151104376 + case 2067495986: + { + com.google.cloud.compute.v1.UrlMapTestHeader m = + input.readMessage( + com.google.cloud.compute.v1.UrlMapTestHeader.parser(), extensionRegistry); + if (headersBuilder_ == null) { + ensureHeadersIsMutable(); + headers_.add(m); + } else { + headersBuilder_.addMessage(m); + } + break; + } // case 2067495986 + case -1306643030: + { + service_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case -1306643030 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -911466526 + case -823228222: + { + expectedOutputUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -823228222 + 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.compute.v1.UrlMapTest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2150,7 +2110,18 @@ public UrlMapTest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlMapTest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapTestHeader.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapTestHeader.java index fadacfa891a0..f7495b960461 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapTestHeader.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapTestHeader.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlMapTestHeader( - 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 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - name_ = s; - break; - } - case 895781770: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlMapTestHeader_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 111972721, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -286,7 +232,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(111972721, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (hasValue()) { if (!getValue().equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +275,7 @@ public int 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; } @@ -458,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UrlMapTestHeader.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 @@ -575,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlMapTestHeader other) { value_ = other.value_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,17 +529,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlMapTestHeader 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 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26989658 + case 895781770: + { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 895781770 + 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.compute.v1.UrlMapTestHeader) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -878,7 +843,18 @@ public UrlMapTestHeader parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlMapTestHeader(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapValidationResult.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapValidationResult.java index 3dc5e217962a..4060d2f15153 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapValidationResult.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapValidationResult.java @@ -53,85 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlMapValidationResult( - 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 1026609728: - { - bitField0_ |= 0x00000001; - loadSucceeded_ = input.readBool(); - break; - } - case 1541670376: - { - bitField0_ |= 0x00000002; - testPassed_ = input.readBool(); - break; - } - case -1813788894: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - loadErrors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - loadErrors_.add(s); - break; - } - case -247494222: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - testFailures_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - testFailures_.add( - input.readMessage( - com.google.cloud.compute.v1.TestFailure.parser(), extensionRegistry)); - 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)) { - loadErrors_ = loadErrors_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - testFailures_ = java.util.Collections.unmodifiableList(testFailures_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlMapValidationResult_descriptor; @@ -306,7 +227,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < testFailures_.size(); i++) { output.writeMessage(505934134, testFailures_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -333,7 +254,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(505934134, testFailures_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +280,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTestPassed()) { if (getTestPassed() != other.getTestPassed()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -386,7 +307,7 @@ public int hashCode() { hash = (37 * hash) + TEST_PASSED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTestPassed()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -515,19 +436,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UrlMapValidationResult.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) { - getTestFailuresFieldBuilder(); - } } @java.lang.Override @@ -539,10 +451,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (testFailuresBuilder_ == null) { testFailures_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + testFailures_ = null; testFailuresBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); testPassed_ = false; bitField0_ = (bitField0_ & ~0x00000008); return this; @@ -690,7 +603,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlMapValidationResult othe if (other.hasTestPassed()) { setTestPassed(other.getTestPassed()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -705,18 +618,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlMapValidationResult 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 1026609728: + { + loadSucceeded_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 1026609728 + case 1541670376: + { + testPassed_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 1541670376 + case -1813788894: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLoadErrorsIsMutable(); + loadErrors_.add(s); + break; + } // case -1813788894 + case -247494222: + { + com.google.cloud.compute.v1.TestFailure m = + input.readMessage( + com.google.cloud.compute.v1.TestFailure.parser(), extensionRegistry); + if (testFailuresBuilder_ == null) { + ensureTestFailuresIsMutable(); + testFailures_.add(m); + } else { + testFailuresBuilder_.addMessage(m); + } + break; + } // case -247494222 + 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.compute.v1.UrlMapValidationResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1209,7 +1167,18 @@ public UrlMapValidationResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlMapValidationResult(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsAggregatedList.java index e593d90a4b77..c188e6c8014c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlMapsAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.UrlMapsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlMapsAggregatedList_descriptor; @@ -703,7 +590,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -746,7 +633,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -784,7 +671,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -823,7 +710,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1151,7 +1038,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlMapsAggregatedList other if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1166,18 +1053,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlMapsAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.UrlMapsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.UrlMapsAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2219,7 +2167,18 @@ public UrlMapsAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlMapsAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsScopedList.java index 26adc9fe9595..1580a265255f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlMapsScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 826817338: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - urlMaps_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - urlMaps_.add( - input.readMessage( - com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry)); - 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)) { - urlMaps_ = java.util.Collections.unmodifiableList(urlMaps_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlMapsScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < urlMaps_.size(); i++) { output.writeMessage(103352167, urlMaps_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +217,7 @@ public int getSerializedSize() { for (int i = 0; i < urlMaps_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(103352167, urlMaps_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +238,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -327,7 +257,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -476,10 +406,11 @@ public Builder clear() { super.clear(); if (urlMapsBuilder_ == null) { urlMaps_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + urlMaps_ = null; urlMapsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -612,7 +543,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlMapsScopedList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -627,17 +558,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlMapsScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 826817338: + { + com.google.cloud.compute.v1.UrlMap m = + input.readMessage( + com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry); + if (urlMapsBuilder_ == null) { + ensureUrlMapsIsMutable(); + urlMaps_.add(m); + } else { + urlMapsBuilder_.addMessage(m); + } + break; + } // case 826817338 + 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.compute.v1.UrlMapsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1209,7 +1173,18 @@ public UrlMapsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlMapsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsValidateRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsValidateRequest.java index dac8b3c43314..f93a28792b57 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsValidateRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsValidateRequest.java @@ -51,74 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlMapsValidateRequest( - 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 50468218: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - loadBalancingSchemes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - loadBalancingSchemes_.add(s); - break; - } - case 1566449778: - { - com.google.cloud.compute.v1.UrlMap.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = resource_.toBuilder(); - } - resource_ = - input.readMessage(com.google.cloud.compute.v1.UrlMap.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(resource_); - resource_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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)) { - loadBalancingSchemes_ = loadBalancingSchemes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlMapsValidateRequest_descriptor; @@ -450,7 +382,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(195806222, getResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -470,7 +402,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(195806222, getResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -491,7 +423,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResource()) { if (!getResource().equals(other.getResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -510,7 +442,7 @@ public int hashCode() { hash = (37 * hash) + RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -770,7 +702,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlMapsValidateRequest othe if (other.hasResource()) { mergeResource(other.getResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -785,18 +717,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlMapsValidateRequest 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 50468218: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLoadBalancingSchemesIsMutable(); + loadBalancingSchemes_.add(s); + break; + } // case 50468218 + case 1566449778: + { + input.readMessage(getResourceFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 1566449778 + 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.compute.v1.UrlMapsValidateRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1197,7 +1155,18 @@ public UrlMapsValidateRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlMapsValidateRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsValidateResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsValidateResponse.java index da8d54b6282d..fb79adcaa6a3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsValidateResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlMapsValidateResponse.java @@ -49,63 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlMapsValidateResponse( - 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 1114521834: - { - com.google.cloud.compute.v1.UrlMapValidationResult.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = result_.toBuilder(); - } - result_ = - input.readMessage( - com.google.cloud.compute.v1.UrlMapValidationResult.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(result_); - result_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlMapsValidateResponse_descriptor; @@ -169,7 +112,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(139315229, getResult()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -181,7 +124,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(139315229, getResult()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -201,7 +144,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResult()) { if (!getResult().equals(other.getResult())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -216,7 +159,7 @@ public int hashCode() { hash = (37 * hash) + RESULT_FIELD_NUMBER; hash = (53 * hash) + getResult().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlMapsValidateResponse oth if (other.hasResult()) { mergeResult(other.getResult()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,18 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlMapsValidateResponse 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 1114521834: + { + input.readMessage(getResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1114521834 + 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.compute.v1.UrlMapsValidateResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -642,7 +604,18 @@ public UrlMapsValidateResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlMapsValidateResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlRewrite.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlRewrite.java index a8b1be8625ac..69c7c83a28b3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlRewrite.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UrlRewrite.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UrlRewrite( - 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 329490890: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - pathPrefixRewrite_ = s; - break; - } - case 1278554026: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - hostRewrite_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UrlRewrite_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 159819253, hostRewrite_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +233,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(159819253, hostRewrite_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +256,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPathPrefixRewrite()) { if (!getPathPrefixRewrite().equals(other.getPathPrefixRewrite())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +275,7 @@ public int hashCode() { hash = (37 * hash) + PATH_PREFIX_REWRITE_FIELD_NUMBER; hash = (53 * hash) + getPathPrefixRewrite().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UrlRewrite.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 @@ -575,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UrlRewrite other) { pathPrefixRewrite_ = other.pathPrefixRewrite_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,17 +529,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UrlRewrite 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 329490890: + { + pathPrefixRewrite_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 329490890 + case 1278554026: + { + hostRewrite_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1278554026 + 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.compute.v1.UrlRewrite) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -878,7 +843,18 @@ public UrlRewrite parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UrlRewrite(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetwork.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetwork.java index 480565c8c6a1..4fd219360f35 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetwork.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetwork.java @@ -61,126 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UsableSubnetwork( - 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 28050354: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - role_ = s; - break; - } - case 784938578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - ipCidrRange_ = s; - break; - } - case 1093271322: - { - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - secondaryIpRanges_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange>(); - mutable_bitField0_ |= 0x00000080; - } - secondaryIpRanges_.add( - input.readMessage( - com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.parser(), - extensionRegistry)); - break; - } - case 1114393522: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - externalIpv6Prefix_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - network_ = s; - break; - } - case -1832345742: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - subnetwork_ = s; - break; - } - case -1763710734: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - purpose_ = s; - break; - } - case -887696246: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - stackType_ = s; - break; - } - case -257698070: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - ipv6AccessType_ = s; - break; - } - case -244806846: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - internalIpv6Prefix_ = 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_ & 0x00000080) != 0)) { - secondaryIpRanges_ = java.util.Collections.unmodifiableList(secondaryIpRanges_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_UsableSubnetwork_descriptor; @@ -1607,7 +1487,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 506270056, internalIpv6Prefix_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1650,7 +1530,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(506270056, internalIpv6Prefix_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1703,7 +1583,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSubnetwork()) { if (!getSubnetwork().equals(other.getSubnetwork())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1754,7 +1634,7 @@ public int hashCode() { hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER; hash = (53 * hash) + getSubnetwork().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1883,19 +1763,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UsableSubnetwork.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) { - getSecondaryIpRangesFieldBuilder(); - } } @java.lang.Override @@ -1917,10 +1788,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000040); if (secondaryIpRangesBuilder_ == null) { secondaryIpRanges_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); } else { + secondaryIpRanges_ = null; secondaryIpRangesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000080); stackType_ = ""; bitField0_ = (bitField0_ & ~0x00000100); subnetwork_ = ""; @@ -2121,7 +1993,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UsableSubnetwork other) { subnetwork_ = other.subnetwork_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2136,17 +2008,99 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UsableSubnetwork 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 28050354: + { + role_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 28050354 + case 784938578: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 784938578 + case 1093271322: + { + com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange m = + input.readMessage( + com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.parser(), + extensionRegistry); + if (secondaryIpRangesBuilder_ == null) { + ensureSecondaryIpRangesIsMutable(); + secondaryIpRanges_.add(m); + } else { + secondaryIpRangesBuilder_.addMessage(m); + } + break; + } // case 1093271322 + case 1114393522: + { + externalIpv6Prefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1114393522 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1862979954 + case -1832345742: + { + subnetwork_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -1832345742 + case -1763710734: + { + purpose_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -1763710734 + case -887696246: + { + stackType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -887696246 + case -257698070: + { + ipv6AccessType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -257698070 + case -244806846: + { + internalIpv6Prefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -244806846 + 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.compute.v1.UsableSubnetwork) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3695,7 +3649,18 @@ public UsableSubnetwork parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UsableSubnetwork(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetworkSecondaryRange.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetworkSecondaryRange.java index 0ceacbb8677c..2fed3070d90d 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetworkSecondaryRange.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetworkSecondaryRange.java @@ -54,60 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UsableSubnetworkSecondaryRange( - 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 784938578: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - ipCidrRange_ = s; - break; - } - case -1637236118: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - rangeName_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UsableSubnetworkSecondaryRange_descriptor; @@ -272,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 332216397, rangeName_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +233,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(332216397, rangeName_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +257,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRangeName()) { if (!getRangeName().equals(other.getRangeName())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +276,7 @@ public int hashCode() { hash = (37 * hash) + RANGE_NAME_FIELD_NUMBER; hash = (53 * hash) + getRangeName().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -460,17 +406,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange.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 @@ -578,7 +517,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UsableSubnetworkSecondaryRa rangeName_ = other.rangeName_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -593,18 +532,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UsableSubnetworkSecondaryRange 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 784938578: + { + ipCidrRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 784938578 + case -1637236118: + { + rangeName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1637236118 + 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.compute.v1.UsableSubnetworkSecondaryRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -882,7 +846,18 @@ public UsableSubnetworkSecondaryRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UsableSubnetworkSecondaryRange(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetworksAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetworksAggregatedList.java index 4697fea220ec..4fdb4bc0b5b3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetworksAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsableSubnetworksAggregatedList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UsableSubnetworksAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.UsableSubnetwork.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_UsableSubnetworksAggregatedList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1003,7 +906,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UsableSubnetworksAggregated if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1018,18 +921,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UsableSubnetworksAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.UsableSubnetwork m = + input.readMessage( + com.google.cloud.compute.v1.UsableSubnetwork.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.UsableSubnetworksAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2082,7 +2041,18 @@ public UsableSubnetworksAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UsableSubnetworksAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsageExportLocation.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsageExportLocation.java index 453d09585546..668985982ee4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsageExportLocation.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/UsageExportLocation.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UsageExportLocation( - 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 -2026086910: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - bucketName_ = s; - break; - } - case -1733377574: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - reportNamePrefix_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_UsageExportLocation_descriptor; @@ -271,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 320198715, reportNamePrefix_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +233,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(320198715, reportNamePrefix_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +257,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReportNamePrefix()) { if (!getReportNamePrefix().equals(other.getReportNamePrefix())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +276,7 @@ public int hashCode() { hash = (37 * hash) + REPORT_NAME_PREFIX_FIELD_NUMBER; hash = (53 * hash) + getReportNamePrefix().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,17 +405,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.UsageExportLocation.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 +516,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.UsageExportLocation other) reportNamePrefix_ = other.reportNamePrefix_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -592,17 +531,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.UsageExportLocation 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 -2026086910: + { + bucketName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -2026086910 + case -1733377574: + { + reportNamePrefix_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1733377574 + 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.compute.v1.UsageExportLocation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -880,7 +845,18 @@ public UsageExportLocation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UsageExportLocation(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ValidateRegionUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ValidateRegionUrlMapRequest.java index 02b21e9c61d0..05f02c7e35d5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ValidateRegionUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ValidateRegionUrlMapRequest.java @@ -54,83 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ValidateRegionUrlMapRequest( - 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 453062866: - { - com.google.cloud.compute.v1.RegionUrlMapsValidateRequest.Builder subBuilder = null; - if (regionUrlMapsValidateRequestResource_ != null) { - subBuilder = regionUrlMapsValidateRequestResource_.toBuilder(); - } - regionUrlMapsValidateRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.RegionUrlMapsValidateRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(regionUrlMapsValidateRequestResource_); - regionUrlMapsValidateRequestResource_ = subBuilder.buildPartial(); - } - - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ValidateRegionUrlMapRequest_descriptor; @@ -376,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 367020684, urlMap_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -399,7 +322,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(urlMap_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(367020684, urlMap_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -424,7 +347,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getRegionUrlMapsValidateRequestResource())) return false; } if (!getUrlMap().equals(other.getUrlMap())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -445,7 +368,7 @@ public int hashCode() { } hash = (37 * hash) + URL_MAP_FIELD_NUMBER; hash = (53 * hash) + getUrlMap().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -575,17 +498,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ValidateRegionUrlMapRequest.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 @@ -704,7 +620,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ValidateRegionUrlMapRequest urlMap_ = other.urlMap_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -719,18 +635,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ValidateRegionUrlMapRequest 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 453062866: + { + input.readMessage( + getRegionUrlMapsValidateRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 453062866 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + 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.compute.v1.ValidateRegionUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1296,7 +1251,18 @@ public ValidateRegionUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ValidateRegionUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ValidateUrlMapRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ValidateUrlMapRequest.java index c404e64dc831..d0b6f586575b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ValidateUrlMapRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ValidateUrlMapRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ValidateUrlMapRequest( - 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 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = s; - break; - } - case -1358801822: - { - java.lang.String s = input.readStringRequireUtf8(); - - urlMap_ = s; - break; - } - case -1127659654: - { - com.google.cloud.compute.v1.UrlMapsValidateRequest.Builder subBuilder = null; - if (urlMapsValidateRequestResource_ != null) { - subBuilder = urlMapsValidateRequestResource_.toBuilder(); - } - urlMapsValidateRequestResource_ = - input.readMessage( - com.google.cloud.compute.v1.UrlMapsValidateRequest.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(urlMapsValidateRequestResource_); - urlMapsValidateRequestResource_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ValidateUrlMapRequest_descriptor; @@ -314,7 +244,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (urlMapsValidateRequestResource_ != null) { output.writeMessage(395913455, getUrlMapsValidateRequestResource()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -334,7 +264,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 395913455, getUrlMapsValidateRequestResource()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -358,7 +288,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUrlMapsValidateRequestResource().equals(other.getUrlMapsValidateRequestResource())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +307,7 @@ public int hashCode() { hash = (37 * hash) + URL_MAPS_VALIDATE_REQUEST_RESOURCE_FIELD_NUMBER; hash = (53 * hash) + getUrlMapsValidateRequestResource().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -506,17 +436,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.ValidateUrlMapRequest.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 @@ -627,7 +550,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ValidateUrlMapRequest other if (other.hasUrlMapsValidateRequestResource()) { mergeUrlMapsValidateRequestResource(other.getUrlMapsValidateRequestResource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -642,18 +565,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ValidateUrlMapRequest 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 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + case -1358801822: + { + urlMap_ = input.readStringRequireUtf8(); + + break; + } // case -1358801822 + case -1127659654: + { + input.readMessage( + getUrlMapsValidateRequestResourceFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case -1127659654 + 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.compute.v1.ValidateUrlMapRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1111,7 +1067,18 @@ public ValidateUrlMapRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ValidateUrlMapRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappings.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappings.java index 1eab1228ac47..e19eefc23efa 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappings.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappings.java @@ -53,71 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VmEndpointNatMappings( - 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 1823580074: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - instanceName_ = s; - break; - } - case 2049572938: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - interfaceNatMappings_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappings>(); - mutable_bitField0_ |= 0x00000002; - } - interfaceNatMappings_.add( - input.readMessage( - com.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappings - .parser(), - extensionRegistry)); - 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_ & 0x00000002) != 0)) { - interfaceNatMappings_ = java.util.Collections.unmodifiableList(interfaceNatMappings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VmEndpointNatMappings_descriptor; @@ -272,7 +207,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < interfaceNatMappings_.size(); i++) { output.writeMessage(256196617, interfaceNatMappings_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -289,7 +224,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 256196617, interfaceNatMappings_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -310,7 +245,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInstanceName().equals(other.getInstanceName())) return false; } if (!getInterfaceNatMappingsList().equals(other.getInterfaceNatMappingsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +264,7 @@ public int hashCode() { hash = (37 * hash) + INTERFACE_NAT_MAPPINGS_FIELD_NUMBER; hash = (53 * hash) + getInterfaceNatMappingsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,19 +393,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.VmEndpointNatMappings.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) { - getInterfaceNatMappingsFieldBuilder(); - } } @java.lang.Override @@ -480,10 +406,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (interfaceNatMappingsBuilder_ == null) { interfaceNatMappings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + interfaceNatMappings_ = null; interfaceNatMappingsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -609,7 +536,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VmEndpointNatMappings other } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -624,18 +551,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VmEndpointNatMappings 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 1823580074: + { + instanceName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1823580074 + case 2049572938: + { + com.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappings m = + input.readMessage( + com.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappings + .parser(), + extensionRegistry); + if (interfaceNatMappingsBuilder_ == null) { + ensureInterfaceNatMappingsIsMutable(); + interfaceNatMappings_.add(m); + } else { + interfaceNatMappingsBuilder_.addMessage(m); + } + break; + } // case 2049572938 + 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.compute.v1.VmEndpointNatMappings) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1101,7 +1062,18 @@ public VmEndpointNatMappings parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VmEndpointNatMappings(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappings.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappings.java index 7c0777f612bf..51c856d0a7b5 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappings.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappings.java @@ -58,117 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VmEndpointNatMappingsInterfaceNatMappings( - 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 1198689274: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - sourceVirtualIp_ = s; - break; - } - case -1895732224: - { - bitField0_ |= 0x00000002; - numTotalNatPorts_ = input.readInt32(); - break; - } - case -1610704952: - { - bitField0_ |= 0x00000001; - numTotalDrainNatPorts_ = input.readInt32(); - break; - } - case -1131442678: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - drainNatIpPortRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - drainNatIpPortRanges_.add(s); - break; - } - case -772239678: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - sourceAliasIpRange_ = s; - break; - } - case -405423550: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - ruleMappings_ = - new java.util.ArrayList< - com.google.cloud.compute.v1 - .VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings>(); - mutable_bitField0_ |= 0x00000010; - } - ruleMappings_.add( - input.readMessage( - com.google.cloud.compute.v1 - .VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings.parser(), - extensionRegistry)); - break; - } - case -40320814: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - natIpPortRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - natIpPortRanges_.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)) { - drainNatIpPortRanges_ = drainNatIpPortRanges_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - ruleMappings_ = java.util.Collections.unmodifiableList(ruleMappings_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - natIpPortRanges_ = natIpPortRanges_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VmEndpointNatMappingsInterfaceNatMappings_descriptor; @@ -627,7 +516,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 531830810, natIpPortRanges_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -670,7 +559,7 @@ public int getSerializedSize() { size += dataSize; size += 5 * getNatIpPortRangesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -705,7 +594,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSourceVirtualIp()) { if (!getSourceVirtualIp().equals(other.getSourceVirtualIp())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -744,7 +633,7 @@ public int hashCode() { hash = (37 * hash) + SOURCE_VIRTUAL_IP_FIELD_NUMBER; hash = (53 * hash) + getSourceVirtualIp().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -876,19 +765,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappings.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) { - getRuleMappingsFieldBuilder(); - } } @java.lang.Override @@ -904,10 +784,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000008); if (ruleMappingsBuilder_ == null) { ruleMappings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); } else { + ruleMappings_ = null; ruleMappingsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); sourceAliasIpRange_ = ""; bitField0_ = (bitField0_ & ~0x00000020); sourceVirtualIp_ = ""; @@ -1095,7 +976,7 @@ public Builder mergeFrom( sourceVirtualIp_ = other.sourceVirtualIp_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1110,19 +991,85 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappings 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 1198689274: + { + sourceVirtualIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 1198689274 + case -1895732224: + { + numTotalNatPorts_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case -1895732224 + case -1610704952: + { + numTotalDrainNatPorts_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case -1610704952 + case -1131442678: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDrainNatIpPortRangesIsMutable(); + drainNatIpPortRanges_.add(s); + break; + } // case -1131442678 + case -772239678: + { + sourceAliasIpRange_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case -772239678 + case -405423550: + { + com.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings + m = + input.readMessage( + com.google.cloud.compute.v1 + .VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings.parser(), + extensionRegistry); + if (ruleMappingsBuilder_ == null) { + ensureRuleMappingsIsMutable(); + ruleMappings_.add(m); + } else { + ruleMappingsBuilder_.addMessage(m); + } + break; + } // case -405423550 + case -40320814: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNatIpPortRangesIsMutable(); + natIpPortRanges_.add(s); + break; + } // case -40320814 + 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.compute.v1.VmEndpointNatMappingsInterfaceNatMappings) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2308,7 +2255,19 @@ public VmEndpointNatMappingsInterfaceNatMappings parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VmEndpointNatMappingsInterfaceNatMappings(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings.java index 4907a1b04cb1..f063769ec180 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings.java @@ -56,90 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings( - 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 -1895732224: - { - bitField0_ |= 0x00000002; - numTotalNatPorts_ = input.readInt32(); - break; - } - case -1610704952: - { - bitField0_ |= 0x00000001; - numTotalDrainNatPorts_ = input.readInt32(); - break; - } - case -1131442678: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - drainNatIpPortRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - drainNatIpPortRanges_.add(s); - break; - } - case -40320814: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - natIpPortRanges_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - natIpPortRanges_.add(s); - break; - } - case -13275296: - { - bitField0_ |= 0x00000004; - ruleNumber_ = 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 { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - drainNatIpPortRanges_ = drainNatIpPortRanges_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - natIpPortRanges_ = natIpPortRanges_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings_descriptor; @@ -410,7 +326,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { output.writeInt32(535211500, ruleNumber_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -445,7 +361,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(535211500, ruleNumber_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -477,7 +393,7 @@ public boolean equals(final java.lang.Object obj) { if (hasRuleNumber()) { if (getRuleNumber() != other.getRuleNumber()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -508,7 +424,7 @@ public int hashCode() { hash = (37 * hash) + RULE_NUMBER_FIELD_NUMBER; hash = (53 * hash) + getRuleNumber(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -650,17 +566,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings.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 @@ -820,7 +729,7 @@ public Builder mergeFrom( if (other.hasRuleNumber()) { setRuleNumber(other.getRuleNumber()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -835,20 +744,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings - 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 -1895732224: + { + numTotalNatPorts_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case -1895732224 + case -1610704952: + { + numTotalDrainNatPorts_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case -1610704952 + case -1131442678: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDrainNatIpPortRangesIsMutable(); + drainNatIpPortRanges_.add(s); + break; + } // case -1131442678 + case -40320814: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureNatIpPortRangesIsMutable(); + natIpPortRanges_.add(s); + break; + } // case -40320814 + case -13275296: + { + ruleNumber_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case -13275296 + 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.compute.v1.VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1430,8 +1382,19 @@ public VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings parsePartialFrom com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VmEndpointNatMappingsInterfaceNatMappingsNatRuleMappings( - 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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsList.java index 2f923be04a0e..a097e36d5b44 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VmEndpointNatMappingsList.java @@ -56,106 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VmEndpointNatMappingsList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 1114521834: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - result_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - result_.add( - input.readMessage( - com.google.cloud.compute.v1.VmEndpointNatMappings.parser(), - extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000008) != 0)) { - result_ = java.util.Collections.unmodifiableList(result_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VmEndpointNatMappingsList_descriptor; @@ -575,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -602,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -639,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -674,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -831,10 +731,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (resultBuilder_ == null) { result_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + result_ = null; resultBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); selfLink_ = ""; bitField0_ = (bitField0_ & ~0x00000010); if (warningBuilder_ == null) { @@ -1006,7 +907,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VmEndpointNatMappingsList o if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1021,18 +922,75 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VmEndpointNatMappingsList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 638380202 + case 1114521834: + { + com.google.cloud.compute.v1.VmEndpointNatMappings m = + input.readMessage( + com.google.cloud.compute.v1.VmEndpointNatMappings.parser(), + extensionRegistry); + if (resultBuilder_ == null) { + ensureResultIsMutable(); + result_.add(m); + } else { + resultBuilder_.addMessage(m); + } + break; + } // case 1114521834 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.VmEndpointNatMappingsList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2089,7 +2047,18 @@ public VmEndpointNatMappingsList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VmEndpointNatMappingsList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGateway.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGateway.java index b9fc4ad3f8fa..06a4eba5b044 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGateway.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGateway.java @@ -61,145 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnGateway( - 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 26840: - { - bitField0_ |= 0x00000004; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 734737450: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - vpnInterfaces_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface>(); - mutable_bitField0_ |= 0x00000800; - } - vpnInterfaces_.add( - input.readMessage( - com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.parser(), - extensionRegistry)); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - region_ = s; - break; - } - case 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - labelFingerprint_ = s; - break; - } - case 1862979954: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - network_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -887696246: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - stackType_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - selfLink_ = s; - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000020; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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_ & 0x00000800) != 0)) { - vpnInterfaces_ = java.util.Collections.unmodifiableList(vpnInterfaces_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGateway_descriptor; @@ -1225,7 +1086,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1280,7 +1141,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1337,7 +1198,7 @@ public boolean equals(final java.lang.Object obj) { if (!getStackType().equals(other.getStackType())) return false; } if (!getVpnInterfacesList().equals(other.getVpnInterfacesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1396,7 +1257,7 @@ public int hashCode() { hash = (37 * hash) + VPN_INTERFACES_FIELD_NUMBER; hash = (53 * hash) + getVpnInterfacesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1545,19 +1406,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.VpnGateway.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) { - getVpnInterfacesFieldBuilder(); - } } @java.lang.Override @@ -1586,10 +1438,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (vpnInterfacesBuilder_ == null) { vpnInterfaces_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + vpnInterfaces_ = null; vpnInterfacesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); return this; } @@ -1796,7 +1649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnGateway other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1811,17 +1664,116 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnGateway 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000004; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 734737450: + { + com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface m = + input.readMessage( + com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.parser(), + extensionRegistry); + if (vpnInterfacesBuilder_ == null) { + ensureVpnInterfacesIsMutable(); + vpnInterfaces_.add(m); + } else { + vpnInterfacesBuilder_.addMessage(m); + } + break; + } // case 734737450 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case 1111570338 + case 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 1424998602 + case 1862979954: + { + network_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1862979954 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -887696246: + { + stackType_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -887696246 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case -645248918 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.VpnGateway) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3576,7 +3528,18 @@ public VpnGateway parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnGateway(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayAggregatedList.java index ae1ea46022ff..1d8879a20803 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnGatewayAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.VpnGatewaysScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGatewayAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1157,7 +1044,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnGatewayAggregatedList ot if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1172,18 +1059,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnGatewayAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.VpnGatewaysScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.VpnGatewayAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2232,7 +2180,18 @@ public VpnGatewayAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnGatewayAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayList.java index c1477943ce0a..c311d250ca30 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnGatewayList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.VpnGateway.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGatewayList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnGatewayList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnGatewayList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.VpnGateway m = + input.readMessage( + com.google.cloud.compute.v1.VpnGateway.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.VpnGatewayList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public VpnGatewayList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnGatewayList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatus.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatus.java index 7fc81484f912..4d19c0869c48 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatus.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatus.java @@ -51,63 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnGatewayStatus( - 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 -780290990: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - vpnConnections_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.VpnGatewayStatusVpnConnection>(); - mutable_bitField0_ |= 0x00000001; - } - vpnConnections_.add( - input.readMessage( - com.google.cloud.compute.v1.VpnGatewayStatusVpnConnection.parser(), - extensionRegistry)); - 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)) { - vpnConnections_ = java.util.Collections.unmodifiableList(vpnConnections_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGatewayStatus_descriptor; @@ -222,7 +165,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < vpnConnections_.size(); i++) { output.writeMessage(439334538, vpnConnections_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -236,7 +179,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 439334538, vpnConnections_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -253,7 +196,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.compute.v1.VpnGatewayStatus) obj; if (!getVpnConnectionsList().equals(other.getVpnConnectionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -268,7 +211,7 @@ public int hashCode() { hash = (37 * hash) + VPN_CONNECTIONS_FIELD_NUMBER; hash = (53 * hash) + getVpnConnectionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -396,19 +339,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.VpnGatewayStatus.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) { - getVpnConnectionsFieldBuilder(); - } } @java.lang.Override @@ -416,10 +350,11 @@ public Builder clear() { super.clear(); if (vpnConnectionsBuilder_ == null) { vpnConnections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + vpnConnections_ = null; vpnConnectionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -533,7 +468,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnGatewayStatus other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -548,17 +483,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnGatewayStatus 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 -780290990: + { + com.google.cloud.compute.v1.VpnGatewayStatusVpnConnection m = + input.readMessage( + com.google.cloud.compute.v1.VpnGatewayStatusVpnConnection.parser(), + extensionRegistry); + if (vpnConnectionsBuilder_ == null) { + ensureVpnConnectionsIsMutable(); + vpnConnections_.add(m); + } else { + vpnConnectionsBuilder_.addMessage(m); + } + break; + } // case -780290990 + 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.compute.v1.VpnGatewayStatus) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1002,7 +965,18 @@ public VpnGatewayStatus parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnGatewayStatus(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusHighAvailabilityRequirementState.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusHighAvailabilityRequirementState.java index 95b7881a9dee..b5e93e16e0cd 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusHighAvailabilityRequirementState.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusHighAvailabilityRequirementState.java @@ -55,60 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnGatewayStatusHighAvailabilityRequirementState( - 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 440130642: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - unsatisfiedReason_ = s; - break; - } - case 878060682: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - state_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGatewayStatusHighAvailabilityRequirementState_descriptor; @@ -567,7 +513,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 109757585, state_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -583,7 +529,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(109757585, state_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -608,7 +554,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUnsatisfiedReason()) { if (!getUnsatisfiedReason().equals(other.getUnsatisfiedReason())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -627,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + UNSATISFIED_REASON_FIELD_NUMBER; hash = (53 * hash) + getUnsatisfiedReason().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -765,17 +711,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.compute.v1.VpnGatewayStatusHighAvailabilityRequirementState.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 @@ -891,7 +830,7 @@ public Builder mergeFrom( unsatisfiedReason_ = other.unsatisfiedReason_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -906,20 +845,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnGatewayStatusHighAvailabilityRequirementState 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 440130642: + { + unsatisfiedReason_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 440130642 + case 878060682: + { + state_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 878060682 + 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.compute.v1.VpnGatewayStatusHighAvailabilityRequirementState) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1214,7 +1176,19 @@ public VpnGatewayStatusHighAvailabilityRequirementState parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnGatewayStatusHighAvailabilityRequirementState(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusTunnel.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusTunnel.java index 7a564bc3faae..bb7cbbc7516a 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusTunnel.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusTunnel.java @@ -52,65 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnGatewayStatusTunnel( - 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 631802050: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - tunnelUrl_ = s; - break; - } - case 1270114640: - { - bitField0_ |= 0x00000001; - localGatewayInterface_ = input.readUInt32(); - break; - } - case 1715043080: - { - bitField0_ |= 0x00000002; - peerGatewayInterface_ = input.readUInt32(); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGatewayStatusTunnel_descriptor; @@ -280,7 +221,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeUInt32(214380385, peerGatewayInterface_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -301,7 +242,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeUInt32Size(214380385, peerGatewayInterface_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -329,7 +270,7 @@ public boolean equals(final java.lang.Object obj) { if (hasTunnelUrl()) { if (!getTunnelUrl().equals(other.getTunnelUrl())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -352,7 +293,7 @@ public int hashCode() { hash = (37 * hash) + TUNNEL_URL_FIELD_NUMBER; hash = (53 * hash) + getTunnelUrl().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.VpnGatewayStatusTunnel.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 @@ -606,7 +540,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnGatewayStatusTunnel othe tunnelUrl_ = other.tunnelUrl_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -621,18 +555,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnGatewayStatusTunnel 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 631802050: + { + tunnelUrl_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 631802050 + case 1270114640: + { + localGatewayInterface_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 1270114640 + case 1715043080: + { + peerGatewayInterface_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 1715043080 + 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.compute.v1.VpnGatewayStatusTunnel) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -924,7 +889,18 @@ public VpnGatewayStatusTunnel parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnGatewayStatusTunnel(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusVpnConnection.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusVpnConnection.java index 1d4fae64d6a9..f3590e013a58 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusVpnConnection.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayStatusVpnConnection.java @@ -54,95 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnGatewayStatusVpnConnection( - 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 836495450: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - tunnels_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - tunnels_.add( - input.readMessage( - com.google.cloud.compute.v1.VpnGatewayStatusTunnel.parser(), - extensionRegistry)); - break; - } - case 878060682: - { - com.google.cloud.compute.v1.VpnGatewayStatusHighAvailabilityRequirementState.Builder - subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = state_.toBuilder(); - } - state_ = - input.readMessage( - com.google.cloud.compute.v1.VpnGatewayStatusHighAvailabilityRequirementState - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(state_); - state_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000004; - break; - } - case -2040027678: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - peerGcpGateway_ = s; - break; - } - case -1215317910: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - peerExternalGateway_ = 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_ & 0x00000008) != 0)) { - tunnels_ = java.util.Collections.unmodifiableList(tunnels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGatewayStatusVpnConnection_descriptor; @@ -442,7 +353,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 384956173, peerExternalGateway_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -464,7 +375,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(384956173, peerExternalGateway_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -493,7 +404,7 @@ public boolean equals(final java.lang.Object obj) { if (!getState().equals(other.getState())) return false; } if (!getTunnelsList().equals(other.getTunnelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -520,7 +431,7 @@ public int hashCode() { hash = (37 * hash) + TUNNELS_FIELD_NUMBER; hash = (53 * hash) + getTunnelsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -681,10 +592,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (tunnelsBuilder_ == null) { tunnels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + tunnels_ = null; tunnelsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -830,7 +742,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnGatewayStatusVpnConnecti } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -845,18 +757,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnGatewayStatusVpnConnection 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 836495450: + { + com.google.cloud.compute.v1.VpnGatewayStatusTunnel m = + input.readMessage( + com.google.cloud.compute.v1.VpnGatewayStatusTunnel.parser(), + extensionRegistry); + if (tunnelsBuilder_ == null) { + ensureTunnelsIsMutable(); + tunnels_.add(m); + } else { + tunnelsBuilder_.addMessage(m); + } + break; + } // case 836495450 + case 878060682: + { + input.readMessage(getStateFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 878060682 + case -2040027678: + { + peerGcpGateway_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -2040027678 + case -1215317910: + { + peerExternalGateway_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1215317910 + 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.compute.v1.VpnGatewayStatusVpnConnection) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1704,7 +1661,18 @@ public VpnGatewayStatusVpnConnection parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnGatewayStatusVpnConnection(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayVpnGatewayInterface.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayVpnGatewayInterface.java index 99472a23a2be..28aa2051f7f3 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayVpnGatewayInterface.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewayVpnGatewayInterface.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnGatewayVpnGatewayInterface( - 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 26840: - { - bitField0_ |= 0x00000001; - id_ = input.readUInt32(); - break; - } - case -1829885022: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - interconnectAttachment_ = s; - break; - } - case -1044789534: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - ipAddress_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGatewayVpnGatewayInterface_descriptor; @@ -314,7 +254,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000004) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 406272220, ipAddress_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -334,7 +274,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(406272220, ipAddress_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +302,7 @@ public boolean equals(final java.lang.Object obj) { if (hasIpAddress()) { if (!getIpAddress().equals(other.getIpAddress())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -385,7 +325,7 @@ public int hashCode() { hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER; hash = (53 * hash) + getIpAddress().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -515,17 +455,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface.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 @@ -642,7 +575,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterfa ipAddress_ = other.ipAddress_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -657,18 +590,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnGatewayVpnGatewayInterface 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 26840: + { + id_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 26840 + case -1829885022: + { + interconnectAttachment_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -1829885022 + case -1044789534: + { + ipAddress_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1044789534 + 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.compute.v1.VpnGatewayVpnGatewayInterface) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1013,7 +977,18 @@ public VpnGatewayVpnGatewayInterface parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnGatewayVpnGatewayInterface(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewaysGetStatusResponse.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewaysGetStatusResponse.java index d066123e314f..63c33946e8e4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewaysGetStatusResponse.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewaysGetStatusResponse.java @@ -49,62 +49,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnGatewaysGetStatusResponse( - 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 1114521834: - { - com.google.cloud.compute.v1.VpnGatewayStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = result_.toBuilder(); - } - result_ = - input.readMessage( - com.google.cloud.compute.v1.VpnGatewayStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(result_); - result_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGatewaysGetStatusResponse_descriptor; @@ -168,7 +112,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(139315229, getResult()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -180,7 +124,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(139315229, getResult()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -200,7 +144,7 @@ public boolean equals(final java.lang.Object obj) { if (hasResult()) { if (!getResult().equals(other.getResult())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -215,7 +159,7 @@ public int hashCode() { hash = (37 * hash) + RESULT_FIELD_NUMBER; hash = (53 * hash) + getResult().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnGatewaysGetStatusRespons if (other.hasResult()) { mergeResult(other.getResult()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnGatewaysGetStatusResponse 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 1114521834: + { + input.readMessage(getResultFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 1114521834 + 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.compute.v1.VpnGatewaysGetStatusResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -641,7 +604,18 @@ public VpnGatewaysGetStatusResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnGatewaysGetStatusResponse(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewaysScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewaysScopedList.java index 611394ec147a..a860d5210b84 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewaysScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnGatewaysScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnGatewaysScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 2073423058: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - vpnGateways_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - vpnGateways_.add( - input.readMessage( - com.google.cloud.compute.v1.VpnGateway.parser(), extensionRegistry)); - 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)) { - vpnGateways_ = java.util.Collections.unmodifiableList(vpnGateways_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnGatewaysScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < vpnGateways_.size(); i++) { output.writeMessage(259177882, vpnGateways_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(259177882, vpnGateways_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (vpnGatewaysBuilder_ == null) { vpnGateways_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + vpnGateways_ = null; vpnGatewaysBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnGatewaysScopedList other if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,18 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnGatewaysScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 2073423058: + { + com.google.cloud.compute.v1.VpnGateway m = + input.readMessage( + com.google.cloud.compute.v1.VpnGateway.parser(), extensionRegistry); + if (vpnGatewaysBuilder_ == null) { + ensureVpnGatewaysIsMutable(); + vpnGateways_.add(m); + } else { + vpnGatewaysBuilder_.addMessage(m); + } + break; + } // case 2073423058 + 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.compute.v1.VpnGatewaysScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1214,7 +1177,18 @@ public VpnGatewaysScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnGatewaysScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnel.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnel.java index ec4bd31ef0de..352b914fc322 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnel.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnel.java @@ -69,208 +69,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnTunnel( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 767832984: - { - bitField0_ |= 0x00080000; - vpnGatewayInterface_ = input.readInt32(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000800; - region_ = s; - break; - } - case 1188870730: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00001000; - router_ = s; - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00010000; - status_ = s; - break; - } - case 1747009760: - { - bitField0_ |= 0x00000010; - ikeVersion_ = input.readInt32(); - break; - } - case -2040027678: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000200; - peerGcpGateway_ = s; - break; - } - case -1756450390: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - localTrafficSelector_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - localTrafficSelector_.add(s); - break; - } - case -1626959094: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - detailedStatus_ = s; - break; - } - case -1423870510: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00002000) != 0)) { - remoteTrafficSelector_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00002000; - } - remoteTrafficSelector_.add(s); - break; - } - case -1239507374: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00004000; - sharedSecret_ = s; - break; - } - case -1228969694: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000400; - peerIp_ = s; - break; - } - case -1215317910: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - peerExternalGateway_ = s; - break; - } - case -1103912166: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00008000; - sharedSecretHash_ = s; - break; - } - case -1041494070: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00040000; - vpnGateway_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - description_ = s; - break; - } - case -672820168: - { - bitField0_ |= 0x00000100; - peerExternalGatewayInterface_ = input.readInt32(); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00002000; - selfLink_ = s; - break; - } - case -34864550: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00020000; - targetVpnGateway_ = 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_ & 0x00000040) != 0)) { - localTrafficSelector_ = localTrafficSelector_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00002000) != 0)) { - remoteTrafficSelector_ = remoteTrafficSelector_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnTunnel_descriptor; @@ -2049,7 +1847,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00020000) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 532512843, targetVpnGateway_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2141,7 +1939,7 @@ public int getSerializedSize() { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(532512843, targetVpnGateway_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2239,7 +2037,7 @@ public boolean equals(final java.lang.Object obj) { if (hasVpnGatewayInterface()) { if (getVpnGatewayInterface() != other.getVpnGatewayInterface()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2338,7 +2136,7 @@ public int hashCode() { hash = (37 * hash) + VPN_GATEWAY_INTERFACE_FIELD_NUMBER; hash = (53 * hash) + getVpnGatewayInterface(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2466,17 +2264,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.VpnTunnel.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 @@ -2807,7 +2598,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnTunnel other) { if (other.hasVpnGatewayInterface()) { setVpnGatewayInterface(other.getVpnGatewayInterface()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2822,17 +2613,165 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnTunnel 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000008; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 244202930 + case 767832984: + { + vpnGatewayInterface_ = input.readInt32(); + bitField0_ |= 0x00200000; + break; + } // case 767832984 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 1111570338 + case 1188870730: + { + router_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00004000; + break; + } // case 1188870730 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00040000; + break; + } // case 1450082194 + case 1747009760: + { + ikeVersion_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 1747009760 + case -2040027678: + { + peerGcpGateway_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case -2040027678 + case -1756450390: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLocalTrafficSelectorIsMutable(); + localTrafficSelector_.add(s); + break; + } // case -1756450390 + case -1626959094: + { + detailedStatus_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -1626959094 + case -1423870510: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRemoteTrafficSelectorIsMutable(); + remoteTrafficSelector_.add(s); + break; + } // case -1423870510 + case -1239507374: + { + sharedSecret_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case -1239507374 + case -1228969694: + { + peerIp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case -1228969694 + case -1215317910: + { + peerExternalGateway_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -1215317910 + case -1103912166: + { + sharedSecretHash_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00020000; + break; + } // case -1103912166 + case -1041494070: + { + vpnGateway_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00100000; + break; + } // case -1041494070 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case -911466526 + case -672820168: + { + peerExternalGatewayInterface_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case -672820168 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case -645248918 + case -34864550: + { + targetVpnGateway_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00080000; + break; + } // case -34864550 + 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.compute.v1.VpnTunnel) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5401,7 +5340,18 @@ public VpnTunnel parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnTunnel(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelAggregatedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelAggregatedList.java index f985a7cb68b5..c2fd1d9919d4 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelAggregatedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelAggregatedList.java @@ -55,119 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnTunnelAggregatedList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = - com.google.protobuf.MapField.newMapField(ItemsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.compute.v1.VpnTunnelsScopedList> - items__ = - input.readMessage( - ItemsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - items_.getMutableMap().put(items__.getKey(), items__.getValue()); - break; - } - case 1946976506: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - unreachables_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - unreachables_.add(s); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000020) != 0)) { - unreachables_ = unreachables_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnTunnelAggregatedList_descriptor; @@ -708,7 +595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -752,7 +639,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -790,7 +677,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -829,7 +716,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1157,7 +1044,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnTunnelAggregatedList oth if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1172,18 +1059,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnTunnelAggregatedList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000040; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.compute.v1.VpnTunnelsScopedList> + items__ = + input.readMessage( + ItemsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableItems().getMutableMap().put(items__.getKey(), items__.getValue()); + break; + } // case 804208130 + case 1946976506: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureUnreachablesIsMutable(); + unreachables_.add(s); + break; + } // case 1946976506 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.VpnTunnelAggregatedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2232,7 +2180,18 @@ public VpnTunnelAggregatedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnTunnelAggregatedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelList.java index daedada7d259..913fabd457b8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelList.java @@ -56,104 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnTunnelList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.VpnTunnel.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnTunnelList_descriptor; @@ -573,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -600,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +539,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -672,7 +574,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,10 +726,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -1002,7 +905,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnTunnelList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1017,17 +920,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnTunnelList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.VpnTunnel m = + input.readMessage( + com.google.cloud.compute.v1.VpnTunnel.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.VpnTunnelList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2079,7 +2039,18 @@ public VpnTunnelList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnTunnelList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelsScopedList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelsScopedList.java index 64a00c3b06b2..8ca21a35736b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelsScopedList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/VpnTunnelsScopedList.java @@ -51,76 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private VpnTunnelsScopedList( - 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 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - case 1307952642: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - vpnTunnels_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - vpnTunnels_.add( - input.readMessage( - com.google.cloud.compute.v1.VpnTunnel.parser(), extensionRegistry)); - 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)) { - vpnTunnels_ = java.util.Collections.unmodifiableList(vpnTunnels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_VpnTunnelsScopedList_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < vpnTunnels_.size(); i++) { output.writeMessage(163494080, vpnTunnels_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -288,7 +218,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(163494080, vpnTunnels_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -309,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +258,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -477,10 +407,11 @@ public Builder clear() { super.clear(); if (vpnTunnelsBuilder_ == null) { vpnTunnels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + vpnTunnels_ = null; vpnTunnelsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (warningBuilder_ == null) { warning_ = null; } else { @@ -614,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.VpnTunnelsScopedList other) if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,17 +560,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.VpnTunnelsScopedList 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 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 405634274 + case 1307952642: + { + com.google.cloud.compute.v1.VpnTunnel m = + input.readMessage( + com.google.cloud.compute.v1.VpnTunnel.parser(), extensionRegistry); + if (vpnTunnelsBuilder_ == null) { + ensureVpnTunnelsIsMutable(); + vpnTunnels_.add(m); + } else { + vpnTunnelsBuilder_.addMessage(m); + } + break; + } // case 1307952642 + 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.compute.v1.VpnTunnelsScopedList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1212,7 +1176,18 @@ public VpnTunnelsScopedList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new VpnTunnelsScopedList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WafExpressionSet.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WafExpressionSet.java index 73de00534bf0..53303740f84c 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WafExpressionSet.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WafExpressionSet.java @@ -53,83 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private WafExpressionSet( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 1273657330: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - aliases_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - aliases_.add(s); - break; - } - case 1404438234: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - expressions_ = - new java.util.ArrayList< - com.google.cloud.compute.v1.WafExpressionSetExpression>(); - mutable_bitField0_ |= 0x00000002; - } - expressions_.add( - input.readMessage( - com.google.cloud.compute.v1.WafExpressionSetExpression.parser(), - extensionRegistry)); - 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)) { - aliases_ = aliases_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - expressions_ = java.util.Collections.unmodifiableList(expressions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_WafExpressionSet_descriptor; @@ -370,7 +293,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < expressions_.size(); i++) { output.writeMessage(175554779, expressions_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -394,7 +317,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(175554779, expressions_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -416,7 +339,7 @@ public boolean equals(final java.lang.Object obj) { if (hasId()) { if (!getId().equals(other.getId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -439,7 +362,7 @@ public int hashCode() { hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -567,19 +490,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.WafExpressionSet.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) { - getExpressionsFieldBuilder(); - } } @java.lang.Override @@ -589,10 +503,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (expressionsBuilder_ == null) { expressions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + expressions_ = null; expressionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); id_ = ""; bitField0_ = (bitField0_ & ~0x00000004); return this; @@ -734,7 +649,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.WafExpressionSet other) { id_ = other.id_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -749,17 +664,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.WafExpressionSet 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26842 + case 1273657330: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAliasesIsMutable(); + aliases_.add(s); + break; + } // case 1273657330 + case 1404438234: + { + com.google.cloud.compute.v1.WafExpressionSetExpression m = + input.readMessage( + com.google.cloud.compute.v1.WafExpressionSetExpression.parser(), + extensionRegistry); + if (expressionsBuilder_ == null) { + ensureExpressionsIsMutable(); + expressions_.add(m); + } else { + expressionsBuilder_.addMessage(m); + } + break; + } // case 1404438234 + 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.compute.v1.WafExpressionSet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1463,7 +1419,18 @@ public WafExpressionSet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new WafExpressionSet(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WafExpressionSetExpression.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WafExpressionSetExpression.java index f8a2c06fcc25..97e842b7d7df 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WafExpressionSetExpression.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WafExpressionSetExpression.java @@ -51,53 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private WafExpressionSetExpression( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_WafExpressionSetExpression_descriptor; @@ -195,7 +148,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3355, id_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +160,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3355, id_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +180,7 @@ public boolean equals(final java.lang.Object obj) { if (hasId()) { if (!getId().equals(other.getId())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +195,7 @@ public int hashCode() { hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -371,17 +324,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.WafExpressionSetExpression.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 @@ -478,7 +424,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.WafExpressionSetExpression id_ = other.id_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -493,18 +439,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.WafExpressionSetExpression 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + 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.compute.v1.WafExpressionSetExpression) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -662,7 +627,18 @@ public WafExpressionSetExpression parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new WafExpressionSetExpression(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitGlobalOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitGlobalOperationRequest.java index ef68e2887936..be6ea10fd0a8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitGlobalOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitGlobalOperationRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private WaitGlobalOperationRequest( - 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 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_WaitGlobalOperationRequest_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOperation().equals(other.getOperation())) return false; if (!getProject().equals(other.getProject())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getOperation().hashCode(); hash = (37 * hash) + PROJECT_FIELD_NUMBER; hash = (53 * hash) + getProject().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -417,17 +364,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.WaitGlobalOperationRequest.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 @@ -524,7 +464,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.WaitGlobalOperationRequest project_ = other.project_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -539,18 +479,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.WaitGlobalOperationRequest 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 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.WaitGlobalOperationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -798,7 +763,18 @@ public WaitGlobalOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new WaitGlobalOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitRegionOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitRegionOperationRequest.java index ad9d930b4452..201f085ee15b 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitRegionOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitRegionOperationRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private WaitRegionOperationRequest( - 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 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_WaitRegionOperationRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOperation().equals(other.getOperation())) return false; if (!getProject().equals(other.getProject())) return false; if (!getRegion().equals(other.getRegion())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + REGION_FIELD_NUMBER; hash = (53 * hash) + getRegion().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +423,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.WaitRegionOperationRequest.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 @@ -597,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.WaitRegionOperationRequest region_ = other.region_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -612,18 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.WaitRegionOperationRequest 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 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + + break; + } // case 1111570338 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.WaitRegionOperationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -977,7 +941,18 @@ public WaitRegionOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new WaitRegionOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitZoneOperationRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitZoneOperationRequest.java index b706c75516af..d4c0d1d59c43 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitZoneOperationRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WaitZoneOperationRequest.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private WaitZoneOperationRequest( - 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 29957474: - { - java.lang.String s = input.readStringRequireUtf8(); - - zone_ = s; - break; - } - case 416721722: - { - java.lang.String s = input.readStringRequireUtf8(); - - operation_ = s; - break; - } - case 1820481738: - { - java.lang.String s = input.readStringRequireUtf8(); - - project_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_WaitZoneOperationRequest_descriptor; @@ -299,7 +239,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 227560217, project_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -317,7 +257,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(project_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(227560217, project_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -336,7 +276,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOperation().equals(other.getOperation())) return false; if (!getProject().equals(other.getProject())) return false; if (!getZone().equals(other.getZone())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -353,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + getProject().hashCode(); hash = (37 * hash) + ZONE_FIELD_NUMBER; hash = (53 * hash) + getZone().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,17 +422,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.WaitZoneOperationRequest.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 @@ -596,7 +529,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.WaitZoneOperationRequest ot zone_ = other.zone_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +544,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.WaitZoneOperationRequest 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 29957474: + { + zone_ = input.readStringRequireUtf8(); + + break; + } // case 29957474 + case 416721722: + { + operation_ = input.readStringRequireUtf8(); + + break; + } // case 416721722 + case 1820481738: + { + project_ = input.readStringRequireUtf8(); + + break; + } // case 1820481738 + 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.compute.v1.WaitZoneOperationRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -976,7 +940,18 @@ public WaitZoneOperationRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new WaitZoneOperationRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Warning.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Warning.java index 30bdb6d6d96a..5242f5df7307 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Warning.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Warning.java @@ -54,73 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Warning( - 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 24473450: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - code_ = s; - break; - } - case 24608082: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - data_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - data_.add( - input.readMessage(com.google.cloud.compute.v1.Data.parser(), extensionRegistry)); - break; - } - case -950534086: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - message_ = 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_ & 0x00000002) != 0)) { - data_ = java.util.Collections.unmodifiableList(data_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Warning_descriptor; @@ -1067,7 +1000,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 418054151, message_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1085,7 +1018,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(418054151, message_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1109,7 +1042,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMessage()) { if (!getMessage().equals(other.getMessage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1132,7 +1065,7 @@ public int hashCode() { hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1260,19 +1193,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Warning.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) { - getDataFieldBuilder(); - } } @java.lang.Override @@ -1282,10 +1206,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (dataBuilder_ == null) { data_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + data_ = null; dataBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); message_ = ""; bitField0_ = (bitField0_ & ~0x00000004); return this; @@ -1420,7 +1345,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Warning other) { message_ = other.message_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1435,17 +1360,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Warning 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 24473450: + { + code_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24473450 + case 24608082: + { + com.google.cloud.compute.v1.Data m = + input.readMessage(com.google.cloud.compute.v1.Data.parser(), extensionRegistry); + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.add(m); + } else { + dataBuilder_.addMessage(m); + } + break; + } // case 24608082 + case -950534086: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -950534086 + 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.compute.v1.Warning) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2075,7 +2038,18 @@ public Warning parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Warning(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Warnings.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Warnings.java index 9760e7625868..7247169bba9e 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Warnings.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Warnings.java @@ -53,73 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Warnings( - 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 24473450: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - code_ = s; - break; - } - case 24608082: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - data_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - data_.add( - input.readMessage(com.google.cloud.compute.v1.Data.parser(), extensionRegistry)); - break; - } - case -950534086: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - message_ = 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_ & 0x00000002) != 0)) { - data_ = java.util.Collections.unmodifiableList(data_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Warnings_descriptor; @@ -1066,7 +999,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 418054151, message_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1084,7 +1017,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(418054151, message_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1108,7 +1041,7 @@ public boolean equals(final java.lang.Object obj) { if (hasMessage()) { if (!getMessage().equals(other.getMessage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1131,7 +1064,7 @@ public int hashCode() { hash = (37 * hash) + MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getMessage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1258,19 +1191,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.Warnings.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) { - getDataFieldBuilder(); - } } @java.lang.Override @@ -1280,10 +1204,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (dataBuilder_ == null) { data_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + data_ = null; dataBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); message_ = ""; bitField0_ = (bitField0_ & ~0x00000004); return this; @@ -1418,7 +1343,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Warnings other) { message_ = other.message_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1433,17 +1358,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Warnings 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 24473450: + { + code_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 24473450 + case 24608082: + { + com.google.cloud.compute.v1.Data m = + input.readMessage(com.google.cloud.compute.v1.Data.parser(), extensionRegistry); + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.add(m); + } else { + dataBuilder_.addMessage(m); + } + break; + } // case 24608082 + case -950534086: + { + message_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case -950534086 + 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.compute.v1.Warnings) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2073,7 +2036,18 @@ public Warnings parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Warnings(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WeightedBackendService.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WeightedBackendService.java index 63b743e0cca9..a5feeb19e3e8 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WeightedBackendService.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/WeightedBackendService.java @@ -52,75 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private WeightedBackendService( - 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 -2037771328: - { - bitField0_ |= 0x00000004; - weight_ = input.readUInt32(); - break; - } - case -1839398830: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - backendService_ = s; - break; - } - case -1670348478: - { - com.google.cloud.compute.v1.HttpHeaderAction.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = headerAction_.toBuilder(); - } - headerAction_ = - input.readMessage( - com.google.cloud.compute.v1.HttpHeaderAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(headerAction_); - headerAction_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_WeightedBackendService_descriptor; @@ -307,7 +238,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(328077352, getHeaderAction()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -326,7 +257,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(328077352, getHeaderAction()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -354,7 +285,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWeight()) { if (getWeight() != other.getWeight()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +308,7 @@ public int hashCode() { hash = (37 * hash) + WEIGHT_FIELD_NUMBER; hash = (53 * hash) + getWeight(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -641,7 +572,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.WeightedBackendService othe if (other.hasWeight()) { setWeight(other.getWeight()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -656,18 +587,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.WeightedBackendService 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 -2037771328: + { + weight_ = input.readUInt32(); + bitField0_ |= 0x00000004; + break; + } // case -2037771328 + case -1839398830: + { + backendService_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case -1839398830 + case -1670348478: + { + input.readMessage(getHeaderActionFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case -1670348478 + 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.compute.v1.WeightedBackendService) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1079,7 +1041,18 @@ public WeightedBackendService parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new WeightedBackendService(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/XpnHostList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/XpnHostList.java index 017a4586dc1e..efab00fe274f 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/XpnHostList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/XpnHostList.java @@ -55,104 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private XpnHostList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage( - com.google.cloud.compute.v1.Project.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_XpnHostList_descriptor; @@ -572,7 +474,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +501,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -635,7 +537,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -670,7 +572,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -821,10 +723,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -999,7 +902,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.XpnHostList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1014,17 +917,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.XpnHostList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Project m = + input.readMessage( + com.google.cloud.compute.v1.Project.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.XpnHostList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2076,7 +2036,18 @@ public XpnHostList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new XpnHostList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/XpnResourceId.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/XpnResourceId.java index a16520238fcc..fd27a4a91912 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/XpnResourceId.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/XpnResourceId.java @@ -53,60 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private XpnResourceId( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 28604882: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - type_ = 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_XpnResourceId_descriptor; @@ -399,7 +345,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3575610, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -414,7 +360,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3575610, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -438,7 +384,7 @@ public boolean equals(final java.lang.Object obj) { if (hasType()) { if (!getType().equals(other.getType())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -457,7 +403,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -586,17 +532,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.compute.v1.XpnResourceId.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 @@ -703,7 +642,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.XpnResourceId other) { type_ = other.type_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -718,17 +657,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.XpnResourceId 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 28604882: + { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 28604882 + 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.compute.v1.XpnResourceId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1012,7 +977,18 @@ public XpnResourceId parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new XpnResourceId(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Zone.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Zone.java index eb2c69e21b30..d0e4d84a69e9 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Zone.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Zone.java @@ -59,136 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Zone( - 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 26840: - { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000010; - kind_ = s; - break; - } - case 26989658: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - name_ = s; - break; - } - case 244202930: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - creationTimestamp_ = s; - break; - } - case 671865712: - { - bitField0_ |= 0x00000200; - supportsPzs_ = input.readBool(); - break; - } - case 1111570338: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - region_ = s; - break; - } - case 1404292250: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - availableCpuPlatforms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - availableCpuPlatforms_.add(s); - break; - } - case 1450082194: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000100; - status_ = s; - break; - } - case -911466526: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - description_ = s; - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000080; - selfLink_ = s; - break; - } - case -173855334: - { - com.google.cloud.compute.v1.DeprecationStatus.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = deprecated_.toBuilder(); - } - deprecated_ = - input.readMessage( - com.google.cloud.compute.v1.DeprecationStatus.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deprecated_); - deprecated_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - 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)) { - availableCpuPlatforms_ = availableCpuPlatforms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_Zone_descriptor; @@ -1005,7 +875,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(515138995, getDeprecated()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1053,7 +923,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(515138995, getDeprecated()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1109,7 +979,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSupportsPzs()) { if (getSupportsPzs() != other.getSupportsPzs()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1164,7 +1034,7 @@ public int hashCode() { hash = (37 * hash) + SUPPORTS_PZS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSupportsPzs()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1517,7 +1387,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.Zone other) { if (other.hasSupportsPzs()) { setSupportsPzs(other.getSupportsPzs()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1532,17 +1402,98 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.Zone 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 26840: + { + id_ = input.readUInt64(); + bitField0_ |= 0x00000010; + break; + } // case 26840 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 26336418 + case 26989658: + { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000040; + break; + } // case 26989658 + case 244202930: + { + creationTimestamp_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 244202930 + case 671865712: + { + supportsPzs_ = input.readBool(); + bitField0_ |= 0x00000400; + break; + } // case 671865712 + case 1111570338: + { + region_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000080; + break; + } // case 1111570338 + case 1404292250: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAvailableCpuPlatformsIsMutable(); + availableCpuPlatforms_.add(s); + break; + } // case 1404292250 + case 1450082194: + { + status_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 1450082194 + case -911466526: + { + description_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case -911466526 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000100; + break; + } // case -645248918 + case -173855334: + { + input.readMessage(getDeprecatedFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case -173855334 + 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.compute.v1.Zone) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2916,7 +2867,18 @@ public Zone parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Zone(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneList.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneList.java index 3f0a0be41df2..0565b141c4ad 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneList.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneList.java @@ -56,103 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ZoneList( - 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 26842: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - id_ = s; - break; - } - case 26336418: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - kind_ = s; - break; - } - case 405634274: - { - com.google.cloud.compute.v1.Warning.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { - subBuilder = warning_.toBuilder(); - } - warning_ = - input.readMessage( - com.google.cloud.compute.v1.Warning.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(warning_); - warning_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000010; - break; - } - case 638380202: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - nextPageToken_ = s; - break; - } - case 804208130: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - items_.add( - input.readMessage(com.google.cloud.compute.v1.Zone.parser(), extensionRegistry)); - break; - } - case -645248918: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000008; - selfLink_ = 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_ & 0x00000002) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ZoneList_descriptor; @@ -572,7 +475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000008) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -599,7 +502,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -635,7 +538,7 @@ public boolean equals(final java.lang.Object obj) { if (hasWarning()) { if (!getWarning().equals(other.getWarning())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -670,7 +573,7 @@ public int hashCode() { hash = (37 * hash) + WARNING_FIELD_NUMBER; hash = (53 * hash) + getWarning().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -821,10 +724,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); kind_ = ""; bitField0_ = (bitField0_ & ~0x00000004); nextPageToken_ = ""; @@ -998,7 +902,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ZoneList other) { if (other.hasWarning()) { mergeWarning(other.getWarning()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1013,17 +917,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ZoneList 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 26842: + { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 26842 + case 26336418: + { + kind_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26336418 + case 405634274: + { + input.readMessage(getWarningFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000020; + break; + } // case 405634274 + case 638380202: + { + nextPageToken_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 638380202 + case 804208130: + { + com.google.cloud.compute.v1.Zone m = + input.readMessage(com.google.cloud.compute.v1.Zone.parser(), extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 804208130 + case -645248918: + { + selfLink_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case -645248918 + 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.compute.v1.ZoneList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2073,7 +2033,18 @@ public ZoneList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ZoneList(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneSetLabelsRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneSetLabelsRequest.java index 81bbd8b257be..458ccd4dcc13 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneSetLabelsRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneSetLabelsRequest.java @@ -51,66 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ZoneSetLabelsRequest( - 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 1424998602: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - labelFingerprint_ = s; - break; - } - case -293404678: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - 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.compute.v1.Compute .internal_static_google_cloud_compute_v1_ZoneSetLabelsRequest_descriptor; @@ -319,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +282,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -363,7 +303,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLabelFingerprint().equals(other.getLabelFingerprint())) return false; } if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -530,17 +470,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.compute.v1.ZoneSetLabelsRequest.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 @@ -641,7 +574,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ZoneSetLabelsRequest other) onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -656,17 +589,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ZoneSetLabelsRequest 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 1424998602: + { + labelFingerprint_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 1424998602 + case -293404678: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case -293404678 + 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.compute.v1.ZoneSetLabelsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -982,7 +946,18 @@ public ZoneSetLabelsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ZoneSetLabelsRequest(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-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneSetPolicyRequest.java b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneSetPolicyRequest.java index 20ef7ca536ad..bf56a1ff2d66 100644 --- a/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneSetPolicyRequest.java +++ b/java-compute/proto-google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ZoneSetPolicyRequest.java @@ -52,82 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ZoneSetPolicyRequest( - 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 24987818: - { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - etag_ = s; - break; - } - case 728574354: - { - com.google.cloud.compute.v1.Policy.Builder subBuilder = null; - if (((bitField0_ & 0x00000002) != 0)) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage(com.google.cloud.compute.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000002; - break; - } - case -1068952462: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bindings_.add( - input.readMessage( - com.google.cloud.compute.v1.Binding.parser(), extensionRegistry)); - 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)) { - bindings_ = java.util.Collections.unmodifiableList(bindings_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.compute.v1.Compute .internal_static_google_cloud_compute_v1_ZoneSetPolicyRequest_descriptor; @@ -346,7 +270,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < bindings_.size(); i++) { output.writeMessage(403251854, bindings_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -364,7 +288,7 @@ public int getSerializedSize() { for (int i = 0; i < bindings_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(403251854, bindings_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -389,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -412,7 +336,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -561,10 +485,11 @@ public Builder clear() { super.clear(); if (bindingsBuilder_ == null) { bindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bindings_ = null; bindingsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); etag_ = ""; bitField0_ = (bitField0_ & ~0x00000002); if (policyBuilder_ == null) { @@ -709,7 +634,7 @@ public Builder mergeFrom(com.google.cloud.compute.v1.ZoneSetPolicyRequest other) if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -724,17 +649,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.compute.v1.ZoneSetPolicyRequest 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 24987818: + { + etag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 24987818 + case 728574354: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 728574354 + case -1068952462: + { + com.google.cloud.compute.v1.Binding m = + input.readMessage( + com.google.cloud.compute.v1.Binding.parser(), extensionRegistry); + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(m); + } else { + bindingsBuilder_.addMessage(m); + } + break; + } // case -1068952462 + 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.compute.v1.ZoneSetPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1422,7 +1386,18 @@ public ZoneSetPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ZoneSetPolicyRequest(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(); } };