diff --git a/generated/java/build.gradle b/generated/java/build.gradle index 1df3f0675..4c74fe66e 100644 --- a/generated/java/build.gradle +++ b/generated/java/build.gradle @@ -168,3 +168,6 @@ project(':generated:java:google-longrunning-v1') { compile 'com.google.api.grpc:grpc-google-common-protos:' + generated_grpc_version } } + +project(':generated:java:google-cloud-compute-v1') { +} diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/spi/v1/InstancesServiceClient.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/spi/v1/InstancesServiceClient.java new file mode 100644 index 000000000..b26aa83a0 --- /dev/null +++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/spi/v1/InstancesServiceClient.java @@ -0,0 +1,548 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * 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 + * + * http://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.spi.v1; + +import static com.google.cloud.compute.spi.v1.PagedResponseWrappers.ListInstancesPagedResponse; + +import com.google.api.gax.grpc.ChannelAndExecutor; +import com.google.api.gax.grpc.UnaryCallable; +import com.google.cloud.compute.v1.Instance; +import com.google.cloud.compute.v1.InstanceList; +import com.google.cloud.compute.v1.InstancesDeleteRequest; +import com.google.cloud.compute.v1.InstancesGetRequest; +import com.google.cloud.compute.v1.InstancesInsertRequest; +import com.google.cloud.compute.v1.InstancesListRequest; +import com.google.cloud.compute.v1.Operation; +import com.google.protobuf.ExperimentalApi; +import io.grpc.ManagedChannel; +import java.io.Closeable; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ScheduledExecutorService; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND SERVICE +/** + * Service Description: + * + *
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
+ *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * String instance = "";
+ * Instance response = instancesServiceClient.getInstance(project, zone, instance);
+ * }
+ *
+ *
+ *
+ * Note: close() needs to be called on the instancesServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of InstancesServiceSettings to + * create(). For example: + * + *
+ *
+ * InstantiatingChannelProvider channelProvider =
+ * InstancesServiceSettings.defaultChannelProviderBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * InstancesServiceSettings instancesServiceSettings =
+ * InstancesServiceSettings.defaultBuilder().setChannelProvider(channelProvider).build();
+ * InstancesServiceClient instancesServiceClient =
+ * InstancesServiceClient.create(instancesServiceSettings);
+ *
+ *
+ */
+@Generated("by GAPIC")
+@ExperimentalApi
+public class InstancesServiceClient implements AutoCloseable {
+ private final InstancesServiceSettings settings;
+ private final ScheduledExecutorService executor;
+ private final ManagedChannel channel;
+ private final ListSample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * int maxResults = 0;
+ * String filter = "";
+ * String orderBy = "";
+ * String project = "";
+ * String zone = "";
+ * InstancesListRequest request = InstancesListRequest.newBuilder()
+ * .setMaxResults(maxResults)
+ * .setFilter(filter)
+ * .setOrderBy(orderBy)
+ * .setProject(project)
+ * .setZone(zone)
+ * .build();
+ * for (Instance element : instancesServiceClient.listInstances(request).iterateAllElements()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.grpc.ApiException if the remote call fails
+ */
+ public final ListInstancesPagedResponse listInstances(InstancesListRequest request) {
+ return listInstancesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Retrieves the list of instances contained within the specified zone.
+ *
+ * Sample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * int maxResults = 0;
+ * String filter = "";
+ * String orderBy = "";
+ * String project = "";
+ * String zone = "";
+ * InstancesListRequest request = InstancesListRequest.newBuilder()
+ * .setMaxResults(maxResults)
+ * .setFilter(filter)
+ * .setOrderBy(orderBy)
+ * .setProject(project)
+ * .setZone(zone)
+ * .build();
+ * ApiFuture<ListInstancesPagedResponse> future = instancesServiceClient.listInstancesPagedCallable().futureCall(request);
+ * // Do something
+ * for (Instance element : future.get().iterateAllElements()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * int maxResults = 0;
+ * String filter = "";
+ * String orderBy = "";
+ * String project = "";
+ * String zone = "";
+ * InstancesListRequest request = InstancesListRequest.newBuilder()
+ * .setMaxResults(maxResults)
+ * .setFilter(filter)
+ * .setOrderBy(orderBy)
+ * .setProject(project)
+ * .setZone(zone)
+ * .build();
+ * while (true) {
+ * InstanceList response = instancesServiceClient.listInstancesCallable().call(request);
+ * for (Instance element : response.getItemsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * String instance = "";
+ * Instance response = instancesServiceClient.getInstance(project, zone, instance);
+ * }
+ *
+ *
+ * @param project Project ID for this request.
+ * @param zone The name of the zone for this request.
+ * @param instance Name of the instance resource to return.
+ * @throws com.google.api.gax.grpc.ApiException if the remote call fails
+ */
+ public final Instance getInstance(String project, String zone, String instance) {
+
+ InstancesGetRequest request =
+ InstancesGetRequest.newBuilder()
+ .setProject(project)
+ .setZone(zone)
+ .setInstance(instance)
+ .build();
+ return getInstance(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Returns the specified Instance resource. Get a list of available instances by making a
+ * <code>list()</code> request.
+ *
+ * Sample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * String instance = "";
+ * InstancesGetRequest request = InstancesGetRequest.newBuilder()
+ * .setProject(project)
+ * .setZone(zone)
+ * .setInstance(instance)
+ * .build();
+ * Instance response = instancesServiceClient.getInstance(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.grpc.ApiException if the remote call fails
+ */
+ public final Instance getInstance(InstancesGetRequest request) {
+ return getInstanceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Returns the specified Instance resource. Get a list of available instances by making a
+ * <code>list()</code> request.
+ *
+ * Sample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * String instance = "";
+ * InstancesGetRequest request = InstancesGetRequest.newBuilder()
+ * .setProject(project)
+ * .setZone(zone)
+ * .setInstance(instance)
+ * .build();
+ * ApiFuture<Instance> future = instancesServiceClient.getInstanceCallable().futureCall(request);
+ * // Do something
+ * Instance response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * Instance resource = Instance.newBuilder().build();
+ * Operation response = instancesServiceClient.insertInstance(project, zone, resource);
+ * }
+ *
+ *
+ * @param project Project ID for this request.
+ * @param zone The name of the zone for this request.
+ * @param resource
+ * @throws com.google.api.gax.grpc.ApiException if the remote call fails
+ */
+ public final Operation insertInstance(String project, String zone, Instance resource) {
+
+ InstancesInsertRequest request =
+ InstancesInsertRequest.newBuilder()
+ .setProject(project)
+ .setZone(zone)
+ .setResource(resource)
+ .build();
+ return insertInstance(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates an instance resource in the specified project using the data included in the request.
+ *
+ * Sample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * Instance resource = Instance.newBuilder().build();
+ * InstancesInsertRequest request = InstancesInsertRequest.newBuilder()
+ * .setProject(project)
+ * .setZone(zone)
+ * .setResource(resource)
+ * .build();
+ * Operation response = instancesServiceClient.insertInstance(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.grpc.ApiException if the remote call fails
+ */
+ public final Operation insertInstance(InstancesInsertRequest request) {
+ return insertInstanceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Creates an instance resource in the specified project using the data included in the request.
+ *
+ * Sample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * Instance resource = Instance.newBuilder().build();
+ * InstancesInsertRequest request = InstancesInsertRequest.newBuilder()
+ * .setProject(project)
+ * .setZone(zone)
+ * .setResource(resource)
+ * .build();
+ * ApiFuture<Operation> future = instancesServiceClient.insertInstanceCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableSample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * String instance = "";
+ * Operation response = instancesServiceClient.deleteInstance(project, zone, instance);
+ * }
+ *
+ *
+ * @param project Project ID for this request.
+ * @param zone The name of the zone for this request.
+ * @param instance Name of the instance resource to delete.
+ * @throws com.google.api.gax.grpc.ApiException if the remote call fails
+ */
+ public final Operation deleteInstance(String project, String zone, String instance) {
+
+ InstancesDeleteRequest request =
+ InstancesDeleteRequest.newBuilder()
+ .setProject(project)
+ .setZone(zone)
+ .setInstance(instance)
+ .build();
+ return deleteInstance(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes the specified Instance resource. For more information, see <a
+ * href="/compute/docs/instances/stopping-or-deleting-an-instance">Stopping or Deleting an
+ * Instance</a>.
+ *
+ * Sample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * String instance = "";
+ * InstancesDeleteRequest request = InstancesDeleteRequest.newBuilder()
+ * .setProject(project)
+ * .setZone(zone)
+ * .setInstance(instance)
+ * .build();
+ * Operation response = instancesServiceClient.deleteInstance(request);
+ * }
+ *
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.grpc.ApiException if the remote call fails
+ */
+ public final Operation deleteInstance(InstancesDeleteRequest request) {
+ return deleteInstanceCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD
+ /**
+ * Deletes the specified Instance resource. For more information, see <a
+ * href="/compute/docs/instances/stopping-or-deleting-an-instance">Stopping or Deleting an
+ * Instance</a>.
+ *
+ * Sample code: + * + *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * String instance = "";
+ * InstancesDeleteRequest request = InstancesDeleteRequest.newBuilder()
+ * .setProject(project)
+ * .setZone(zone)
+ * .setInstance(instance)
+ * .build();
+ * ApiFuture<Operation> future = instancesServiceClient.deleteInstanceCallable().futureCall(request);
+ * // Do something
+ * Operation response = future.get();
+ * }
+ *
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. For + * example, to set the total timeout of getInstance to 30 seconds: + * + *
+ *
+ * InstancesServiceSettings.Builder instancesServiceSettingsBuilder =
+ * InstancesServiceSettings.defaultBuilder();
+ * instancesServiceSettingsBuilder.getInstanceSettings().getRetrySettingsBuilder()
+ * .setTotalTimeout(Duration.standardSeconds(30));
+ * InstancesServiceSettings instancesServiceSettings = instancesServiceSettingsBuilder.build();
+ *
+ *
+ */
+@Generated("by GAPIC v0.0.5")
+@ExperimentalApi
+public class InstancesServiceSettings extends ClientSettings {
+ /** The default address of the service. */
+ private static final String DEFAULT_SERVICE_ADDRESS = "compute.googleapis.com";
+
+ /** The default port of the service. */
+ private static final int DEFAULT_SERVICE_PORT = 443;
+
+ /** The default scopes of the service. */
+ private static final ImmutableListNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(UnaryCallSettings.Builder unaryCallSettings)
+ throws Exception {
+ super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, unaryCallSettings);
+ return this;
+ }
+
+ /** Returns the builder for the settings used for calls to listInstances. */
+ public PagedCallSettings.Builder The interfaces provided are listed below, along with usage samples.
+ *
+ * ====================== InstancesServiceClient ======================
+ *
+ * Service Description:
+ *
+ * Sample for InstancesServiceClient:
+ *
+ *
+ *
+ */
+package com.google.cloud.compute.spi.v1;
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AccessConfig.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AccessConfig.java
new file mode 100644
index 000000000..b60f4db86
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AccessConfig.java
@@ -0,0 +1,1126 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ *
+ * try (InstancesServiceClient instancesServiceClient = InstancesServiceClient.create()) {
+ * String project = "";
+ * String zone = "";
+ * String instance = "";
+ * Instance response = instancesServiceClient.getInstance(project, zone, instance);
+ * }
+ *
+ *
+ * An access configuration attached to an instance's network interface.
+ * Only one access config per instance is supported.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.AccessConfig}
+ */
+public final class AccessConfig extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.AccessConfig)
+ AccessConfigOrBuilder {
+ // Use AccessConfig.newBuilder() to construct.
+ private AccessConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private AccessConfig() {
+ kind_ = "";
+ type_ = 0;
+ name_ = "";
+ natIp_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private AccessConfig(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ int rawValue = input.readEnum();
+
+ type_ = rawValue;
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ natIp_ = s;
+ break;
+ }
+ case 8002: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ kind_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_AccessConfig_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_AccessConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.AccessConfig.class, com.google.cloud.compute.v1.AccessConfig.Builder.class);
+ }
+
+ /**
+ * Protobuf enum {@code google.compute.v1.AccessConfig.AccessType}
+ */
+ public enum AccessType
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * ONE_TO_ONE_NAT = 0;
+ */
+ ONE_TO_ONE_NAT(0),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ * ONE_TO_ONE_NAT = 0;
+ */
+ public static final int ONE_TO_ONE_NAT_VALUE = 0;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static AccessType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static AccessType forNumber(int value) {
+ switch (value) {
+ case 0: return ONE_TO_ONE_NAT;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * [Output Only] Type of the resource. Always <code>compute#accessConfig</code>
+ * for access configs.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always <code>compute#accessConfig</code>
+ * for access configs.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TYPE_FIELD_NUMBER = 1;
+ private int type_;
+ /**
+ *
+ * The type of configuration. The default and only option is
+ * <code>ONE_TO_ONE_NAT</code>.
+ * @default ONE_TO_ONE_NAT
+ *
+ *
+ * optional .google.compute.v1.AccessConfig.AccessType type = 1;
+ */
+ public int getTypeValue() {
+ return type_;
+ }
+ /**
+ *
+ * The type of configuration. The default and only option is
+ * <code>ONE_TO_ONE_NAT</code>.
+ * @default ONE_TO_ONE_NAT
+ *
+ *
+ * optional .google.compute.v1.AccessConfig.AccessType type = 1;
+ */
+ public com.google.cloud.compute.v1.AccessConfig.AccessType getType() {
+ com.google.cloud.compute.v1.AccessConfig.AccessType result = com.google.cloud.compute.v1.AccessConfig.AccessType.valueOf(type_);
+ return result == null ? com.google.cloud.compute.v1.AccessConfig.AccessType.UNRECOGNIZED : result;
+ }
+
+ public static final int NAME_FIELD_NUMBER = 2;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ * The name of this access configuration. The default and recommended name is
+ * <code>External NAT</code> but you can use any arbitrary string you would
+ * like. For example, <code>My external IP</code> or
+ * <code>Network Access</code>.
+ *
+ *
+ * optional string name = 2;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The name of this access configuration. The default and recommended name is
+ * <code>External NAT</code> but you can use any arbitrary string you would
+ * like. For example, <code>My external IP</code> or
+ * <code>Network Access</code>.
+ *
+ *
+ * optional string name = 2;
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int NAT_IP_FIELD_NUMBER = 3;
+ private volatile java.lang.Object natIp_;
+ /**
+ *
+ * An
+ * <a href="/compute/docs/ip-addresses#externaladdresses">external IP address</a>
+ * associated with this instance. Specify an unused static external
+ * IP address available to the project or leave this field undefined to use an
+ * IP from a shared ephemeral IP address pool. If you specify a static
+ * external IP address, it must live in the same region as the zone of the
+ * instance.
+ *
+ *
+ * optional string nat_ip = 3;
+ */
+ public java.lang.String getNatIp() {
+ java.lang.Object ref = natIp_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ natIp_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * An
+ * <a href="/compute/docs/ip-addresses#externaladdresses">external IP address</a>
+ * associated with this instance. Specify an unused static external
+ * IP address available to the project or leave this field undefined to use an
+ * IP from a shared ephemeral IP address pool. If you specify a static
+ * external IP address, it must live in the same region as the zone of the
+ * instance.
+ *
+ *
+ * optional string nat_ip = 3;
+ */
+ public com.google.protobuf.ByteString
+ getNatIpBytes() {
+ java.lang.Object ref = natIp_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ natIp_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (type_ != com.google.cloud.compute.v1.AccessConfig.AccessType.ONE_TO_ONE_NAT.getNumber()) {
+ output.writeEnum(1, type_);
+ }
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
+ }
+ if (!getNatIpBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, natIp_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1000, kind_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (type_ != com.google.cloud.compute.v1.AccessConfig.AccessType.ONE_TO_ONE_NAT.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(1, type_);
+ }
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
+ }
+ if (!getNatIpBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, natIp_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1000, kind_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.AccessConfig)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.AccessConfig other = (com.google.cloud.compute.v1.AccessConfig) obj;
+
+ boolean result = true;
+ result = result && getKind()
+ .equals(other.getKind());
+ result = result && type_ == other.type_;
+ result = result && getName()
+ .equals(other.getName());
+ result = result && getNatIp()
+ .equals(other.getNatIp());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + KIND_FIELD_NUMBER;
+ hash = (53 * hash) + getKind().hashCode();
+ hash = (37 * hash) + TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + type_;
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + NAT_IP_FIELD_NUMBER;
+ hash = (53 * hash) + getNatIp().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.AccessConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.AccessConfig parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AccessConfig parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.AccessConfig parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AccessConfig parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.AccessConfig parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AccessConfig parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.AccessConfig parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AccessConfig parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.AccessConfig parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.AccessConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * An access configuration attached to an instance's network interface.
+ * Only one access config per instance is supported.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.AccessConfig}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * [Output Only] Type of the resource. Always <code>compute#accessConfig</code>
+ * for access configs.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always <code>compute#accessConfig</code>
+ * for access configs.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always <code>compute#accessConfig</code>
+ * for access configs.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKind(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always <code>compute#accessConfig</code>
+ * for access configs.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder clearKind() {
+
+ kind_ = getDefaultInstance().getKind();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always <code>compute#accessConfig</code>
+ * for access configs.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKindBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int type_ = 0;
+ /**
+ *
+ * The type of configuration. The default and only option is
+ * <code>ONE_TO_ONE_NAT</code>.
+ * @default ONE_TO_ONE_NAT
+ *
+ *
+ * optional .google.compute.v1.AccessConfig.AccessType type = 1;
+ */
+ public int getTypeValue() {
+ return type_;
+ }
+ /**
+ *
+ * The type of configuration. The default and only option is
+ * <code>ONE_TO_ONE_NAT</code>.
+ * @default ONE_TO_ONE_NAT
+ *
+ *
+ * optional .google.compute.v1.AccessConfig.AccessType type = 1;
+ */
+ public Builder setTypeValue(int value) {
+ type_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The type of configuration. The default and only option is
+ * <code>ONE_TO_ONE_NAT</code>.
+ * @default ONE_TO_ONE_NAT
+ *
+ *
+ * optional .google.compute.v1.AccessConfig.AccessType type = 1;
+ */
+ public com.google.cloud.compute.v1.AccessConfig.AccessType getType() {
+ com.google.cloud.compute.v1.AccessConfig.AccessType result = com.google.cloud.compute.v1.AccessConfig.AccessType.valueOf(type_);
+ return result == null ? com.google.cloud.compute.v1.AccessConfig.AccessType.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * The type of configuration. The default and only option is
+ * <code>ONE_TO_ONE_NAT</code>.
+ * @default ONE_TO_ONE_NAT
+ *
+ *
+ * optional .google.compute.v1.AccessConfig.AccessType type = 1;
+ */
+ public Builder setType(com.google.cloud.compute.v1.AccessConfig.AccessType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ type_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The type of configuration. The default and only option is
+ * <code>ONE_TO_ONE_NAT</code>.
+ * @default ONE_TO_ONE_NAT
+ *
+ *
+ * optional .google.compute.v1.AccessConfig.AccessType type = 1;
+ */
+ public Builder clearType() {
+
+ type_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object name_ = "";
+ /**
+ *
+ * The name of this access configuration. The default and recommended name is
+ * <code>External NAT</code> but you can use any arbitrary string you would
+ * like. For example, <code>My external IP</code> or
+ * <code>Network Access</code>.
+ *
+ *
+ * optional string name = 2;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The name of this access configuration. The default and recommended name is
+ * <code>External NAT</code> but you can use any arbitrary string you would
+ * like. For example, <code>My external IP</code> or
+ * <code>Network Access</code>.
+ *
+ *
+ * optional string name = 2;
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The name of this access configuration. The default and recommended name is
+ * <code>External NAT</code> but you can use any arbitrary string you would
+ * like. For example, <code>My external IP</code> or
+ * <code>Network Access</code>.
+ *
+ *
+ * optional string name = 2;
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of this access configuration. The default and recommended name is
+ * <code>External NAT</code> but you can use any arbitrary string you would
+ * like. For example, <code>My external IP</code> or
+ * <code>Network Access</code>.
+ *
+ *
+ * optional string name = 2;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of this access configuration. The default and recommended name is
+ * <code>External NAT</code> but you can use any arbitrary string you would
+ * like. For example, <code>My external IP</code> or
+ * <code>Network Access</code>.
+ *
+ *
+ * optional string name = 2;
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object natIp_ = "";
+ /**
+ *
+ * An
+ * <a href="/compute/docs/ip-addresses#externaladdresses">external IP address</a>
+ * associated with this instance. Specify an unused static external
+ * IP address available to the project or leave this field undefined to use an
+ * IP from a shared ephemeral IP address pool. If you specify a static
+ * external IP address, it must live in the same region as the zone of the
+ * instance.
+ *
+ *
+ * optional string nat_ip = 3;
+ */
+ public java.lang.String getNatIp() {
+ java.lang.Object ref = natIp_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ natIp_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * An
+ * <a href="/compute/docs/ip-addresses#externaladdresses">external IP address</a>
+ * associated with this instance. Specify an unused static external
+ * IP address available to the project or leave this field undefined to use an
+ * IP from a shared ephemeral IP address pool. If you specify a static
+ * external IP address, it must live in the same region as the zone of the
+ * instance.
+ *
+ *
+ * optional string nat_ip = 3;
+ */
+ public com.google.protobuf.ByteString
+ getNatIpBytes() {
+ java.lang.Object ref = natIp_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ natIp_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * An
+ * <a href="/compute/docs/ip-addresses#externaladdresses">external IP address</a>
+ * associated with this instance. Specify an unused static external
+ * IP address available to the project or leave this field undefined to use an
+ * IP from a shared ephemeral IP address pool. If you specify a static
+ * external IP address, it must live in the same region as the zone of the
+ * instance.
+ *
+ *
+ * optional string nat_ip = 3;
+ */
+ public Builder setNatIp(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ natIp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * An
+ * <a href="/compute/docs/ip-addresses#externaladdresses">external IP address</a>
+ * associated with this instance. Specify an unused static external
+ * IP address available to the project or leave this field undefined to use an
+ * IP from a shared ephemeral IP address pool. If you specify a static
+ * external IP address, it must live in the same region as the zone of the
+ * instance.
+ *
+ *
+ * optional string nat_ip = 3;
+ */
+ public Builder clearNatIp() {
+
+ natIp_ = getDefaultInstance().getNatIp();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * An
+ * <a href="/compute/docs/ip-addresses#externaladdresses">external IP address</a>
+ * associated with this instance. Specify an unused static external
+ * IP address available to the project or leave this field undefined to use an
+ * IP from a shared ephemeral IP address pool. If you specify a static
+ * external IP address, it must live in the same region as the zone of the
+ * instance.
+ *
+ *
+ * optional string nat_ip = 3;
+ */
+ public Builder setNatIpBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ natIp_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.AccessConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.AccessConfig)
+ private static final com.google.cloud.compute.v1.AccessConfig DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.AccessConfig();
+ }
+
+ public static com.google.cloud.compute.v1.AccessConfig getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * [Output Only] Type of the resource. Always <code>compute#accessConfig</code>
+ * for access configs.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ java.lang.String getKind();
+ /**
+ *
+ * [Output Only] Type of the resource. Always <code>compute#accessConfig</code>
+ * for access configs.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ com.google.protobuf.ByteString
+ getKindBytes();
+
+ /**
+ *
+ * The type of configuration. The default and only option is
+ * <code>ONE_TO_ONE_NAT</code>.
+ * @default ONE_TO_ONE_NAT
+ *
+ *
+ * optional .google.compute.v1.AccessConfig.AccessType type = 1;
+ */
+ int getTypeValue();
+ /**
+ *
+ * The type of configuration. The default and only option is
+ * <code>ONE_TO_ONE_NAT</code>.
+ * @default ONE_TO_ONE_NAT
+ *
+ *
+ * optional .google.compute.v1.AccessConfig.AccessType type = 1;
+ */
+ com.google.cloud.compute.v1.AccessConfig.AccessType getType();
+
+ /**
+ *
+ * The name of this access configuration. The default and recommended name is
+ * <code>External NAT</code> but you can use any arbitrary string you would
+ * like. For example, <code>My external IP</code> or
+ * <code>Network Access</code>.
+ *
+ *
+ * optional string name = 2;
+ */
+ java.lang.String getName();
+ /**
+ *
+ * The name of this access configuration. The default and recommended name is
+ * <code>External NAT</code> but you can use any arbitrary string you would
+ * like. For example, <code>My external IP</code> or
+ * <code>Network Access</code>.
+ *
+ *
+ * optional string name = 2;
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ *
+ * An
+ * <a href="/compute/docs/ip-addresses#externaladdresses">external IP address</a>
+ * associated with this instance. Specify an unused static external
+ * IP address available to the project or leave this field undefined to use an
+ * IP from a shared ephemeral IP address pool. If you specify a static
+ * external IP address, it must live in the same region as the zone of the
+ * instance.
+ *
+ *
+ * optional string nat_ip = 3;
+ */
+ java.lang.String getNatIp();
+ /**
+ *
+ * An
+ * <a href="/compute/docs/ip-addresses#externaladdresses">external IP address</a>
+ * associated with this instance. Specify an unused static external
+ * IP address available to the project or leave this field undefined to use an
+ * IP from a shared ephemeral IP address pool. If you specify a static
+ * external IP address, it must live in the same region as the zone of the
+ * instance.
+ *
+ *
+ * optional string nat_ip = 3;
+ */
+ com.google.protobuf.ByteString
+ getNatIpBytes();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java
new file mode 100644
index 000000000..92628de53
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/AttachedDisk.java
@@ -0,0 +1,3665 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ *
+ * An instance-attached disk resource.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.AttachedDisk}
+ */
+public final class AttachedDisk extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.AttachedDisk)
+ AttachedDiskOrBuilder {
+ // Use AttachedDisk.newBuilder() to construct.
+ private AttachedDisk(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private AttachedDisk() {
+ kind_ = "";
+ type_ = 0;
+ mode_ = 0;
+ source_ = "";
+ deviceName_ = "";
+ index_ = 0;
+ boot_ = false;
+ autoDelete_ = false;
+ licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ interface_ = 0;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private AttachedDisk(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ int rawValue = input.readEnum();
+
+ type_ = rawValue;
+ break;
+ }
+ case 16: {
+ int rawValue = input.readEnum();
+
+ mode_ = rawValue;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ source_ = s;
+ break;
+ }
+ case 34: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ deviceName_ = s;
+ break;
+ }
+ case 40: {
+
+ index_ = input.readInt32();
+ break;
+ }
+ case 48: {
+
+ boot_ = input.readBool();
+ break;
+ }
+ case 58: {
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParams.Builder subBuilder = null;
+ if (initializeParams_ != null) {
+ subBuilder = initializeParams_.toBuilder();
+ }
+ initializeParams_ = input.readMessage(com.google.cloud.compute.v1.AttachedDisk.InitializeParams.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(initializeParams_);
+ initializeParams_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 64: {
+
+ autoDelete_ = input.readBool();
+ break;
+ }
+ case 74: {
+ java.lang.String s = input.readStringRequireUtf8();
+ if (!((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
+ licenses_ = new com.google.protobuf.LazyStringArrayList();
+ mutable_bitField0_ |= 0x00000200;
+ }
+ licenses_.add(s);
+ break;
+ }
+ case 80: {
+ int rawValue = input.readEnum();
+
+ interface_ = rawValue;
+ break;
+ }
+ case 8002: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ kind_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000200) == 0x00000200)) {
+ licenses_ = licenses_.getUnmodifiableView();
+ }
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_AttachedDisk_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_AttachedDisk_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.AttachedDisk.class, com.google.cloud.compute.v1.AttachedDisk.Builder.class);
+ }
+
+ /**
+ * Protobuf enum {@code google.compute.v1.AttachedDisk.DiskType}
+ */
+ public enum DiskType
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * SCRATCH = 0;
+ */
+ SCRATCH(0),
+ /**
+ * PERSISTENT = 1;
+ */
+ PERSISTENT(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ * SCRATCH = 0;
+ */
+ public static final int SCRATCH_VALUE = 0;
+ /**
+ * PERSISTENT = 1;
+ */
+ public static final int PERSISTENT_VALUE = 1;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static DiskType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static DiskType forNumber(int value) {
+ switch (value) {
+ case 0: return SCRATCH;
+ case 1: return PERSISTENT;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * <b>[Default]</b> Attaches this disk in read-write mode. Only one
+ * virtual machine at a time can be attached to a disk in read-write mode.
+ *
+ *
+ * READ_WRITE = 0;
+ */
+ READ_WRITE(0),
+ /**
+ *
+ * Attaches this disk in read-only mode. Multiple virtual machines can use
+ * a disk in read-only mode at a time.
+ *
+ *
+ * READ_ONLY = 1;
+ */
+ READ_ONLY(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ * <b>[Default]</b> Attaches this disk in read-write mode. Only one
+ * virtual machine at a time can be attached to a disk in read-write mode.
+ *
+ *
+ * READ_WRITE = 0;
+ */
+ public static final int READ_WRITE_VALUE = 0;
+ /**
+ *
+ * Attaches this disk in read-only mode. Multiple virtual machines can use
+ * a disk in read-only mode at a time.
+ *
+ *
+ * READ_ONLY = 1;
+ */
+ public static final int READ_ONLY_VALUE = 1;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static DiskMode valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static DiskMode forNumber(int value) {
+ switch (value) {
+ case 0: return READ_WRITE;
+ case 1: return READ_ONLY;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMapSCSI = 0;
+ */
+ SCSI(0),
+ /**
+ * NVME = 1;
+ */
+ NVME(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ * SCSI = 0;
+ */
+ public static final int SCSI_VALUE = 0;
+ /**
+ * NVME = 1;
+ */
+ public static final int NVME_VALUE = 1;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static DiskInterface valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static DiskInterface forNumber(int value) {
+ switch (value) {
+ case 0: return SCSI;
+ case 1: return NVME;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Specifies the disk name. If not specified, the default is to use the name
+ * of the instance.
+ *
+ *
+ * optional string disk_name = 1;
+ */
+ java.lang.String getDiskName();
+ /**
+ *
+ * Specifies the disk name. If not specified, the default is to use the name
+ * of the instance.
+ *
+ *
+ * optional string disk_name = 1;
+ */
+ com.google.protobuf.ByteString
+ getDiskNameBytes();
+
+ /**
+ *
+ * The source image to create this disk. When creating a new instance,
+ * one of <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * To create a disk with one of the public operating system images, specify
+ * the image by its family name. For example, specify
+ * <code>family/debian-8</code> to use the latest Debian 8 image:
+ * <code>projects/debian-cloud/global/images/family/debian-8</code>
+ * Alternatively, use a specific version of a public operating system image:
+ * <code>projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD</code>
+ * To create a disk with a private image that you created, specify the
+ * image name in the following format:
+ * <code>global/images/my-private-image</code>
+ * You can also specify a private image by its image family, which returns
+ * the latest version of the image in that family. Replace the image name
+ * with <code>family/family-name</code>:
+ * <code>global/images/family/my-private-family</code>
+ * If the source image is deleted later, this field will not be set.
+ *
+ *
+ * optional string source_image = 2;
+ */
+ java.lang.String getSourceImage();
+ /**
+ *
+ * The source image to create this disk. When creating a new instance,
+ * one of <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * To create a disk with one of the public operating system images, specify
+ * the image by its family name. For example, specify
+ * <code>family/debian-8</code> to use the latest Debian 8 image:
+ * <code>projects/debian-cloud/global/images/family/debian-8</code>
+ * Alternatively, use a specific version of a public operating system image:
+ * <code>projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD</code>
+ * To create a disk with a private image that you created, specify the
+ * image name in the following format:
+ * <code>global/images/my-private-image</code>
+ * You can also specify a private image by its image family, which returns
+ * the latest version of the image in that family. Replace the image name
+ * with <code>family/family-name</code>:
+ * <code>global/images/family/my-private-family</code>
+ * If the source image is deleted later, this field will not be set.
+ *
+ *
+ * optional string source_image = 2;
+ */
+ com.google.protobuf.ByteString
+ getSourceImageBytes();
+
+ /**
+ *
+ * Specifies the size of the disk in base-2 GB.
+ *
+ *
+ * optional int64 disk_size_gb = 3;
+ */
+ long getDiskSizeGb();
+
+ /**
+ *
+ * Specifies the disk type to use to create the instance. If not specified,
+ * the default is <code>pd-standard</code>, specified using the full URL.
+ * For example:
+ * <code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var>/diskTypes/pd-standard</code>
+ * Other values include <code>pd-ssd</code> and <code>local-ssd</code>. If
+ * you define this field, you can provide either the full or partial URL.
+ * For example, the following are valid values:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>zones/<var class="apiparam">zone</var>/diskTypes/<var class="apiparam">diskType</var></code></li>
+ * </ul>
+ * Note that for InstanceTemplate, this is the name of the disk type, not
+ * URL.
+ *
+ *
+ * optional string disk_type = 5;
+ */
+ java.lang.String getDiskType();
+ /**
+ *
+ * Specifies the disk type to use to create the instance. If not specified,
+ * the default is <code>pd-standard</code>, specified using the full URL.
+ * For example:
+ * <code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var>/diskTypes/pd-standard</code>
+ * Other values include <code>pd-ssd</code> and <code>local-ssd</code>. If
+ * you define this field, you can provide either the full or partial URL.
+ * For example, the following are valid values:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>zones/<var class="apiparam">zone</var>/diskTypes/<var class="apiparam">diskType</var></code></li>
+ * </ul>
+ * Note that for InstanceTemplate, this is the name of the disk type, not
+ * URL.
+ *
+ *
+ * optional string disk_type = 5;
+ */
+ com.google.protobuf.ByteString
+ getDiskTypeBytes();
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.AttachedDisk.InitializeParams}
+ */
+ public static final class InitializeParams extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.AttachedDisk.InitializeParams)
+ InitializeParamsOrBuilder {
+ // Use InitializeParams.newBuilder() to construct.
+ private InitializeParams(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private InitializeParams() {
+ diskName_ = "";
+ sourceImage_ = "";
+ diskSizeGb_ = 0L;
+ diskType_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private InitializeParams(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ diskName_ = s;
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ sourceImage_ = s;
+ break;
+ }
+ case 24: {
+
+ diskSizeGb_ = input.readInt64();
+ break;
+ }
+ case 42: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ diskType_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_AttachedDisk_InitializeParams_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_AttachedDisk_InitializeParams_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParams.class, com.google.cloud.compute.v1.AttachedDisk.InitializeParams.Builder.class);
+ }
+
+ public static final int DISK_NAME_FIELD_NUMBER = 1;
+ private volatile java.lang.Object diskName_;
+ /**
+ *
+ * Specifies the disk name. If not specified, the default is to use the name
+ * of the instance.
+ *
+ *
+ * optional string disk_name = 1;
+ */
+ public java.lang.String getDiskName() {
+ java.lang.Object ref = diskName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ diskName_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Specifies the disk name. If not specified, the default is to use the name
+ * of the instance.
+ *
+ *
+ * optional string disk_name = 1;
+ */
+ public com.google.protobuf.ByteString
+ getDiskNameBytes() {
+ java.lang.Object ref = diskName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ diskName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SOURCE_IMAGE_FIELD_NUMBER = 2;
+ private volatile java.lang.Object sourceImage_;
+ /**
+ *
+ * The source image to create this disk. When creating a new instance,
+ * one of <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * To create a disk with one of the public operating system images, specify
+ * the image by its family name. For example, specify
+ * <code>family/debian-8</code> to use the latest Debian 8 image:
+ * <code>projects/debian-cloud/global/images/family/debian-8</code>
+ * Alternatively, use a specific version of a public operating system image:
+ * <code>projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD</code>
+ * To create a disk with a private image that you created, specify the
+ * image name in the following format:
+ * <code>global/images/my-private-image</code>
+ * You can also specify a private image by its image family, which returns
+ * the latest version of the image in that family. Replace the image name
+ * with <code>family/family-name</code>:
+ * <code>global/images/family/my-private-family</code>
+ * If the source image is deleted later, this field will not be set.
+ *
+ *
+ * optional string source_image = 2;
+ */
+ public java.lang.String getSourceImage() {
+ java.lang.Object ref = sourceImage_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourceImage_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The source image to create this disk. When creating a new instance,
+ * one of <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * To create a disk with one of the public operating system images, specify
+ * the image by its family name. For example, specify
+ * <code>family/debian-8</code> to use the latest Debian 8 image:
+ * <code>projects/debian-cloud/global/images/family/debian-8</code>
+ * Alternatively, use a specific version of a public operating system image:
+ * <code>projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD</code>
+ * To create a disk with a private image that you created, specify the
+ * image name in the following format:
+ * <code>global/images/my-private-image</code>
+ * You can also specify a private image by its image family, which returns
+ * the latest version of the image in that family. Replace the image name
+ * with <code>family/family-name</code>:
+ * <code>global/images/family/my-private-family</code>
+ * If the source image is deleted later, this field will not be set.
+ *
+ *
+ * optional string source_image = 2;
+ */
+ public com.google.protobuf.ByteString
+ getSourceImageBytes() {
+ java.lang.Object ref = sourceImage_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ sourceImage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DISK_SIZE_GB_FIELD_NUMBER = 3;
+ private long diskSizeGb_;
+ /**
+ *
+ * Specifies the size of the disk in base-2 GB.
+ *
+ *
+ * optional int64 disk_size_gb = 3;
+ */
+ public long getDiskSizeGb() {
+ return diskSizeGb_;
+ }
+
+ public static final int DISK_TYPE_FIELD_NUMBER = 5;
+ private volatile java.lang.Object diskType_;
+ /**
+ *
+ * Specifies the disk type to use to create the instance. If not specified,
+ * the default is <code>pd-standard</code>, specified using the full URL.
+ * For example:
+ * <code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var>/diskTypes/pd-standard</code>
+ * Other values include <code>pd-ssd</code> and <code>local-ssd</code>. If
+ * you define this field, you can provide either the full or partial URL.
+ * For example, the following are valid values:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>zones/<var class="apiparam">zone</var>/diskTypes/<var class="apiparam">diskType</var></code></li>
+ * </ul>
+ * Note that for InstanceTemplate, this is the name of the disk type, not
+ * URL.
+ *
+ *
+ * optional string disk_type = 5;
+ */
+ public java.lang.String getDiskType() {
+ java.lang.Object ref = diskType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ diskType_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Specifies the disk type to use to create the instance. If not specified,
+ * the default is <code>pd-standard</code>, specified using the full URL.
+ * For example:
+ * <code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var>/diskTypes/pd-standard</code>
+ * Other values include <code>pd-ssd</code> and <code>local-ssd</code>. If
+ * you define this field, you can provide either the full or partial URL.
+ * For example, the following are valid values:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>zones/<var class="apiparam">zone</var>/diskTypes/<var class="apiparam">diskType</var></code></li>
+ * </ul>
+ * Note that for InstanceTemplate, this is the name of the disk type, not
+ * URL.
+ *
+ *
+ * optional string disk_type = 5;
+ */
+ public com.google.protobuf.ByteString
+ getDiskTypeBytes() {
+ java.lang.Object ref = diskType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ diskType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getDiskNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, diskName_);
+ }
+ if (!getSourceImageBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, sourceImage_);
+ }
+ if (diskSizeGb_ != 0L) {
+ output.writeInt64(3, diskSizeGb_);
+ }
+ if (!getDiskTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, diskType_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getDiskNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, diskName_);
+ }
+ if (!getSourceImageBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, sourceImage_);
+ }
+ if (diskSizeGb_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt64Size(3, diskSizeGb_);
+ }
+ if (!getDiskTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, diskType_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.AttachedDisk.InitializeParams)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParams other = (com.google.cloud.compute.v1.AttachedDisk.InitializeParams) obj;
+
+ boolean result = true;
+ result = result && getDiskName()
+ .equals(other.getDiskName());
+ result = result && getSourceImage()
+ .equals(other.getSourceImage());
+ result = result && (getDiskSizeGb()
+ == other.getDiskSizeGb());
+ result = result && getDiskType()
+ .equals(other.getDiskType());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + DISK_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getDiskName().hashCode();
+ hash = (37 * hash) + SOURCE_IMAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getSourceImage().hashCode();
+ hash = (37 * hash) + DISK_SIZE_GB_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getDiskSizeGb());
+ hash = (37 * hash) + DISK_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getDiskType().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.AttachedDisk.InitializeParams prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.AttachedDisk.InitializeParams}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * Specifies the disk name. If not specified, the default is to use the name
+ * of the instance.
+ *
+ *
+ * optional string disk_name = 1;
+ */
+ public java.lang.String getDiskName() {
+ java.lang.Object ref = diskName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ diskName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Specifies the disk name. If not specified, the default is to use the name
+ * of the instance.
+ *
+ *
+ * optional string disk_name = 1;
+ */
+ public com.google.protobuf.ByteString
+ getDiskNameBytes() {
+ java.lang.Object ref = diskName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ diskName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Specifies the disk name. If not specified, the default is to use the name
+ * of the instance.
+ *
+ *
+ * optional string disk_name = 1;
+ */
+ public Builder setDiskName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ diskName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the disk name. If not specified, the default is to use the name
+ * of the instance.
+ *
+ *
+ * optional string disk_name = 1;
+ */
+ public Builder clearDiskName() {
+
+ diskName_ = getDefaultInstance().getDiskName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the disk name. If not specified, the default is to use the name
+ * of the instance.
+ *
+ *
+ * optional string disk_name = 1;
+ */
+ public Builder setDiskNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ diskName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object sourceImage_ = "";
+ /**
+ *
+ * The source image to create this disk. When creating a new instance,
+ * one of <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * To create a disk with one of the public operating system images, specify
+ * the image by its family name. For example, specify
+ * <code>family/debian-8</code> to use the latest Debian 8 image:
+ * <code>projects/debian-cloud/global/images/family/debian-8</code>
+ * Alternatively, use a specific version of a public operating system image:
+ * <code>projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD</code>
+ * To create a disk with a private image that you created, specify the
+ * image name in the following format:
+ * <code>global/images/my-private-image</code>
+ * You can also specify a private image by its image family, which returns
+ * the latest version of the image in that family. Replace the image name
+ * with <code>family/family-name</code>:
+ * <code>global/images/family/my-private-family</code>
+ * If the source image is deleted later, this field will not be set.
+ *
+ *
+ * optional string source_image = 2;
+ */
+ public java.lang.String getSourceImage() {
+ java.lang.Object ref = sourceImage_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourceImage_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The source image to create this disk. When creating a new instance,
+ * one of <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * To create a disk with one of the public operating system images, specify
+ * the image by its family name. For example, specify
+ * <code>family/debian-8</code> to use the latest Debian 8 image:
+ * <code>projects/debian-cloud/global/images/family/debian-8</code>
+ * Alternatively, use a specific version of a public operating system image:
+ * <code>projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD</code>
+ * To create a disk with a private image that you created, specify the
+ * image name in the following format:
+ * <code>global/images/my-private-image</code>
+ * You can also specify a private image by its image family, which returns
+ * the latest version of the image in that family. Replace the image name
+ * with <code>family/family-name</code>:
+ * <code>global/images/family/my-private-family</code>
+ * If the source image is deleted later, this field will not be set.
+ *
+ *
+ * optional string source_image = 2;
+ */
+ public com.google.protobuf.ByteString
+ getSourceImageBytes() {
+ java.lang.Object ref = sourceImage_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ sourceImage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The source image to create this disk. When creating a new instance,
+ * one of <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * To create a disk with one of the public operating system images, specify
+ * the image by its family name. For example, specify
+ * <code>family/debian-8</code> to use the latest Debian 8 image:
+ * <code>projects/debian-cloud/global/images/family/debian-8</code>
+ * Alternatively, use a specific version of a public operating system image:
+ * <code>projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD</code>
+ * To create a disk with a private image that you created, specify the
+ * image name in the following format:
+ * <code>global/images/my-private-image</code>
+ * You can also specify a private image by its image family, which returns
+ * the latest version of the image in that family. Replace the image name
+ * with <code>family/family-name</code>:
+ * <code>global/images/family/my-private-family</code>
+ * If the source image is deleted later, this field will not be set.
+ *
+ *
+ * optional string source_image = 2;
+ */
+ public Builder setSourceImage(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ sourceImage_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The source image to create this disk. When creating a new instance,
+ * one of <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * To create a disk with one of the public operating system images, specify
+ * the image by its family name. For example, specify
+ * <code>family/debian-8</code> to use the latest Debian 8 image:
+ * <code>projects/debian-cloud/global/images/family/debian-8</code>
+ * Alternatively, use a specific version of a public operating system image:
+ * <code>projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD</code>
+ * To create a disk with a private image that you created, specify the
+ * image name in the following format:
+ * <code>global/images/my-private-image</code>
+ * You can also specify a private image by its image family, which returns
+ * the latest version of the image in that family. Replace the image name
+ * with <code>family/family-name</code>:
+ * <code>global/images/family/my-private-family</code>
+ * If the source image is deleted later, this field will not be set.
+ *
+ *
+ * optional string source_image = 2;
+ */
+ public Builder clearSourceImage() {
+
+ sourceImage_ = getDefaultInstance().getSourceImage();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The source image to create this disk. When creating a new instance,
+ * one of <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * To create a disk with one of the public operating system images, specify
+ * the image by its family name. For example, specify
+ * <code>family/debian-8</code> to use the latest Debian 8 image:
+ * <code>projects/debian-cloud/global/images/family/debian-8</code>
+ * Alternatively, use a specific version of a public operating system image:
+ * <code>projects/debian-cloud/global/images/debian-8-jessie-vYYYYMMDD</code>
+ * To create a disk with a private image that you created, specify the
+ * image name in the following format:
+ * <code>global/images/my-private-image</code>
+ * You can also specify a private image by its image family, which returns
+ * the latest version of the image in that family. Replace the image name
+ * with <code>family/family-name</code>:
+ * <code>global/images/family/my-private-family</code>
+ * If the source image is deleted later, this field will not be set.
+ *
+ *
+ * optional string source_image = 2;
+ */
+ public Builder setSourceImageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ sourceImage_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long diskSizeGb_ ;
+ /**
+ *
+ * Specifies the size of the disk in base-2 GB.
+ *
+ *
+ * optional int64 disk_size_gb = 3;
+ */
+ public long getDiskSizeGb() {
+ return diskSizeGb_;
+ }
+ /**
+ *
+ * Specifies the size of the disk in base-2 GB.
+ *
+ *
+ * optional int64 disk_size_gb = 3;
+ */
+ public Builder setDiskSizeGb(long value) {
+
+ diskSizeGb_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the size of the disk in base-2 GB.
+ *
+ *
+ * optional int64 disk_size_gb = 3;
+ */
+ public Builder clearDiskSizeGb() {
+
+ diskSizeGb_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object diskType_ = "";
+ /**
+ *
+ * Specifies the disk type to use to create the instance. If not specified,
+ * the default is <code>pd-standard</code>, specified using the full URL.
+ * For example:
+ * <code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var>/diskTypes/pd-standard</code>
+ * Other values include <code>pd-ssd</code> and <code>local-ssd</code>. If
+ * you define this field, you can provide either the full or partial URL.
+ * For example, the following are valid values:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>zones/<var class="apiparam">zone</var>/diskTypes/<var class="apiparam">diskType</var></code></li>
+ * </ul>
+ * Note that for InstanceTemplate, this is the name of the disk type, not
+ * URL.
+ *
+ *
+ * optional string disk_type = 5;
+ */
+ public java.lang.String getDiskType() {
+ java.lang.Object ref = diskType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ diskType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Specifies the disk type to use to create the instance. If not specified,
+ * the default is <code>pd-standard</code>, specified using the full URL.
+ * For example:
+ * <code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var>/diskTypes/pd-standard</code>
+ * Other values include <code>pd-ssd</code> and <code>local-ssd</code>. If
+ * you define this field, you can provide either the full or partial URL.
+ * For example, the following are valid values:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>zones/<var class="apiparam">zone</var>/diskTypes/<var class="apiparam">diskType</var></code></li>
+ * </ul>
+ * Note that for InstanceTemplate, this is the name of the disk type, not
+ * URL.
+ *
+ *
+ * optional string disk_type = 5;
+ */
+ public com.google.protobuf.ByteString
+ getDiskTypeBytes() {
+ java.lang.Object ref = diskType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ diskType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Specifies the disk type to use to create the instance. If not specified,
+ * the default is <code>pd-standard</code>, specified using the full URL.
+ * For example:
+ * <code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var>/diskTypes/pd-standard</code>
+ * Other values include <code>pd-ssd</code> and <code>local-ssd</code>. If
+ * you define this field, you can provide either the full or partial URL.
+ * For example, the following are valid values:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>zones/<var class="apiparam">zone</var>/diskTypes/<var class="apiparam">diskType</var></code></li>
+ * </ul>
+ * Note that for InstanceTemplate, this is the name of the disk type, not
+ * URL.
+ *
+ *
+ * optional string disk_type = 5;
+ */
+ public Builder setDiskType(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ diskType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the disk type to use to create the instance. If not specified,
+ * the default is <code>pd-standard</code>, specified using the full URL.
+ * For example:
+ * <code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var>/diskTypes/pd-standard</code>
+ * Other values include <code>pd-ssd</code> and <code>local-ssd</code>. If
+ * you define this field, you can provide either the full or partial URL.
+ * For example, the following are valid values:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>zones/<var class="apiparam">zone</var>/diskTypes/<var class="apiparam">diskType</var></code></li>
+ * </ul>
+ * Note that for InstanceTemplate, this is the name of the disk type, not
+ * URL.
+ *
+ *
+ * optional string disk_type = 5;
+ */
+ public Builder clearDiskType() {
+
+ diskType_ = getDefaultInstance().getDiskType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the disk type to use to create the instance. If not specified,
+ * the default is <code>pd-standard</code>, specified using the full URL.
+ * For example:
+ * <code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var>/diskTypes/pd-standard</code>
+ * Other values include <code>pd-ssd</code> and <code>local-ssd</code>. If
+ * you define this field, you can provide either the full or partial URL.
+ * For example, the following are valid values:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>projects/<var class="apiparam">project</var>/zones/<var class="apiparam">zone</var><span>/diskTypes/</span><var class="apiparam">diskType</var></code></li>
+ * <li><code>zones/<var class="apiparam">zone</var>/diskTypes/<var class="apiparam">diskType</var></code></li>
+ * </ul>
+ * Note that for InstanceTemplate, this is the name of the disk type, not
+ * URL.
+ *
+ *
+ * optional string disk_type = 5;
+ */
+ public Builder setDiskTypeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ diskType_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.AttachedDisk.InitializeParams)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.AttachedDisk.InitializeParams)
+ private static final com.google.cloud.compute.v1.AttachedDisk.InitializeParams DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.AttachedDisk.InitializeParams();
+ }
+
+ public static com.google.cloud.compute.v1.AttachedDisk.InitializeParams getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * [Output Only] Type of the resource. Always
+ * <code>compute#attachedDisk</code> for attached disks.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#attachedDisk</code> for attached disks.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TYPE_FIELD_NUMBER = 1;
+ private int type_;
+ /**
+ *
+ * Specifies the type of the disk, either <code>SCRATCH</code> or
+ * <code>PERSISTENT</code>. If not specified, the default is
+ * <code>PERSISTENT</code>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskType type = 1;
+ */
+ public int getTypeValue() {
+ return type_;
+ }
+ /**
+ *
+ * Specifies the type of the disk, either <code>SCRATCH</code> or
+ * <code>PERSISTENT</code>. If not specified, the default is
+ * <code>PERSISTENT</code>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskType type = 1;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.DiskType getType() {
+ com.google.cloud.compute.v1.AttachedDisk.DiskType result = com.google.cloud.compute.v1.AttachedDisk.DiskType.valueOf(type_);
+ return result == null ? com.google.cloud.compute.v1.AttachedDisk.DiskType.UNRECOGNIZED : result;
+ }
+
+ public static final int MODE_FIELD_NUMBER = 2;
+ private int mode_;
+ /**
+ *
+ * The mode in which to attach this disk, either <code>READ_WRITE</code> or
+ * <code>READ_ONLY</code>. If not specified, the default is to attach the disk
+ * in <code>READ_WRITE</code> mode.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskMode mode = 2;
+ */
+ public int getModeValue() {
+ return mode_;
+ }
+ /**
+ *
+ * The mode in which to attach this disk, either <code>READ_WRITE</code> or
+ * <code>READ_ONLY</code>. If not specified, the default is to attach the disk
+ * in <code>READ_WRITE</code> mode.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskMode mode = 2;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.DiskMode getMode() {
+ com.google.cloud.compute.v1.AttachedDisk.DiskMode result = com.google.cloud.compute.v1.AttachedDisk.DiskMode.valueOf(mode_);
+ return result == null ? com.google.cloud.compute.v1.AttachedDisk.DiskMode.UNRECOGNIZED : result;
+ }
+
+ public static final int SOURCE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object source_;
+ /**
+ *
+ * Specifies a valid partial or full URL to an existing Persistent Disk
+ * resource. When creating a new instance, one of
+ * <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * If desired, you can also attach existing non-root persistent disks using
+ * this property. This field is only applicable for persistent disks.
+ * Note that for InstanceTemplate, specify the disk name, not the URL for the
+ * disk.
+ *
+ *
+ * optional string source = 3;
+ */
+ public java.lang.String getSource() {
+ java.lang.Object ref = source_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ source_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Specifies a valid partial or full URL to an existing Persistent Disk
+ * resource. When creating a new instance, one of
+ * <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * If desired, you can also attach existing non-root persistent disks using
+ * this property. This field is only applicable for persistent disks.
+ * Note that for InstanceTemplate, specify the disk name, not the URL for the
+ * disk.
+ *
+ *
+ * optional string source = 3;
+ */
+ public com.google.protobuf.ByteString
+ getSourceBytes() {
+ java.lang.Object ref = source_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ source_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DEVICE_NAME_FIELD_NUMBER = 4;
+ private volatile java.lang.Object deviceName_;
+ /**
+ *
+ * Specifies a unique device name of your choice that is reflected into the
+ * <code>/dev/disk/by-id/google-*</code> tree of a Linux operating system
+ * running within the instance. This name can be used to reference the device
+ * for mounting, resizing, and so on, from within the instance.
+ * If not specified, the server chooses a default device name to apply to this
+ * disk, in the form <code>persistent-disks-x</code>, where x is a number
+ * assigned by Google Compute Engine. This field is only applicable for
+ * persistent disks.
+ *
+ *
+ * optional string device_name = 4;
+ */
+ public java.lang.String getDeviceName() {
+ java.lang.Object ref = deviceName_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ deviceName_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Specifies a unique device name of your choice that is reflected into the
+ * <code>/dev/disk/by-id/google-*</code> tree of a Linux operating system
+ * running within the instance. This name can be used to reference the device
+ * for mounting, resizing, and so on, from within the instance.
+ * If not specified, the server chooses a default device name to apply to this
+ * disk, in the form <code>persistent-disks-x</code>, where x is a number
+ * assigned by Google Compute Engine. This field is only applicable for
+ * persistent disks.
+ *
+ *
+ * optional string device_name = 4;
+ */
+ public com.google.protobuf.ByteString
+ getDeviceNameBytes() {
+ java.lang.Object ref = deviceName_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ deviceName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int INDEX_FIELD_NUMBER = 5;
+ private int index_;
+ /**
+ *
+ * Assigns a zero-based index to this disk, where 0 is reserved for the boot
+ * disk. For example, if you have many disks attached to an instance, each
+ * disk would have a unique index number. If not specified, the server will
+ * choose an appropriate value.
+ *
+ *
+ * optional int32 index = 5;
+ */
+ public int getIndex() {
+ return index_;
+ }
+
+ public static final int BOOT_FIELD_NUMBER = 6;
+ private boolean boot_;
+ /**
+ *
+ * Indicates that this is a boot disk. The virtual machine will use the first
+ * partition of the disk for its root filesystem.
+ *
+ *
+ * optional bool boot = 6;
+ */
+ public boolean getBoot() {
+ return boot_;
+ }
+
+ public static final int INITIALIZE_PARAMS_FIELD_NUMBER = 7;
+ private com.google.cloud.compute.v1.AttachedDisk.InitializeParams initializeParams_;
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public boolean hasInitializeParams() {
+ return initializeParams_ != null;
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.InitializeParams getInitializeParams() {
+ return initializeParams_ == null ? com.google.cloud.compute.v1.AttachedDisk.InitializeParams.getDefaultInstance() : initializeParams_;
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.InitializeParamsOrBuilder getInitializeParamsOrBuilder() {
+ return getInitializeParams();
+ }
+
+ public static final int AUTO_DELETE_FIELD_NUMBER = 8;
+ private boolean autoDelete_;
+ /**
+ *
+ * Specifies whether the disk will be auto-deleted when the instance is deleted
+ * (but not when the disk is detached from the instance).
+ *
+ *
+ * optional bool auto_delete = 8;
+ */
+ public boolean getAutoDelete() {
+ return autoDelete_;
+ }
+
+ public static final int LICENSES_FIELD_NUMBER = 9;
+ private com.google.protobuf.LazyStringList licenses_;
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getLicensesList() {
+ return licenses_;
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public int getLicensesCount() {
+ return licenses_.size();
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public java.lang.String getLicenses(int index) {
+ return licenses_.get(index);
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public com.google.protobuf.ByteString
+ getLicensesBytes(int index) {
+ return licenses_.getByteString(index);
+ }
+
+ public static final int INTERFACE_FIELD_NUMBER = 10;
+ private int interface_;
+ /**
+ *
+ * Specifies the disk interface to use for attaching this disk, which is
+ * either <code>SCSI</code> or <code>NVME</code>. The default is
+ * <code>SCSI</code>. Persistent disks must always use SCSI and the request
+ * will fail if you attempt to attach a persistent disk in any other format
+ * than SCSI. Local SSDs can use either NVME or SCSI. For performance
+ * characteristics of SCSI over NVMe, see
+ * <a href="/compute/docs/disks#localssds">Local SSD performance</a>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskInterface interface = 10;
+ */
+ public int getInterfaceValue() {
+ return interface_;
+ }
+ /**
+ *
+ * Specifies the disk interface to use for attaching this disk, which is
+ * either <code>SCSI</code> or <code>NVME</code>. The default is
+ * <code>SCSI</code>. Persistent disks must always use SCSI and the request
+ * will fail if you attempt to attach a persistent disk in any other format
+ * than SCSI. Local SSDs can use either NVME or SCSI. For performance
+ * characteristics of SCSI over NVMe, see
+ * <a href="/compute/docs/disks#localssds">Local SSD performance</a>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskInterface interface = 10;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.DiskInterface getInterface() {
+ com.google.cloud.compute.v1.AttachedDisk.DiskInterface result = com.google.cloud.compute.v1.AttachedDisk.DiskInterface.valueOf(interface_);
+ return result == null ? com.google.cloud.compute.v1.AttachedDisk.DiskInterface.UNRECOGNIZED : result;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (type_ != com.google.cloud.compute.v1.AttachedDisk.DiskType.SCRATCH.getNumber()) {
+ output.writeEnum(1, type_);
+ }
+ if (mode_ != com.google.cloud.compute.v1.AttachedDisk.DiskMode.READ_WRITE.getNumber()) {
+ output.writeEnum(2, mode_);
+ }
+ if (!getSourceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, source_);
+ }
+ if (!getDeviceNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, deviceName_);
+ }
+ if (index_ != 0) {
+ output.writeInt32(5, index_);
+ }
+ if (boot_ != false) {
+ output.writeBool(6, boot_);
+ }
+ if (initializeParams_ != null) {
+ output.writeMessage(7, getInitializeParams());
+ }
+ if (autoDelete_ != false) {
+ output.writeBool(8, autoDelete_);
+ }
+ for (int i = 0; i < licenses_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 9, licenses_.getRaw(i));
+ }
+ if (interface_ != com.google.cloud.compute.v1.AttachedDisk.DiskInterface.SCSI.getNumber()) {
+ output.writeEnum(10, interface_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1000, kind_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (type_ != com.google.cloud.compute.v1.AttachedDisk.DiskType.SCRATCH.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(1, type_);
+ }
+ if (mode_ != com.google.cloud.compute.v1.AttachedDisk.DiskMode.READ_WRITE.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(2, mode_);
+ }
+ if (!getSourceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, source_);
+ }
+ if (!getDeviceNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, deviceName_);
+ }
+ if (index_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(5, index_);
+ }
+ if (boot_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(6, boot_);
+ }
+ if (initializeParams_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(7, getInitializeParams());
+ }
+ if (autoDelete_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(8, autoDelete_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < licenses_.size(); i++) {
+ dataSize += computeStringSizeNoTag(licenses_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getLicensesList().size();
+ }
+ if (interface_ != com.google.cloud.compute.v1.AttachedDisk.DiskInterface.SCSI.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(10, interface_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1000, kind_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.AttachedDisk)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.AttachedDisk other = (com.google.cloud.compute.v1.AttachedDisk) obj;
+
+ boolean result = true;
+ result = result && getKind()
+ .equals(other.getKind());
+ result = result && type_ == other.type_;
+ result = result && mode_ == other.mode_;
+ result = result && getSource()
+ .equals(other.getSource());
+ result = result && getDeviceName()
+ .equals(other.getDeviceName());
+ result = result && (getIndex()
+ == other.getIndex());
+ result = result && (getBoot()
+ == other.getBoot());
+ result = result && (hasInitializeParams() == other.hasInitializeParams());
+ if (hasInitializeParams()) {
+ result = result && getInitializeParams()
+ .equals(other.getInitializeParams());
+ }
+ result = result && (getAutoDelete()
+ == other.getAutoDelete());
+ result = result && getLicensesList()
+ .equals(other.getLicensesList());
+ result = result && interface_ == other.interface_;
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + KIND_FIELD_NUMBER;
+ hash = (53 * hash) + getKind().hashCode();
+ hash = (37 * hash) + TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + type_;
+ hash = (37 * hash) + MODE_FIELD_NUMBER;
+ hash = (53 * hash) + mode_;
+ hash = (37 * hash) + SOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getSource().hashCode();
+ hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getDeviceName().hashCode();
+ hash = (37 * hash) + INDEX_FIELD_NUMBER;
+ hash = (53 * hash) + getIndex();
+ hash = (37 * hash) + BOOT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getBoot());
+ if (hasInitializeParams()) {
+ hash = (37 * hash) + INITIALIZE_PARAMS_FIELD_NUMBER;
+ hash = (53 * hash) + getInitializeParams().hashCode();
+ }
+ hash = (37 * hash) + AUTO_DELETE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getAutoDelete());
+ if (getLicensesCount() > 0) {
+ hash = (37 * hash) + LICENSES_FIELD_NUMBER;
+ hash = (53 * hash) + getLicensesList().hashCode();
+ }
+ hash = (37 * hash) + INTERFACE_FIELD_NUMBER;
+ hash = (53 * hash) + interface_;
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.AttachedDisk parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.AttachedDisk parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.AttachedDisk prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * An instance-attached disk resource.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.AttachedDisk}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * [Output Only] Type of the resource. Always
+ * <code>compute#attachedDisk</code> for attached disks.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#attachedDisk</code> for attached disks.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#attachedDisk</code> for attached disks.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKind(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#attachedDisk</code> for attached disks.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder clearKind() {
+
+ kind_ = getDefaultInstance().getKind();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#attachedDisk</code> for attached disks.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKindBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int type_ = 0;
+ /**
+ *
+ * Specifies the type of the disk, either <code>SCRATCH</code> or
+ * <code>PERSISTENT</code>. If not specified, the default is
+ * <code>PERSISTENT</code>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskType type = 1;
+ */
+ public int getTypeValue() {
+ return type_;
+ }
+ /**
+ *
+ * Specifies the type of the disk, either <code>SCRATCH</code> or
+ * <code>PERSISTENT</code>. If not specified, the default is
+ * <code>PERSISTENT</code>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskType type = 1;
+ */
+ public Builder setTypeValue(int value) {
+ type_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the type of the disk, either <code>SCRATCH</code> or
+ * <code>PERSISTENT</code>. If not specified, the default is
+ * <code>PERSISTENT</code>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskType type = 1;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.DiskType getType() {
+ com.google.cloud.compute.v1.AttachedDisk.DiskType result = com.google.cloud.compute.v1.AttachedDisk.DiskType.valueOf(type_);
+ return result == null ? com.google.cloud.compute.v1.AttachedDisk.DiskType.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * Specifies the type of the disk, either <code>SCRATCH</code> or
+ * <code>PERSISTENT</code>. If not specified, the default is
+ * <code>PERSISTENT</code>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskType type = 1;
+ */
+ public Builder setType(com.google.cloud.compute.v1.AttachedDisk.DiskType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ type_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the type of the disk, either <code>SCRATCH</code> or
+ * <code>PERSISTENT</code>. If not specified, the default is
+ * <code>PERSISTENT</code>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskType type = 1;
+ */
+ public Builder clearType() {
+
+ type_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int mode_ = 0;
+ /**
+ *
+ * The mode in which to attach this disk, either <code>READ_WRITE</code> or
+ * <code>READ_ONLY</code>. If not specified, the default is to attach the disk
+ * in <code>READ_WRITE</code> mode.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskMode mode = 2;
+ */
+ public int getModeValue() {
+ return mode_;
+ }
+ /**
+ *
+ * The mode in which to attach this disk, either <code>READ_WRITE</code> or
+ * <code>READ_ONLY</code>. If not specified, the default is to attach the disk
+ * in <code>READ_WRITE</code> mode.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskMode mode = 2;
+ */
+ public Builder setModeValue(int value) {
+ mode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The mode in which to attach this disk, either <code>READ_WRITE</code> or
+ * <code>READ_ONLY</code>. If not specified, the default is to attach the disk
+ * in <code>READ_WRITE</code> mode.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskMode mode = 2;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.DiskMode getMode() {
+ com.google.cloud.compute.v1.AttachedDisk.DiskMode result = com.google.cloud.compute.v1.AttachedDisk.DiskMode.valueOf(mode_);
+ return result == null ? com.google.cloud.compute.v1.AttachedDisk.DiskMode.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * The mode in which to attach this disk, either <code>READ_WRITE</code> or
+ * <code>READ_ONLY</code>. If not specified, the default is to attach the disk
+ * in <code>READ_WRITE</code> mode.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskMode mode = 2;
+ */
+ public Builder setMode(com.google.cloud.compute.v1.AttachedDisk.DiskMode value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ mode_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The mode in which to attach this disk, either <code>READ_WRITE</code> or
+ * <code>READ_ONLY</code>. If not specified, the default is to attach the disk
+ * in <code>READ_WRITE</code> mode.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskMode mode = 2;
+ */
+ public Builder clearMode() {
+
+ mode_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object source_ = "";
+ /**
+ *
+ * Specifies a valid partial or full URL to an existing Persistent Disk
+ * resource. When creating a new instance, one of
+ * <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * If desired, you can also attach existing non-root persistent disks using
+ * this property. This field is only applicable for persistent disks.
+ * Note that for InstanceTemplate, specify the disk name, not the URL for the
+ * disk.
+ *
+ *
+ * optional string source = 3;
+ */
+ public java.lang.String getSource() {
+ java.lang.Object ref = source_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ source_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Specifies a valid partial or full URL to an existing Persistent Disk
+ * resource. When creating a new instance, one of
+ * <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * If desired, you can also attach existing non-root persistent disks using
+ * this property. This field is only applicable for persistent disks.
+ * Note that for InstanceTemplate, specify the disk name, not the URL for the
+ * disk.
+ *
+ *
+ * optional string source = 3;
+ */
+ public com.google.protobuf.ByteString
+ getSourceBytes() {
+ java.lang.Object ref = source_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ source_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Specifies a valid partial or full URL to an existing Persistent Disk
+ * resource. When creating a new instance, one of
+ * <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * If desired, you can also attach existing non-root persistent disks using
+ * this property. This field is only applicable for persistent disks.
+ * Note that for InstanceTemplate, specify the disk name, not the URL for the
+ * disk.
+ *
+ *
+ * optional string source = 3;
+ */
+ public Builder setSource(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ source_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies a valid partial or full URL to an existing Persistent Disk
+ * resource. When creating a new instance, one of
+ * <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * If desired, you can also attach existing non-root persistent disks using
+ * this property. This field is only applicable for persistent disks.
+ * Note that for InstanceTemplate, specify the disk name, not the URL for the
+ * disk.
+ *
+ *
+ * optional string source = 3;
+ */
+ public Builder clearSource() {
+
+ source_ = getDefaultInstance().getSource();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies a valid partial or full URL to an existing Persistent Disk
+ * resource. When creating a new instance, one of
+ * <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * If desired, you can also attach existing non-root persistent disks using
+ * this property. This field is only applicable for persistent disks.
+ * Note that for InstanceTemplate, specify the disk name, not the URL for the
+ * disk.
+ *
+ *
+ * optional string source = 3;
+ */
+ public Builder setSourceBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ source_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object deviceName_ = "";
+ /**
+ *
+ * Specifies a unique device name of your choice that is reflected into the
+ * <code>/dev/disk/by-id/google-*</code> tree of a Linux operating system
+ * running within the instance. This name can be used to reference the device
+ * for mounting, resizing, and so on, from within the instance.
+ * If not specified, the server chooses a default device name to apply to this
+ * disk, in the form <code>persistent-disks-x</code>, where x is a number
+ * assigned by Google Compute Engine. This field is only applicable for
+ * persistent disks.
+ *
+ *
+ * optional string device_name = 4;
+ */
+ public java.lang.String getDeviceName() {
+ java.lang.Object ref = deviceName_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ deviceName_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Specifies a unique device name of your choice that is reflected into the
+ * <code>/dev/disk/by-id/google-*</code> tree of a Linux operating system
+ * running within the instance. This name can be used to reference the device
+ * for mounting, resizing, and so on, from within the instance.
+ * If not specified, the server chooses a default device name to apply to this
+ * disk, in the form <code>persistent-disks-x</code>, where x is a number
+ * assigned by Google Compute Engine. This field is only applicable for
+ * persistent disks.
+ *
+ *
+ * optional string device_name = 4;
+ */
+ public com.google.protobuf.ByteString
+ getDeviceNameBytes() {
+ java.lang.Object ref = deviceName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ deviceName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Specifies a unique device name of your choice that is reflected into the
+ * <code>/dev/disk/by-id/google-*</code> tree of a Linux operating system
+ * running within the instance. This name can be used to reference the device
+ * for mounting, resizing, and so on, from within the instance.
+ * If not specified, the server chooses a default device name to apply to this
+ * disk, in the form <code>persistent-disks-x</code>, where x is a number
+ * assigned by Google Compute Engine. This field is only applicable for
+ * persistent disks.
+ *
+ *
+ * optional string device_name = 4;
+ */
+ public Builder setDeviceName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ deviceName_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies a unique device name of your choice that is reflected into the
+ * <code>/dev/disk/by-id/google-*</code> tree of a Linux operating system
+ * running within the instance. This name can be used to reference the device
+ * for mounting, resizing, and so on, from within the instance.
+ * If not specified, the server chooses a default device name to apply to this
+ * disk, in the form <code>persistent-disks-x</code>, where x is a number
+ * assigned by Google Compute Engine. This field is only applicable for
+ * persistent disks.
+ *
+ *
+ * optional string device_name = 4;
+ */
+ public Builder clearDeviceName() {
+
+ deviceName_ = getDefaultInstance().getDeviceName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies a unique device name of your choice that is reflected into the
+ * <code>/dev/disk/by-id/google-*</code> tree of a Linux operating system
+ * running within the instance. This name can be used to reference the device
+ * for mounting, resizing, and so on, from within the instance.
+ * If not specified, the server chooses a default device name to apply to this
+ * disk, in the form <code>persistent-disks-x</code>, where x is a number
+ * assigned by Google Compute Engine. This field is only applicable for
+ * persistent disks.
+ *
+ *
+ * optional string device_name = 4;
+ */
+ public Builder setDeviceNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ deviceName_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int index_ ;
+ /**
+ *
+ * Assigns a zero-based index to this disk, where 0 is reserved for the boot
+ * disk. For example, if you have many disks attached to an instance, each
+ * disk would have a unique index number. If not specified, the server will
+ * choose an appropriate value.
+ *
+ *
+ * optional int32 index = 5;
+ */
+ public int getIndex() {
+ return index_;
+ }
+ /**
+ *
+ * Assigns a zero-based index to this disk, where 0 is reserved for the boot
+ * disk. For example, if you have many disks attached to an instance, each
+ * disk would have a unique index number. If not specified, the server will
+ * choose an appropriate value.
+ *
+ *
+ * optional int32 index = 5;
+ */
+ public Builder setIndex(int value) {
+
+ index_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Assigns a zero-based index to this disk, where 0 is reserved for the boot
+ * disk. For example, if you have many disks attached to an instance, each
+ * disk would have a unique index number. If not specified, the server will
+ * choose an appropriate value.
+ *
+ *
+ * optional int32 index = 5;
+ */
+ public Builder clearIndex() {
+
+ index_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private boolean boot_ ;
+ /**
+ *
+ * Indicates that this is a boot disk. The virtual machine will use the first
+ * partition of the disk for its root filesystem.
+ *
+ *
+ * optional bool boot = 6;
+ */
+ public boolean getBoot() {
+ return boot_;
+ }
+ /**
+ *
+ * Indicates that this is a boot disk. The virtual machine will use the first
+ * partition of the disk for its root filesystem.
+ *
+ *
+ * optional bool boot = 6;
+ */
+ public Builder setBoot(boolean value) {
+
+ boot_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Indicates that this is a boot disk. The virtual machine will use the first
+ * partition of the disk for its root filesystem.
+ *
+ *
+ * optional bool boot = 6;
+ */
+ public Builder clearBoot() {
+
+ boot_ = false;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.compute.v1.AttachedDisk.InitializeParams initializeParams_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParams, com.google.cloud.compute.v1.AttachedDisk.InitializeParams.Builder, com.google.cloud.compute.v1.AttachedDisk.InitializeParamsOrBuilder> initializeParamsBuilder_;
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public boolean hasInitializeParams() {
+ return initializeParamsBuilder_ != null || initializeParams_ != null;
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.InitializeParams getInitializeParams() {
+ if (initializeParamsBuilder_ == null) {
+ return initializeParams_ == null ? com.google.cloud.compute.v1.AttachedDisk.InitializeParams.getDefaultInstance() : initializeParams_;
+ } else {
+ return initializeParamsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public Builder setInitializeParams(com.google.cloud.compute.v1.AttachedDisk.InitializeParams value) {
+ if (initializeParamsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ initializeParams_ = value;
+ onChanged();
+ } else {
+ initializeParamsBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public Builder setInitializeParams(
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParams.Builder builderForValue) {
+ if (initializeParamsBuilder_ == null) {
+ initializeParams_ = builderForValue.build();
+ onChanged();
+ } else {
+ initializeParamsBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public Builder mergeInitializeParams(com.google.cloud.compute.v1.AttachedDisk.InitializeParams value) {
+ if (initializeParamsBuilder_ == null) {
+ if (initializeParams_ != null) {
+ initializeParams_ =
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParams.newBuilder(initializeParams_).mergeFrom(value).buildPartial();
+ } else {
+ initializeParams_ = value;
+ }
+ onChanged();
+ } else {
+ initializeParamsBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public Builder clearInitializeParams() {
+ if (initializeParamsBuilder_ == null) {
+ initializeParams_ = null;
+ onChanged();
+ } else {
+ initializeParams_ = null;
+ initializeParamsBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.InitializeParams.Builder getInitializeParamsBuilder() {
+
+ onChanged();
+ return getInitializeParamsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.InitializeParamsOrBuilder getInitializeParamsOrBuilder() {
+ if (initializeParamsBuilder_ != null) {
+ return initializeParamsBuilder_.getMessageOrBuilder();
+ } else {
+ return initializeParams_ == null ?
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParams.getDefaultInstance() : initializeParams_;
+ }
+ }
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParams, com.google.cloud.compute.v1.AttachedDisk.InitializeParams.Builder, com.google.cloud.compute.v1.AttachedDisk.InitializeParamsOrBuilder>
+ getInitializeParamsFieldBuilder() {
+ if (initializeParamsBuilder_ == null) {
+ initializeParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParams, com.google.cloud.compute.v1.AttachedDisk.InitializeParams.Builder, com.google.cloud.compute.v1.AttachedDisk.InitializeParamsOrBuilder>(
+ getInitializeParams(),
+ getParentForChildren(),
+ isClean());
+ initializeParams_ = null;
+ }
+ return initializeParamsBuilder_;
+ }
+
+ private boolean autoDelete_ ;
+ /**
+ *
+ * Specifies whether the disk will be auto-deleted when the instance is deleted
+ * (but not when the disk is detached from the instance).
+ *
+ *
+ * optional bool auto_delete = 8;
+ */
+ public boolean getAutoDelete() {
+ return autoDelete_;
+ }
+ /**
+ *
+ * Specifies whether the disk will be auto-deleted when the instance is deleted
+ * (but not when the disk is detached from the instance).
+ *
+ *
+ * optional bool auto_delete = 8;
+ */
+ public Builder setAutoDelete(boolean value) {
+
+ autoDelete_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies whether the disk will be auto-deleted when the instance is deleted
+ * (but not when the disk is detached from the instance).
+ *
+ *
+ * optional bool auto_delete = 8;
+ */
+ public Builder clearAutoDelete() {
+
+ autoDelete_ = false;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ private void ensureLicensesIsMutable() {
+ if (!((bitField0_ & 0x00000200) == 0x00000200)) {
+ licenses_ = new com.google.protobuf.LazyStringArrayList(licenses_);
+ bitField0_ |= 0x00000200;
+ }
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getLicensesList() {
+ return licenses_.getUnmodifiableView();
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public int getLicensesCount() {
+ return licenses_.size();
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public java.lang.String getLicenses(int index) {
+ return licenses_.get(index);
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public com.google.protobuf.ByteString
+ getLicensesBytes(int index) {
+ return licenses_.getByteString(index);
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public Builder setLicenses(
+ int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLicensesIsMutable();
+ licenses_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public Builder addLicenses(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLicensesIsMutable();
+ licenses_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public Builder addAllLicenses(
+ java.lang.Iterable
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public Builder clearLicenses() {
+ licenses_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000200);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ public Builder addLicensesBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureLicensesIsMutable();
+ licenses_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private int interface_ = 0;
+ /**
+ *
+ * Specifies the disk interface to use for attaching this disk, which is
+ * either <code>SCSI</code> or <code>NVME</code>. The default is
+ * <code>SCSI</code>. Persistent disks must always use SCSI and the request
+ * will fail if you attempt to attach a persistent disk in any other format
+ * than SCSI. Local SSDs can use either NVME or SCSI. For performance
+ * characteristics of SCSI over NVMe, see
+ * <a href="/compute/docs/disks#localssds">Local SSD performance</a>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskInterface interface = 10;
+ */
+ public int getInterfaceValue() {
+ return interface_;
+ }
+ /**
+ *
+ * Specifies the disk interface to use for attaching this disk, which is
+ * either <code>SCSI</code> or <code>NVME</code>. The default is
+ * <code>SCSI</code>. Persistent disks must always use SCSI and the request
+ * will fail if you attempt to attach a persistent disk in any other format
+ * than SCSI. Local SSDs can use either NVME or SCSI. For performance
+ * characteristics of SCSI over NVMe, see
+ * <a href="/compute/docs/disks#localssds">Local SSD performance</a>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskInterface interface = 10;
+ */
+ public Builder setInterfaceValue(int value) {
+ interface_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the disk interface to use for attaching this disk, which is
+ * either <code>SCSI</code> or <code>NVME</code>. The default is
+ * <code>SCSI</code>. Persistent disks must always use SCSI and the request
+ * will fail if you attempt to attach a persistent disk in any other format
+ * than SCSI. Local SSDs can use either NVME or SCSI. For performance
+ * characteristics of SCSI over NVMe, see
+ * <a href="/compute/docs/disks#localssds">Local SSD performance</a>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskInterface interface = 10;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.DiskInterface getInterface() {
+ com.google.cloud.compute.v1.AttachedDisk.DiskInterface result = com.google.cloud.compute.v1.AttachedDisk.DiskInterface.valueOf(interface_);
+ return result == null ? com.google.cloud.compute.v1.AttachedDisk.DiskInterface.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * Specifies the disk interface to use for attaching this disk, which is
+ * either <code>SCSI</code> or <code>NVME</code>. The default is
+ * <code>SCSI</code>. Persistent disks must always use SCSI and the request
+ * will fail if you attempt to attach a persistent disk in any other format
+ * than SCSI. Local SSDs can use either NVME or SCSI. For performance
+ * characteristics of SCSI over NVMe, see
+ * <a href="/compute/docs/disks#localssds">Local SSD performance</a>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskInterface interface = 10;
+ */
+ public Builder setInterface(com.google.cloud.compute.v1.AttachedDisk.DiskInterface value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ interface_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies the disk interface to use for attaching this disk, which is
+ * either <code>SCSI</code> or <code>NVME</code>. The default is
+ * <code>SCSI</code>. Persistent disks must always use SCSI and the request
+ * will fail if you attempt to attach a persistent disk in any other format
+ * than SCSI. Local SSDs can use either NVME or SCSI. For performance
+ * characteristics of SCSI over NVMe, see
+ * <a href="/compute/docs/disks#localssds">Local SSD performance</a>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskInterface interface = 10;
+ */
+ public Builder clearInterface() {
+
+ interface_ = 0;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.AttachedDisk)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.AttachedDisk)
+ private static final com.google.cloud.compute.v1.AttachedDisk DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.AttachedDisk();
+ }
+
+ public static com.google.cloud.compute.v1.AttachedDisk getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * [Output Only] Type of the resource. Always
+ * <code>compute#attachedDisk</code> for attached disks.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ java.lang.String getKind();
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#attachedDisk</code> for attached disks.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ com.google.protobuf.ByteString
+ getKindBytes();
+
+ /**
+ *
+ * Specifies the type of the disk, either <code>SCRATCH</code> or
+ * <code>PERSISTENT</code>. If not specified, the default is
+ * <code>PERSISTENT</code>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskType type = 1;
+ */
+ int getTypeValue();
+ /**
+ *
+ * Specifies the type of the disk, either <code>SCRATCH</code> or
+ * <code>PERSISTENT</code>. If not specified, the default is
+ * <code>PERSISTENT</code>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskType type = 1;
+ */
+ com.google.cloud.compute.v1.AttachedDisk.DiskType getType();
+
+ /**
+ *
+ * The mode in which to attach this disk, either <code>READ_WRITE</code> or
+ * <code>READ_ONLY</code>. If not specified, the default is to attach the disk
+ * in <code>READ_WRITE</code> mode.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskMode mode = 2;
+ */
+ int getModeValue();
+ /**
+ *
+ * The mode in which to attach this disk, either <code>READ_WRITE</code> or
+ * <code>READ_ONLY</code>. If not specified, the default is to attach the disk
+ * in <code>READ_WRITE</code> mode.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskMode mode = 2;
+ */
+ com.google.cloud.compute.v1.AttachedDisk.DiskMode getMode();
+
+ /**
+ *
+ * Specifies a valid partial or full URL to an existing Persistent Disk
+ * resource. When creating a new instance, one of
+ * <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * If desired, you can also attach existing non-root persistent disks using
+ * this property. This field is only applicable for persistent disks.
+ * Note that for InstanceTemplate, specify the disk name, not the URL for the
+ * disk.
+ *
+ *
+ * optional string source = 3;
+ */
+ java.lang.String getSource();
+ /**
+ *
+ * Specifies a valid partial or full URL to an existing Persistent Disk
+ * resource. When creating a new instance, one of
+ * <code>initializeParams.sourceImage</code> or
+ * <code>disks.source</code> is required.
+ * If desired, you can also attach existing non-root persistent disks using
+ * this property. This field is only applicable for persistent disks.
+ * Note that for InstanceTemplate, specify the disk name, not the URL for the
+ * disk.
+ *
+ *
+ * optional string source = 3;
+ */
+ com.google.protobuf.ByteString
+ getSourceBytes();
+
+ /**
+ *
+ * Specifies a unique device name of your choice that is reflected into the
+ * <code>/dev/disk/by-id/google-*</code> tree of a Linux operating system
+ * running within the instance. This name can be used to reference the device
+ * for mounting, resizing, and so on, from within the instance.
+ * If not specified, the server chooses a default device name to apply to this
+ * disk, in the form <code>persistent-disks-x</code>, where x is a number
+ * assigned by Google Compute Engine. This field is only applicable for
+ * persistent disks.
+ *
+ *
+ * optional string device_name = 4;
+ */
+ java.lang.String getDeviceName();
+ /**
+ *
+ * Specifies a unique device name of your choice that is reflected into the
+ * <code>/dev/disk/by-id/google-*</code> tree of a Linux operating system
+ * running within the instance. This name can be used to reference the device
+ * for mounting, resizing, and so on, from within the instance.
+ * If not specified, the server chooses a default device name to apply to this
+ * disk, in the form <code>persistent-disks-x</code>, where x is a number
+ * assigned by Google Compute Engine. This field is only applicable for
+ * persistent disks.
+ *
+ *
+ * optional string device_name = 4;
+ */
+ com.google.protobuf.ByteString
+ getDeviceNameBytes();
+
+ /**
+ *
+ * Assigns a zero-based index to this disk, where 0 is reserved for the boot
+ * disk. For example, if you have many disks attached to an instance, each
+ * disk would have a unique index number. If not specified, the server will
+ * choose an appropriate value.
+ *
+ *
+ * optional int32 index = 5;
+ */
+ int getIndex();
+
+ /**
+ *
+ * Indicates that this is a boot disk. The virtual machine will use the first
+ * partition of the disk for its root filesystem.
+ *
+ *
+ * optional bool boot = 6;
+ */
+ boolean getBoot();
+
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ boolean hasInitializeParams();
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParams getInitializeParams();
+ /**
+ *
+ * [Input Only] Specifies the parameters for a new disk that will be created
+ * alongside the new instance. Use initialization parameters to create boot
+ * disks or local SSDs attached to the new instance.
+ * This property is mutually exclusive with the <code>source</code> property;
+ * you can only define one or the other, but not both.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.InitializeParams initialize_params = 7;
+ */
+ com.google.cloud.compute.v1.AttachedDisk.InitializeParamsOrBuilder getInitializeParamsOrBuilder();
+
+ /**
+ *
+ * Specifies whether the disk will be auto-deleted when the instance is deleted
+ * (but not when the disk is detached from the instance).
+ *
+ *
+ * optional bool auto_delete = 8;
+ */
+ boolean getAutoDelete();
+
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ java.util.List
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ int getLicensesCount();
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ java.lang.String getLicenses(int index);
+ /**
+ *
+ * [Output Only] Any valid publicly visible licenses.
+ *
+ *
+ * repeated string licenses = 9;
+ */
+ com.google.protobuf.ByteString
+ getLicensesBytes(int index);
+
+ /**
+ *
+ * Specifies the disk interface to use for attaching this disk, which is
+ * either <code>SCSI</code> or <code>NVME</code>. The default is
+ * <code>SCSI</code>. Persistent disks must always use SCSI and the request
+ * will fail if you attempt to attach a persistent disk in any other format
+ * than SCSI. Local SSDs can use either NVME or SCSI. For performance
+ * characteristics of SCSI over NVMe, see
+ * <a href="/compute/docs/disks#localssds">Local SSD performance</a>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskInterface interface = 10;
+ */
+ int getInterfaceValue();
+ /**
+ *
+ * Specifies the disk interface to use for attaching this disk, which is
+ * either <code>SCSI</code> or <code>NVME</code>. The default is
+ * <code>SCSI</code>. Persistent disks must always use SCSI and the request
+ * will fail if you attempt to attach a persistent disk in any other format
+ * than SCSI. Local SSDs can use either NVME or SCSI. For performance
+ * characteristics of SCSI over NVMe, see
+ * <a href="/compute/docs/disks#localssds">Local SSD performance</a>.
+ *
+ *
+ * optional .google.compute.v1.AttachedDisk.DiskInterface interface = 10;
+ */
+ com.google.cloud.compute.v1.AttachedDisk.DiskInterface getInterface();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ComputeInstances.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ComputeInstances.java
new file mode 100644
index 000000000..5fcf2113b
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ComputeInstances.java
@@ -0,0 +1,352 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+public final class ComputeInstances {
+ private ComputeInstances() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_AccessConfig_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_AccessConfig_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_NetworkInterface_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_NetworkInterface_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_AttachedDisk_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_AttachedDisk_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_AttachedDisk_InitializeParams_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_AttachedDisk_InitializeParams_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_Scheduling_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_Scheduling_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_ServiceAccount_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_ServiceAccount_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_Tags_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_Tags_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_Instance_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_Instance_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_InstancesScopedList_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_InstancesScopedList_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_InstancesListRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_InstancesListRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_InstanceList_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_InstanceList_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_InstancesAggregatedListRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_InstancesAggregatedListRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_InstanceAggregatedList_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_InstanceAggregatedList_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_InstanceAggregatedList_ItemsEntry_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_InstanceAggregatedList_ItemsEntry_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_InstancesGetRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_InstancesGetRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_InstancesInsertRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_InstancesInsertRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_InstancesDeleteRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_InstancesDeleteRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_google_compute_v1_Operation_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_google_compute_v1_Operation_fieldAccessorTable;
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n)google/compute/v1/compute_instances.pr" +
+ "oto\022\021google.compute.v1\032\034google/api/annot" +
+ "ations.proto\"\227\001\n\014AccessConfig\022\r\n\004kind\030\350\007" +
+ " \001(\t\0228\n\004type\030\001 \001(\0162*.google.compute.v1.A" +
+ "ccessConfig.AccessType\022\014\n\004name\030\002 \001(\t\022\016\n\006" +
+ "nat_ip\030\003 \001(\t\" \n\nAccessType\022\022\n\016ONE_TO_ONE" +
+ "_NAT\020\000\"\241\001\n\020NetworkInterface\022\r\n\004kind\030\350\007 \001" +
+ "(\t\022\017\n\007network\030\001 \001(\t\022\022\n\nsubnetwork\030\005 \001(\t\022" +
+ "\022\n\nnetwork_ip\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\0227\n\016acc" +
+ "ess_configs\030\004 \003(\0132\037.google.compute.v1.Ac",
+ "cessConfig\"\344\004\n\014AttachedDisk\022\r\n\004kind\030\350\007 \001" +
+ "(\t\0226\n\004type\030\001 \001(\0162(.google.compute.v1.Att" +
+ "achedDisk.DiskType\0226\n\004mode\030\002 \001(\0162(.googl" +
+ "e.compute.v1.AttachedDisk.DiskMode\022\016\n\006so" +
+ "urce\030\003 \001(\t\022\023\n\013device_name\030\004 \001(\t\022\r\n\005index" +
+ "\030\005 \001(\005\022\014\n\004boot\030\006 \001(\010\022K\n\021initialize_param" +
+ "s\030\007 \001(\01320.google.compute.v1.AttachedDisk" +
+ ".InitializeParams\022\023\n\013auto_delete\030\010 \001(\010\022\020" +
+ "\n\010licenses\030\t \003(\t\022@\n\tinterface\030\n \001(\0162-.go" +
+ "ogle.compute.v1.AttachedDisk.DiskInterfa",
+ "ce\032d\n\020InitializeParams\022\021\n\tdisk_name\030\001 \001(" +
+ "\t\022\024\n\014source_image\030\002 \001(\t\022\024\n\014disk_size_gb\030" +
+ "\003 \001(\003\022\021\n\tdisk_type\030\005 \001(\t\"\'\n\010DiskType\022\013\n\007" +
+ "SCRATCH\020\000\022\016\n\nPERSISTENT\020\001\")\n\010DiskMode\022\016\n" +
+ "\nREAD_WRITE\020\000\022\r\n\tREAD_ONLY\020\001\"#\n\rDiskInte" +
+ "rface\022\010\n\004SCSI\020\000\022\010\n\004NVME\020\001\"\274\001\n\nScheduling" +
+ "\022L\n\023on_host_maintenance\030\001 \001(\0162/.google.c" +
+ "ompute.v1.Scheduling.OnHostMaintenance\022\031" +
+ "\n\021automatic_restart\030\002 \001(\010\022\023\n\013preemptible" +
+ "\030\003 \001(\010\"0\n\021OnHostMaintenance\022\r\n\tTERMINATE",
+ "\020\000\022\014\n\007MIGRATE\020\350\007\"/\n\016ServiceAccount\022\r\n\005em" +
+ "ail\030\001 \001(\t\022\016\n\006scopes\030\002 \003(\t\"*\n\004Tags\022\r\n\005ite" +
+ "ms\030\001 \003(\t\022\023\n\013fingerprint\030\002 \001(\014\"\273\005\n\010Instan" +
+ "ce\022\r\n\004kind\030\350\007 \001(\t\022\n\n\002id\030\001 \001(\006\022\032\n\022creatio" +
+ "n_timestamp\030\002 \001(\t\022\014\n\004name\030\003 \001(\t\022\023\n\013descr" +
+ "iption\030\004 \001(\t\022%\n\004tags\030\005 \001(\0132\027.google.comp" +
+ "ute.v1.Tags\022\024\n\014machine_type\030\006 \001(\t\0222\n\006sta" +
+ "tus\030\t \001(\0162\".google.compute.v1.Instance.S" +
+ "tatus\022\026\n\016status_message\030\n \001(\t\022\014\n\004zone\030\013 " +
+ "\001(\t\022\026\n\016can_ip_forward\030\014 \001(\010\022?\n\022network_i",
+ "nterfaces\030\r \003(\0132#.google.compute.v1.Netw" +
+ "orkInterface\022.\n\005disks\030\016 \003(\0132\037.google.com" +
+ "pute.v1.AttachedDisk\022;\n\020service_accounts" +
+ "\030\020 \003(\0132!.google.compute.v1.ServiceAccoun" +
+ "t\022\021\n\tself_link\030\021 \001(\t\0221\n\nscheduling\030\022 \001(\013" +
+ "2\035.google.compute.v1.Scheduling\022\024\n\014cpu_p" +
+ "latform\030\023 \001(\t\"\233\001\n\006Status\022\033\n\027UNKNOWN_INST" +
+ "ANCE_STATUS\020\000\022\020\n\014PROVISIONING\020\001\022\013\n\007STAGI" +
+ "NG\020\002\022\013\n\007RUNNING\020\003\022\014\n\010STOPPING\020\004\022\013\n\007STOPP" +
+ "ED\020\005\022\016\n\nTERMINATED\020\006\022\016\n\nSUSPENDING\020\007\022\r\n\t",
+ "SUSPENDED\020\010\"E\n\023InstancesScopedList\022.\n\tin" +
+ "stances\030\002 \003(\0132\033.google.compute.v1.Instan" +
+ "ce\"\200\001\n\024InstancesListRequest\022\023\n\013max_resul" +
+ "ts\030\004 \001(\r\022\022\n\npage_token\030\005 \001(\t\022\016\n\006filter\030\006" +
+ " \001(\t\022\020\n\010order_by\030\016 \001(\t\022\017\n\007project\030\002 \001(\t\022" +
+ "\014\n\004zone\030\003 \001(\t\"\201\001\n\014InstanceList\022\r\n\004kind\030\350" +
+ "\007 \001(\t\022\n\n\002id\030\003 \001(\t\022*\n\005items\030\004 \003(\0132\033.googl" +
+ "e.compute.v1.Instance\022\027\n\017next_page_token" +
+ "\030\005 \001(\t\022\021\n\tself_link\030\006 \001(\t\"|\n\036InstancesAg" +
+ "gregatedListRequest\022\023\n\013max_results\030\004 \001(\r",
+ "\022\022\n\npage_token\030\005 \001(\t\022\016\n\006filter\030\006 \001(\t\022\020\n\010" +
+ "order_by\030\016 \001(\t\022\017\n\007project\030\002 \001(\t\"\372\001\n\026Inst" +
+ "anceAggregatedList\022\r\n\004kind\030\350\007 \001(\t\022\n\n\002id\030" +
+ "\003 \001(\t\022C\n\005items\030\004 \003(\01324.google.compute.v1" +
+ ".InstanceAggregatedList.ItemsEntry\022\027\n\017ne" +
+ "xt_page_token\030\005 \001(\t\022\021\n\tself_link\030\006 \001(\t\032T" +
+ "\n\nItemsEntry\022\013\n\003key\030\001 \001(\t\0225\n\005value\030\002 \001(\013" +
+ "2&.google.compute.v1.InstancesScopedList" +
+ ":\0028\001\"F\n\023InstancesGetRequest\022\017\n\007project\030\002" +
+ " \001(\t\022\014\n\004zone\030\003 \001(\t\022\020\n\010instance\030\004 \001(\t\"f\n\026",
+ "InstancesInsertRequest\022\017\n\007project\030\002 \001(\t\022" +
+ "\014\n\004zone\030\003 \001(\t\022-\n\010resource\030\004 \001(\0132\033.google" +
+ ".compute.v1.Instance\"I\n\026InstancesDeleteR" +
+ "equest\022\017\n\007project\030\002 \001(\t\022\014\n\004zone\030\003 \001(\t\022\020\n" +
+ "\010instance\030\004 \001(\t\"\326\003\n\tOperation\022\r\n\004kind\030\350\007" +
+ " \001(\t\022\n\n\002id\030\001 \001(\006\022\032\n\022creation_timestamp\030\002" +
+ " \001(\t\022\014\n\004name\030\003 \001(\t\022\014\n\004zone\030\004 \001(\t\022\033\n\023clie" +
+ "nt_operation_id\030\005 \001(\t\022\026\n\016operation_type\030" +
+ "\006 \001(\t\022\023\n\013target_link\030\007 \001(\t\022\021\n\ttarget_id\030" +
+ "\010 \001(\006\0222\n\006status\030\t \001(\0162\".google.compute.v",
+ "1.OperationStatus\022\026\n\016status_message\030\n \001(" +
+ "\t\022\014\n\004user\030\013 \001(\t\022\020\n\010progress\030\014 \001(\005\022\023\n\013ins" +
+ "ert_time\030\r \001(\t\022\022\n\nstart_time\030\016 \001(\t\022\020\n\010en" +
+ "d_time\030\017 \001(\t\022\036\n\026http_error_status_code\030\022" +
+ " \001(\005\022\032\n\022http_error_message\030\023 \001(\t\022\021\n\tself" +
+ "_link\030\024 \001(\t\022\016\n\006region\030\025 \001(\t\022\023\n\013descripti" +
+ "on\030\026 \001(\t*S\n\017OperationStatus\022\034\n\030UNKNOWN_O" +
+ "PERATION_STATUS\020\000\022\013\n\007PENDING\020\001\022\013\n\007RUNNIN" +
+ "G\020\002\022\010\n\004DONE\020\0032\314\004\n\020InstancesService\022\207\001\n\rL" +
+ "istInstances\022\'.google.compute.v1.Instanc",
+ "esListRequest\032\037.google.compute.v1.Instan" +
+ "ceList\",\202\323\344\223\002&\022$/v1/{project}/zones/{zon" +
+ "e}/instances\022\213\001\n\013GetInstance\022&.google.co" +
+ "mpute.v1.InstancesGetRequest\032\033.google.co" +
+ "mpute.v1.Instance\"7\202\323\344\223\0021\022//v1/{project}" +
+ "/zones/{zone}/instances/{instance}\022\212\001\n\016I" +
+ "nsertInstance\022).google.compute.v1.Instan" +
+ "cesInsertRequest\032\034.google.compute.v1.Ope" +
+ "ration\"/\202\323\344\223\002)\"$/v1/{project}/zones/{zon" +
+ "e}/instances:\001*\022\222\001\n\016DeleteInstance\022).goo",
+ "gle.compute.v1.InstancesDeleteRequest\032\034." +
+ "google.compute.v1.Operation\"7\202\323\344\223\0021*//v1" +
+ "/{project}/zones/{zone}/instances/{insta" +
+ "nce}B\037\n\033com.google.cloud.compute.v1P\001b\006p" +
+ "roto3"
+ };
+ com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+ new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
+ public com.google.protobuf.ExtensionRegistry assignDescriptors(
+ com.google.protobuf.Descriptors.FileDescriptor root) {
+ descriptor = root;
+ return null;
+ }
+ };
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.api.AnnotationsProto.getDescriptor(),
+ }, assigner);
+ internal_static_google_compute_v1_AccessConfig_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_google_compute_v1_AccessConfig_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_AccessConfig_descriptor,
+ new java.lang.String[] { "Kind", "Type", "Name", "NatIp", });
+ internal_static_google_compute_v1_NetworkInterface_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_google_compute_v1_NetworkInterface_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_NetworkInterface_descriptor,
+ new java.lang.String[] { "Kind", "Network", "Subnetwork", "NetworkIp", "Name", "AccessConfigs", });
+ internal_static_google_compute_v1_AttachedDisk_descriptor =
+ getDescriptor().getMessageTypes().get(2);
+ internal_static_google_compute_v1_AttachedDisk_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_AttachedDisk_descriptor,
+ new java.lang.String[] { "Kind", "Type", "Mode", "Source", "DeviceName", "Index", "Boot", "InitializeParams", "AutoDelete", "Licenses", "Interface", });
+ internal_static_google_compute_v1_AttachedDisk_InitializeParams_descriptor =
+ internal_static_google_compute_v1_AttachedDisk_descriptor.getNestedTypes().get(0);
+ internal_static_google_compute_v1_AttachedDisk_InitializeParams_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_AttachedDisk_InitializeParams_descriptor,
+ new java.lang.String[] { "DiskName", "SourceImage", "DiskSizeGb", "DiskType", });
+ internal_static_google_compute_v1_Scheduling_descriptor =
+ getDescriptor().getMessageTypes().get(3);
+ internal_static_google_compute_v1_Scheduling_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_Scheduling_descriptor,
+ new java.lang.String[] { "OnHostMaintenance", "AutomaticRestart", "Preemptible", });
+ internal_static_google_compute_v1_ServiceAccount_descriptor =
+ getDescriptor().getMessageTypes().get(4);
+ internal_static_google_compute_v1_ServiceAccount_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_ServiceAccount_descriptor,
+ new java.lang.String[] { "Email", "Scopes", });
+ internal_static_google_compute_v1_Tags_descriptor =
+ getDescriptor().getMessageTypes().get(5);
+ internal_static_google_compute_v1_Tags_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_Tags_descriptor,
+ new java.lang.String[] { "Items", "Fingerprint", });
+ internal_static_google_compute_v1_Instance_descriptor =
+ getDescriptor().getMessageTypes().get(6);
+ internal_static_google_compute_v1_Instance_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_Instance_descriptor,
+ new java.lang.String[] { "Kind", "Id", "CreationTimestamp", "Name", "Description", "Tags", "MachineType", "Status", "StatusMessage", "Zone", "CanIpForward", "NetworkInterfaces", "Disks", "ServiceAccounts", "SelfLink", "Scheduling", "CpuPlatform", });
+ internal_static_google_compute_v1_InstancesScopedList_descriptor =
+ getDescriptor().getMessageTypes().get(7);
+ internal_static_google_compute_v1_InstancesScopedList_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_InstancesScopedList_descriptor,
+ new java.lang.String[] { "Instances", });
+ internal_static_google_compute_v1_InstancesListRequest_descriptor =
+ getDescriptor().getMessageTypes().get(8);
+ internal_static_google_compute_v1_InstancesListRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_InstancesListRequest_descriptor,
+ new java.lang.String[] { "MaxResults", "PageToken", "Filter", "OrderBy", "Project", "Zone", });
+ internal_static_google_compute_v1_InstanceList_descriptor =
+ getDescriptor().getMessageTypes().get(9);
+ internal_static_google_compute_v1_InstanceList_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_InstanceList_descriptor,
+ new java.lang.String[] { "Kind", "Id", "Items", "NextPageToken", "SelfLink", });
+ internal_static_google_compute_v1_InstancesAggregatedListRequest_descriptor =
+ getDescriptor().getMessageTypes().get(10);
+ internal_static_google_compute_v1_InstancesAggregatedListRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_InstancesAggregatedListRequest_descriptor,
+ new java.lang.String[] { "MaxResults", "PageToken", "Filter", "OrderBy", "Project", });
+ internal_static_google_compute_v1_InstanceAggregatedList_descriptor =
+ getDescriptor().getMessageTypes().get(11);
+ internal_static_google_compute_v1_InstanceAggregatedList_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_InstanceAggregatedList_descriptor,
+ new java.lang.String[] { "Kind", "Id", "Items", "NextPageToken", "SelfLink", });
+ internal_static_google_compute_v1_InstanceAggregatedList_ItemsEntry_descriptor =
+ internal_static_google_compute_v1_InstanceAggregatedList_descriptor.getNestedTypes().get(0);
+ internal_static_google_compute_v1_InstanceAggregatedList_ItemsEntry_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_InstanceAggregatedList_ItemsEntry_descriptor,
+ new java.lang.String[] { "Key", "Value", });
+ internal_static_google_compute_v1_InstancesGetRequest_descriptor =
+ getDescriptor().getMessageTypes().get(12);
+ internal_static_google_compute_v1_InstancesGetRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_InstancesGetRequest_descriptor,
+ new java.lang.String[] { "Project", "Zone", "Instance", });
+ internal_static_google_compute_v1_InstancesInsertRequest_descriptor =
+ getDescriptor().getMessageTypes().get(13);
+ internal_static_google_compute_v1_InstancesInsertRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_InstancesInsertRequest_descriptor,
+ new java.lang.String[] { "Project", "Zone", "Resource", });
+ internal_static_google_compute_v1_InstancesDeleteRequest_descriptor =
+ getDescriptor().getMessageTypes().get(14);
+ internal_static_google_compute_v1_InstancesDeleteRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_InstancesDeleteRequest_descriptor,
+ new java.lang.String[] { "Project", "Zone", "Instance", });
+ internal_static_google_compute_v1_Operation_descriptor =
+ getDescriptor().getMessageTypes().get(15);
+ internal_static_google_compute_v1_Operation_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_google_compute_v1_Operation_descriptor,
+ new java.lang.String[] { "Kind", "Id", "CreationTimestamp", "Name", "Zone", "ClientOperationId", "OperationType", "TargetLink", "TargetId", "Status", "StatusMessage", "User", "Progress", "InsertTime", "StartTime", "EndTime", "HttpErrorStatusCode", "HttpErrorMessage", "SelfLink", "Region", "Description", });
+ com.google.protobuf.ExtensionRegistry registry =
+ com.google.protobuf.ExtensionRegistry.newInstance();
+ registry.add(com.google.api.AnnotationsProto.http);
+ com.google.protobuf.Descriptors.FileDescriptor
+ .internalUpdateFileDescriptor(descriptor, registry);
+ com.google.api.AnnotationsProto.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Instance.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Instance.java
new file mode 100644
index 000000000..511ec4259
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Instance.java
@@ -0,0 +1,4565 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ *
+ * An Instance resource.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.Instance}
+ */
+public final class Instance extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.Instance)
+ InstanceOrBuilder {
+ // Use Instance.newBuilder() to construct.
+ private Instance(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Instance() {
+ kind_ = "";
+ id_ = 0L;
+ creationTimestamp_ = "";
+ name_ = "";
+ description_ = "";
+ machineType_ = "";
+ status_ = 0;
+ statusMessage_ = "";
+ zone_ = "";
+ canIpForward_ = false;
+ networkInterfaces_ = java.util.Collections.emptyList();
+ disks_ = java.util.Collections.emptyList();
+ serviceAccounts_ = java.util.Collections.emptyList();
+ selfLink_ = "";
+ cpuPlatform_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private Instance(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 9: {
+
+ id_ = input.readFixed64();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ creationTimestamp_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 34: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ description_ = s;
+ break;
+ }
+ case 42: {
+ com.google.cloud.compute.v1.Tags.Builder subBuilder = null;
+ if (tags_ != null) {
+ subBuilder = tags_.toBuilder();
+ }
+ tags_ = input.readMessage(com.google.cloud.compute.v1.Tags.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(tags_);
+ tags_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ case 50: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ machineType_ = s;
+ break;
+ }
+ case 72: {
+ int rawValue = input.readEnum();
+
+ status_ = rawValue;
+ break;
+ }
+ case 82: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ statusMessage_ = s;
+ break;
+ }
+ case 90: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ zone_ = s;
+ break;
+ }
+ case 96: {
+
+ canIpForward_ = input.readBool();
+ break;
+ }
+ case 106: {
+ if (!((mutable_bitField0_ & 0x00000800) == 0x00000800)) {
+ networkInterfaces_ = new java.util.ArrayListUNKNOWN_INSTANCE_STATUS = 0;
+ */
+ UNKNOWN_INSTANCE_STATUS(0),
+ /**
+ *
+ * Resources are being allocated for the instance.
+ *
+ *
+ * PROVISIONING = 1;
+ */
+ PROVISIONING(1),
+ /**
+ *
+ * All required resources have been allocated and the instance
+ * is being started.
+ *
+ *
+ * STAGING = 2;
+ */
+ STAGING(2),
+ /**
+ *
+ * The instance is running.
+ *
+ *
+ * RUNNING = 3;
+ */
+ RUNNING(3),
+ /**
+ *
+ * The instance is currently stopping (either being deleted or killed).
+ *
+ *
+ * STOPPING = 4;
+ */
+ STOPPING(4),
+ /**
+ *
+ * The instance has stopped successfully.
+ *
+ *
+ * STOPPED = 5;
+ */
+ STOPPED(5),
+ /**
+ *
+ * The instance has failed in some way.
+ *
+ *
+ * TERMINATED = 6;
+ */
+ TERMINATED(6),
+ /**
+ *
+ * The instance is suspending.
+ *
+ *
+ * SUSPENDING = 7;
+ */
+ SUSPENDING(7),
+ /**
+ *
+ * The instance has suspended.
+ *
+ *
+ * SUSPENDED = 8;
+ */
+ SUSPENDED(8),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ * UNKNOWN_INSTANCE_STATUS = 0;
+ */
+ public static final int UNKNOWN_INSTANCE_STATUS_VALUE = 0;
+ /**
+ *
+ * Resources are being allocated for the instance.
+ *
+ *
+ * PROVISIONING = 1;
+ */
+ public static final int PROVISIONING_VALUE = 1;
+ /**
+ *
+ * All required resources have been allocated and the instance
+ * is being started.
+ *
+ *
+ * STAGING = 2;
+ */
+ public static final int STAGING_VALUE = 2;
+ /**
+ *
+ * The instance is running.
+ *
+ *
+ * RUNNING = 3;
+ */
+ public static final int RUNNING_VALUE = 3;
+ /**
+ *
+ * The instance is currently stopping (either being deleted or killed).
+ *
+ *
+ * STOPPING = 4;
+ */
+ public static final int STOPPING_VALUE = 4;
+ /**
+ *
+ * The instance has stopped successfully.
+ *
+ *
+ * STOPPED = 5;
+ */
+ public static final int STOPPED_VALUE = 5;
+ /**
+ *
+ * The instance has failed in some way.
+ *
+ *
+ * TERMINATED = 6;
+ */
+ public static final int TERMINATED_VALUE = 6;
+ /**
+ *
+ * The instance is suspending.
+ *
+ *
+ * SUSPENDING = 7;
+ */
+ public static final int SUSPENDING_VALUE = 7;
+ /**
+ *
+ * The instance has suspended.
+ *
+ *
+ * SUSPENDED = 8;
+ */
+ public static final int SUSPENDED_VALUE = 8;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static Status valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static Status forNumber(int value) {
+ switch (value) {
+ case 0: return UNKNOWN_INSTANCE_STATUS;
+ case 1: return PROVISIONING;
+ case 2: return STAGING;
+ case 3: return RUNNING;
+ case 4: return STOPPING;
+ case 5: return STOPPED;
+ case 6: return TERMINATED;
+ case 7: return SUSPENDING;
+ case 8: return SUSPENDED;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instance</code> for instances.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instance</code> for instances.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ID_FIELD_NUMBER = 1;
+ private long id_;
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional fixed64 id = 1;
+ */
+ public long getId() {
+ return id_;
+ }
+
+ public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 2;
+ private volatile java.lang.Object creationTimestamp_;
+ /**
+ *
+ * [Output Only] Creation timestamp in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> text format.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public java.lang.String getCreationTimestamp() {
+ java.lang.Object ref = creationTimestamp_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ creationTimestamp_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Creation timestamp in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> text format.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public com.google.protobuf.ByteString
+ getCreationTimestampBytes() {
+ java.lang.Object ref = creationTimestamp_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ creationTimestamp_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int NAME_FIELD_NUMBER = 3;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ * The name of the resource, provided by the client when initially creating
+ * the resource. The resource name must be 1-63 characters long, and comply
+ * with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
+ * Specifically, the name must be 1-63 characters long and match the regular
+ * expression <code>[a-z]([-a-z0-9]*[a-z0-9])?</code> which means the first
+ * character must be a lowercase letter, and all following characters must be
+ * a dash, lowercase letter, or digit, except the last character, which cannot
+ * be a dash.
+ * @required compute.instances.insert
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * optional string name = 3;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The name of the resource, provided by the client when initially creating
+ * the resource. The resource name must be 1-63 characters long, and comply
+ * with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
+ * Specifically, the name must be 1-63 characters long and match the regular
+ * expression <code>[a-z]([-a-z0-9]*[a-z0-9])?</code> which means the first
+ * character must be a lowercase letter, and all following characters must be
+ * a dash, lowercase letter, or digit, except the last character, which cannot
+ * be a dash.
+ * @required compute.instances.insert
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * optional string name = 3;
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DESCRIPTION_FIELD_NUMBER = 4;
+ private volatile java.lang.Object description_;
+ /**
+ *
+ * An optional description of this resource. Provide this property when you
+ * create the resource.
+ *
+ *
+ * optional string description = 4;
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ description_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * An optional description of this resource. Provide this property when you
+ * create the resource.
+ *
+ *
+ * optional string description = 4;
+ */
+ public com.google.protobuf.ByteString
+ getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TAGS_FIELD_NUMBER = 5;
+ private com.google.cloud.compute.v1.Tags tags_;
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public boolean hasTags() {
+ return tags_ != null;
+ }
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public com.google.cloud.compute.v1.Tags getTags() {
+ return tags_ == null ? com.google.cloud.compute.v1.Tags.getDefaultInstance() : tags_;
+ }
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public com.google.cloud.compute.v1.TagsOrBuilder getTagsOrBuilder() {
+ return getTags();
+ }
+
+ public static final int MACHINE_TYPE_FIELD_NUMBER = 6;
+ private volatile java.lang.Object machineType_;
+ /**
+ *
+ * Full or partial URL of the machine type resource to use for this instance,
+ * in the format:
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/<var class="apiparam">machine-type</var></code>.
+ * This is provided by the client when the instance is created. For example,
+ * the following is a valid partial url to a
+ * <a href="/compute/docs/machine-types#predefined_machine_types">predefined machine type</a>:
+ * <code>zones/us-central1-f/machineTypes/n1-standard-1</code>
+ * To create a
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type">custom machine type</a>,
+ * provide a URL to a machine type in the following format, where
+ * <var class="apiparam">CPUS</var> is 1 or an even number up to 32
+ * (2, 4, 6, ... 24, etc), and <var class="apiparam">MEMORY</var> is the total
+ * memory for this instance. Memory must be a multiple of 256 MB and must
+ * be supplied in MB (e.g. 5 GB of memory is 5120 MB):
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/custom-<var class="apiparam">CPUS</var>-<var class="apiparam">MEMORY</var></code>
+ * For example: <code>zones/us-central1-f/machineTypes/custom-4-5120</code>
+ * For a full list of restrictions, read the
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type#specifications">Specifications</a>
+ * for custom machine types.
+ * @required compute.instances.insert
+ *
+ *
+ * optional string machine_type = 6;
+ */
+ public java.lang.String getMachineType() {
+ java.lang.Object ref = machineType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ machineType_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Full or partial URL of the machine type resource to use for this instance,
+ * in the format:
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/<var class="apiparam">machine-type</var></code>.
+ * This is provided by the client when the instance is created. For example,
+ * the following is a valid partial url to a
+ * <a href="/compute/docs/machine-types#predefined_machine_types">predefined machine type</a>:
+ * <code>zones/us-central1-f/machineTypes/n1-standard-1</code>
+ * To create a
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type">custom machine type</a>,
+ * provide a URL to a machine type in the following format, where
+ * <var class="apiparam">CPUS</var> is 1 or an even number up to 32
+ * (2, 4, 6, ... 24, etc), and <var class="apiparam">MEMORY</var> is the total
+ * memory for this instance. Memory must be a multiple of 256 MB and must
+ * be supplied in MB (e.g. 5 GB of memory is 5120 MB):
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/custom-<var class="apiparam">CPUS</var>-<var class="apiparam">MEMORY</var></code>
+ * For example: <code>zones/us-central1-f/machineTypes/custom-4-5120</code>
+ * For a full list of restrictions, read the
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type#specifications">Specifications</a>
+ * for custom machine types.
+ * @required compute.instances.insert
+ *
+ *
+ * optional string machine_type = 6;
+ */
+ public com.google.protobuf.ByteString
+ getMachineTypeBytes() {
+ java.lang.Object ref = machineType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ machineType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int STATUS_FIELD_NUMBER = 9;
+ private int status_;
+ /**
+ *
+ * [Output Only] The status of the instance. One of the
+ * following values: <code>PROVISIONING</code>, <code>STAGING</code>,
+ * <code>RUNNING</code>, <code>STOPPING</code>, <code>SUSPENDING</code>,
+ * <code>SUSPENDED</code>, and <code>TERMINATED</code>.
+ *
+ *
+ * optional .google.compute.v1.Instance.Status status = 9;
+ */
+ public int getStatusValue() {
+ return status_;
+ }
+ /**
+ *
+ * [Output Only] The status of the instance. One of the
+ * following values: <code>PROVISIONING</code>, <code>STAGING</code>,
+ * <code>RUNNING</code>, <code>STOPPING</code>, <code>SUSPENDING</code>,
+ * <code>SUSPENDED</code>, and <code>TERMINATED</code>.
+ *
+ *
+ * optional .google.compute.v1.Instance.Status status = 9;
+ */
+ public com.google.cloud.compute.v1.Instance.Status getStatus() {
+ com.google.cloud.compute.v1.Instance.Status result = com.google.cloud.compute.v1.Instance.Status.valueOf(status_);
+ return result == null ? com.google.cloud.compute.v1.Instance.Status.UNRECOGNIZED : result;
+ }
+
+ public static final int STATUS_MESSAGE_FIELD_NUMBER = 10;
+ private volatile java.lang.Object statusMessage_;
+ /**
+ *
+ * [Output Only] An optional, human-readable explanation of the status.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public java.lang.String getStatusMessage() {
+ java.lang.Object ref = statusMessage_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ statusMessage_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] An optional, human-readable explanation of the status.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public com.google.protobuf.ByteString
+ getStatusMessageBytes() {
+ java.lang.Object ref = statusMessage_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ statusMessage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ZONE_FIELD_NUMBER = 11;
+ private volatile java.lang.Object zone_;
+ /**
+ *
+ * [Output Only] URL of the zone where the instance resides.
+ *
+ *
+ * optional string zone = 11;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] URL of the zone where the instance resides.
+ *
+ *
+ * optional string zone = 11;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CAN_IP_FORWARD_FIELD_NUMBER = 12;
+ private boolean canIpForward_;
+ /**
+ *
+ * Allows this instance to send and receive packets with non-matching
+ * destination or source IPs. This is required if you plan to use this
+ * instance to forward routes. For more information, see
+ * <a href="/compute/docs/networking#canipforward">Enabling IP Forwarding</a>.
+ *
+ *
+ * optional bool can_ip_forward = 12;
+ */
+ public boolean getCanIpForward() {
+ return canIpForward_;
+ }
+
+ public static final int NETWORK_INTERFACES_FIELD_NUMBER = 13;
+ private java.util.List
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public java.util.List
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.NetworkInterfaceOrBuilder>
+ getNetworkInterfacesOrBuilderList() {
+ return networkInterfaces_;
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public int getNetworkInterfacesCount() {
+ return networkInterfaces_.size();
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public com.google.cloud.compute.v1.NetworkInterface getNetworkInterfaces(int index) {
+ return networkInterfaces_.get(index);
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public com.google.cloud.compute.v1.NetworkInterfaceOrBuilder getNetworkInterfacesOrBuilder(
+ int index) {
+ return networkInterfaces_.get(index);
+ }
+
+ public static final int DISKS_FIELD_NUMBER = 14;
+ private java.util.List
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public java.util.List
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.AttachedDiskOrBuilder>
+ getDisksOrBuilderList() {
+ return disks_;
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public int getDisksCount() {
+ return disks_.size();
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk getDisks(int index) {
+ return disks_.get(index);
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public com.google.cloud.compute.v1.AttachedDiskOrBuilder getDisksOrBuilder(
+ int index) {
+ return disks_.get(index);
+ }
+
+ public static final int SERVICE_ACCOUNTS_FIELD_NUMBER = 16;
+ private java.util.List
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public java.util.List
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.ServiceAccountOrBuilder>
+ getServiceAccountsOrBuilderList() {
+ return serviceAccounts_;
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public int getServiceAccountsCount() {
+ return serviceAccounts_.size();
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public com.google.cloud.compute.v1.ServiceAccount getServiceAccounts(int index) {
+ return serviceAccounts_.get(index);
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public com.google.cloud.compute.v1.ServiceAccountOrBuilder getServiceAccountsOrBuilder(
+ int index) {
+ return serviceAccounts_.get(index);
+ }
+
+ public static final int SELF_LINK_FIELD_NUMBER = 17;
+ private volatile java.lang.Object selfLink_;
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 17;
+ */
+ public java.lang.String getSelfLink() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ selfLink_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 17;
+ */
+ public com.google.protobuf.ByteString
+ getSelfLinkBytes() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ selfLink_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SCHEDULING_FIELD_NUMBER = 18;
+ private com.google.cloud.compute.v1.Scheduling scheduling_;
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public boolean hasScheduling() {
+ return scheduling_ != null;
+ }
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public com.google.cloud.compute.v1.Scheduling getScheduling() {
+ return scheduling_ == null ? com.google.cloud.compute.v1.Scheduling.getDefaultInstance() : scheduling_;
+ }
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public com.google.cloud.compute.v1.SchedulingOrBuilder getSchedulingOrBuilder() {
+ return getScheduling();
+ }
+
+ public static final int CPU_PLATFORM_FIELD_NUMBER = 19;
+ private volatile java.lang.Object cpuPlatform_;
+ /**
+ *
+ * [Output Only] The CPU platform used by this instance.
+ *
+ *
+ * optional string cpu_platform = 19;
+ */
+ public java.lang.String getCpuPlatform() {
+ java.lang.Object ref = cpuPlatform_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ cpuPlatform_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The CPU platform used by this instance.
+ *
+ *
+ * optional string cpu_platform = 19;
+ */
+ public com.google.protobuf.ByteString
+ getCpuPlatformBytes() {
+ java.lang.Object ref = cpuPlatform_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ cpuPlatform_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (id_ != 0L) {
+ output.writeFixed64(1, id_);
+ }
+ if (!getCreationTimestampBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, creationTimestamp_);
+ }
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
+ }
+ if (!getDescriptionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, description_);
+ }
+ if (tags_ != null) {
+ output.writeMessage(5, getTags());
+ }
+ if (!getMachineTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, machineType_);
+ }
+ if (status_ != com.google.cloud.compute.v1.Instance.Status.UNKNOWN_INSTANCE_STATUS.getNumber()) {
+ output.writeEnum(9, status_);
+ }
+ if (!getStatusMessageBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 10, statusMessage_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 11, zone_);
+ }
+ if (canIpForward_ != false) {
+ output.writeBool(12, canIpForward_);
+ }
+ for (int i = 0; i < networkInterfaces_.size(); i++) {
+ output.writeMessage(13, networkInterfaces_.get(i));
+ }
+ for (int i = 0; i < disks_.size(); i++) {
+ output.writeMessage(14, disks_.get(i));
+ }
+ for (int i = 0; i < serviceAccounts_.size(); i++) {
+ output.writeMessage(16, serviceAccounts_.get(i));
+ }
+ if (!getSelfLinkBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 17, selfLink_);
+ }
+ if (scheduling_ != null) {
+ output.writeMessage(18, getScheduling());
+ }
+ if (!getCpuPlatformBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 19, cpuPlatform_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1000, kind_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (id_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeFixed64Size(1, id_);
+ }
+ if (!getCreationTimestampBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, creationTimestamp_);
+ }
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
+ }
+ if (!getDescriptionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, description_);
+ }
+ if (tags_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(5, getTags());
+ }
+ if (!getMachineTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, machineType_);
+ }
+ if (status_ != com.google.cloud.compute.v1.Instance.Status.UNKNOWN_INSTANCE_STATUS.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(9, status_);
+ }
+ if (!getStatusMessageBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, statusMessage_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, zone_);
+ }
+ if (canIpForward_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(12, canIpForward_);
+ }
+ for (int i = 0; i < networkInterfaces_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(13, networkInterfaces_.get(i));
+ }
+ for (int i = 0; i < disks_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(14, disks_.get(i));
+ }
+ for (int i = 0; i < serviceAccounts_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(16, serviceAccounts_.get(i));
+ }
+ if (!getSelfLinkBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, selfLink_);
+ }
+ if (scheduling_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(18, getScheduling());
+ }
+ if (!getCpuPlatformBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, cpuPlatform_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1000, kind_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.Instance)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.Instance other = (com.google.cloud.compute.v1.Instance) obj;
+
+ boolean result = true;
+ result = result && getKind()
+ .equals(other.getKind());
+ result = result && (getId()
+ == other.getId());
+ result = result && getCreationTimestamp()
+ .equals(other.getCreationTimestamp());
+ result = result && getName()
+ .equals(other.getName());
+ result = result && getDescription()
+ .equals(other.getDescription());
+ result = result && (hasTags() == other.hasTags());
+ if (hasTags()) {
+ result = result && getTags()
+ .equals(other.getTags());
+ }
+ result = result && getMachineType()
+ .equals(other.getMachineType());
+ result = result && status_ == other.status_;
+ result = result && getStatusMessage()
+ .equals(other.getStatusMessage());
+ result = result && getZone()
+ .equals(other.getZone());
+ result = result && (getCanIpForward()
+ == other.getCanIpForward());
+ result = result && getNetworkInterfacesList()
+ .equals(other.getNetworkInterfacesList());
+ result = result && getDisksList()
+ .equals(other.getDisksList());
+ result = result && getServiceAccountsList()
+ .equals(other.getServiceAccountsList());
+ result = result && getSelfLink()
+ .equals(other.getSelfLink());
+ result = result && (hasScheduling() == other.hasScheduling());
+ if (hasScheduling()) {
+ result = result && getScheduling()
+ .equals(other.getScheduling());
+ }
+ result = result && getCpuPlatform()
+ .equals(other.getCpuPlatform());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + KIND_FIELD_NUMBER;
+ hash = (53 * hash) + getKind().hashCode();
+ hash = (37 * hash) + ID_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getId());
+ hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + getCreationTimestamp().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
+ hash = (53 * hash) + getDescription().hashCode();
+ if (hasTags()) {
+ hash = (37 * hash) + TAGS_FIELD_NUMBER;
+ hash = (53 * hash) + getTags().hashCode();
+ }
+ hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getMachineType().hashCode();
+ hash = (37 * hash) + STATUS_FIELD_NUMBER;
+ hash = (53 * hash) + status_;
+ hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getStatusMessage().hashCode();
+ hash = (37 * hash) + ZONE_FIELD_NUMBER;
+ hash = (53 * hash) + getZone().hashCode();
+ hash = (37 * hash) + CAN_IP_FORWARD_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getCanIpForward());
+ if (getNetworkInterfacesCount() > 0) {
+ hash = (37 * hash) + NETWORK_INTERFACES_FIELD_NUMBER;
+ hash = (53 * hash) + getNetworkInterfacesList().hashCode();
+ }
+ if (getDisksCount() > 0) {
+ hash = (37 * hash) + DISKS_FIELD_NUMBER;
+ hash = (53 * hash) + getDisksList().hashCode();
+ }
+ if (getServiceAccountsCount() > 0) {
+ hash = (37 * hash) + SERVICE_ACCOUNTS_FIELD_NUMBER;
+ hash = (53 * hash) + getServiceAccountsList().hashCode();
+ }
+ hash = (37 * hash) + SELF_LINK_FIELD_NUMBER;
+ hash = (53 * hash) + getSelfLink().hashCode();
+ if (hasScheduling()) {
+ hash = (37 * hash) + SCHEDULING_FIELD_NUMBER;
+ hash = (53 * hash) + getScheduling().hashCode();
+ }
+ hash = (37 * hash) + CPU_PLATFORM_FIELD_NUMBER;
+ hash = (53 * hash) + getCpuPlatform().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.Instance parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.Instance parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Instance parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.Instance parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Instance parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Instance parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Instance parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Instance parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Instance parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Instance parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.Instance prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * An Instance resource.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.Instance}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instance</code> for instances.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instance</code> for instances.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instance</code> for instances.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKind(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instance</code> for instances.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder clearKind() {
+
+ kind_ = getDefaultInstance().getKind();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instance</code> for instances.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKindBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long id_ ;
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional fixed64 id = 1;
+ */
+ public long getId() {
+ return id_;
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional fixed64 id = 1;
+ */
+ public Builder setId(long value) {
+
+ id_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional fixed64 id = 1;
+ */
+ public Builder clearId() {
+
+ id_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object creationTimestamp_ = "";
+ /**
+ *
+ * [Output Only] Creation timestamp in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> text format.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public java.lang.String getCreationTimestamp() {
+ java.lang.Object ref = creationTimestamp_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ creationTimestamp_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Creation timestamp in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> text format.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public com.google.protobuf.ByteString
+ getCreationTimestampBytes() {
+ java.lang.Object ref = creationTimestamp_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ creationTimestamp_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Creation timestamp in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> text format.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public Builder setCreationTimestamp(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ creationTimestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Creation timestamp in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> text format.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public Builder clearCreationTimestamp() {
+
+ creationTimestamp_ = getDefaultInstance().getCreationTimestamp();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Creation timestamp in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> text format.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public Builder setCreationTimestampBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ creationTimestamp_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object name_ = "";
+ /**
+ *
+ * The name of the resource, provided by the client when initially creating
+ * the resource. The resource name must be 1-63 characters long, and comply
+ * with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
+ * Specifically, the name must be 1-63 characters long and match the regular
+ * expression <code>[a-z]([-a-z0-9]*[a-z0-9])?</code> which means the first
+ * character must be a lowercase letter, and all following characters must be
+ * a dash, lowercase letter, or digit, except the last character, which cannot
+ * be a dash.
+ * @required compute.instances.insert
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * optional string name = 3;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The name of the resource, provided by the client when initially creating
+ * the resource. The resource name must be 1-63 characters long, and comply
+ * with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
+ * Specifically, the name must be 1-63 characters long and match the regular
+ * expression <code>[a-z]([-a-z0-9]*[a-z0-9])?</code> which means the first
+ * character must be a lowercase letter, and all following characters must be
+ * a dash, lowercase letter, or digit, except the last character, which cannot
+ * be a dash.
+ * @required compute.instances.insert
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * optional string name = 3;
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The name of the resource, provided by the client when initially creating
+ * the resource. The resource name must be 1-63 characters long, and comply
+ * with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
+ * Specifically, the name must be 1-63 characters long and match the regular
+ * expression <code>[a-z]([-a-z0-9]*[a-z0-9])?</code> which means the first
+ * character must be a lowercase letter, and all following characters must be
+ * a dash, lowercase letter, or digit, except the last character, which cannot
+ * be a dash.
+ * @required compute.instances.insert
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * optional string name = 3;
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the resource, provided by the client when initially creating
+ * the resource. The resource name must be 1-63 characters long, and comply
+ * with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
+ * Specifically, the name must be 1-63 characters long and match the regular
+ * expression <code>[a-z]([-a-z0-9]*[a-z0-9])?</code> which means the first
+ * character must be a lowercase letter, and all following characters must be
+ * a dash, lowercase letter, or digit, except the last character, which cannot
+ * be a dash.
+ * @required compute.instances.insert
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * optional string name = 3;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the resource, provided by the client when initially creating
+ * the resource. The resource name must be 1-63 characters long, and comply
+ * with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
+ * Specifically, the name must be 1-63 characters long and match the regular
+ * expression <code>[a-z]([-a-z0-9]*[a-z0-9])?</code> which means the first
+ * character must be a lowercase letter, and all following characters must be
+ * a dash, lowercase letter, or digit, except the last character, which cannot
+ * be a dash.
+ * @required compute.instances.insert
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * optional string name = 3;
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object description_ = "";
+ /**
+ *
+ * An optional description of this resource. Provide this property when you
+ * create the resource.
+ *
+ *
+ * optional string description = 4;
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ description_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * An optional description of this resource. Provide this property when you
+ * create the resource.
+ *
+ *
+ * optional string description = 4;
+ */
+ public com.google.protobuf.ByteString
+ getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * An optional description of this resource. Provide this property when you
+ * create the resource.
+ *
+ *
+ * optional string description = 4;
+ */
+ public Builder setDescription(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ description_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * An optional description of this resource. Provide this property when you
+ * create the resource.
+ *
+ *
+ * optional string description = 4;
+ */
+ public Builder clearDescription() {
+
+ description_ = getDefaultInstance().getDescription();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * An optional description of this resource. Provide this property when you
+ * create the resource.
+ *
+ *
+ * optional string description = 4;
+ */
+ public Builder setDescriptionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ description_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.compute.v1.Tags tags_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.Tags, com.google.cloud.compute.v1.Tags.Builder, com.google.cloud.compute.v1.TagsOrBuilder> tagsBuilder_;
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public boolean hasTags() {
+ return tagsBuilder_ != null || tags_ != null;
+ }
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public com.google.cloud.compute.v1.Tags getTags() {
+ if (tagsBuilder_ == null) {
+ return tags_ == null ? com.google.cloud.compute.v1.Tags.getDefaultInstance() : tags_;
+ } else {
+ return tagsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public Builder setTags(com.google.cloud.compute.v1.Tags value) {
+ if (tagsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ tags_ = value;
+ onChanged();
+ } else {
+ tagsBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public Builder setTags(
+ com.google.cloud.compute.v1.Tags.Builder builderForValue) {
+ if (tagsBuilder_ == null) {
+ tags_ = builderForValue.build();
+ onChanged();
+ } else {
+ tagsBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public Builder mergeTags(com.google.cloud.compute.v1.Tags value) {
+ if (tagsBuilder_ == null) {
+ if (tags_ != null) {
+ tags_ =
+ com.google.cloud.compute.v1.Tags.newBuilder(tags_).mergeFrom(value).buildPartial();
+ } else {
+ tags_ = value;
+ }
+ onChanged();
+ } else {
+ tagsBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public Builder clearTags() {
+ if (tagsBuilder_ == null) {
+ tags_ = null;
+ onChanged();
+ } else {
+ tags_ = null;
+ tagsBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public com.google.cloud.compute.v1.Tags.Builder getTagsBuilder() {
+
+ onChanged();
+ return getTagsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ public com.google.cloud.compute.v1.TagsOrBuilder getTagsOrBuilder() {
+ if (tagsBuilder_ != null) {
+ return tagsBuilder_.getMessageOrBuilder();
+ } else {
+ return tags_ == null ?
+ com.google.cloud.compute.v1.Tags.getDefaultInstance() : tags_;
+ }
+ }
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.Tags, com.google.cloud.compute.v1.Tags.Builder, com.google.cloud.compute.v1.TagsOrBuilder>
+ getTagsFieldBuilder() {
+ if (tagsBuilder_ == null) {
+ tagsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.Tags, com.google.cloud.compute.v1.Tags.Builder, com.google.cloud.compute.v1.TagsOrBuilder>(
+ getTags(),
+ getParentForChildren(),
+ isClean());
+ tags_ = null;
+ }
+ return tagsBuilder_;
+ }
+
+ private java.lang.Object machineType_ = "";
+ /**
+ *
+ * Full or partial URL of the machine type resource to use for this instance,
+ * in the format:
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/<var class="apiparam">machine-type</var></code>.
+ * This is provided by the client when the instance is created. For example,
+ * the following is a valid partial url to a
+ * <a href="/compute/docs/machine-types#predefined_machine_types">predefined machine type</a>:
+ * <code>zones/us-central1-f/machineTypes/n1-standard-1</code>
+ * To create a
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type">custom machine type</a>,
+ * provide a URL to a machine type in the following format, where
+ * <var class="apiparam">CPUS</var> is 1 or an even number up to 32
+ * (2, 4, 6, ... 24, etc), and <var class="apiparam">MEMORY</var> is the total
+ * memory for this instance. Memory must be a multiple of 256 MB and must
+ * be supplied in MB (e.g. 5 GB of memory is 5120 MB):
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/custom-<var class="apiparam">CPUS</var>-<var class="apiparam">MEMORY</var></code>
+ * For example: <code>zones/us-central1-f/machineTypes/custom-4-5120</code>
+ * For a full list of restrictions, read the
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type#specifications">Specifications</a>
+ * for custom machine types.
+ * @required compute.instances.insert
+ *
+ *
+ * optional string machine_type = 6;
+ */
+ public java.lang.String getMachineType() {
+ java.lang.Object ref = machineType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ machineType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Full or partial URL of the machine type resource to use for this instance,
+ * in the format:
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/<var class="apiparam">machine-type</var></code>.
+ * This is provided by the client when the instance is created. For example,
+ * the following is a valid partial url to a
+ * <a href="/compute/docs/machine-types#predefined_machine_types">predefined machine type</a>:
+ * <code>zones/us-central1-f/machineTypes/n1-standard-1</code>
+ * To create a
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type">custom machine type</a>,
+ * provide a URL to a machine type in the following format, where
+ * <var class="apiparam">CPUS</var> is 1 or an even number up to 32
+ * (2, 4, 6, ... 24, etc), and <var class="apiparam">MEMORY</var> is the total
+ * memory for this instance. Memory must be a multiple of 256 MB and must
+ * be supplied in MB (e.g. 5 GB of memory is 5120 MB):
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/custom-<var class="apiparam">CPUS</var>-<var class="apiparam">MEMORY</var></code>
+ * For example: <code>zones/us-central1-f/machineTypes/custom-4-5120</code>
+ * For a full list of restrictions, read the
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type#specifications">Specifications</a>
+ * for custom machine types.
+ * @required compute.instances.insert
+ *
+ *
+ * optional string machine_type = 6;
+ */
+ public com.google.protobuf.ByteString
+ getMachineTypeBytes() {
+ java.lang.Object ref = machineType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ machineType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Full or partial URL of the machine type resource to use for this instance,
+ * in the format:
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/<var class="apiparam">machine-type</var></code>.
+ * This is provided by the client when the instance is created. For example,
+ * the following is a valid partial url to a
+ * <a href="/compute/docs/machine-types#predefined_machine_types">predefined machine type</a>:
+ * <code>zones/us-central1-f/machineTypes/n1-standard-1</code>
+ * To create a
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type">custom machine type</a>,
+ * provide a URL to a machine type in the following format, where
+ * <var class="apiparam">CPUS</var> is 1 or an even number up to 32
+ * (2, 4, 6, ... 24, etc), and <var class="apiparam">MEMORY</var> is the total
+ * memory for this instance. Memory must be a multiple of 256 MB and must
+ * be supplied in MB (e.g. 5 GB of memory is 5120 MB):
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/custom-<var class="apiparam">CPUS</var>-<var class="apiparam">MEMORY</var></code>
+ * For example: <code>zones/us-central1-f/machineTypes/custom-4-5120</code>
+ * For a full list of restrictions, read the
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type#specifications">Specifications</a>
+ * for custom machine types.
+ * @required compute.instances.insert
+ *
+ *
+ * optional string machine_type = 6;
+ */
+ public Builder setMachineType(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ machineType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Full or partial URL of the machine type resource to use for this instance,
+ * in the format:
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/<var class="apiparam">machine-type</var></code>.
+ * This is provided by the client when the instance is created. For example,
+ * the following is a valid partial url to a
+ * <a href="/compute/docs/machine-types#predefined_machine_types">predefined machine type</a>:
+ * <code>zones/us-central1-f/machineTypes/n1-standard-1</code>
+ * To create a
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type">custom machine type</a>,
+ * provide a URL to a machine type in the following format, where
+ * <var class="apiparam">CPUS</var> is 1 or an even number up to 32
+ * (2, 4, 6, ... 24, etc), and <var class="apiparam">MEMORY</var> is the total
+ * memory for this instance. Memory must be a multiple of 256 MB and must
+ * be supplied in MB (e.g. 5 GB of memory is 5120 MB):
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/custom-<var class="apiparam">CPUS</var>-<var class="apiparam">MEMORY</var></code>
+ * For example: <code>zones/us-central1-f/machineTypes/custom-4-5120</code>
+ * For a full list of restrictions, read the
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type#specifications">Specifications</a>
+ * for custom machine types.
+ * @required compute.instances.insert
+ *
+ *
+ * optional string machine_type = 6;
+ */
+ public Builder clearMachineType() {
+
+ machineType_ = getDefaultInstance().getMachineType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Full or partial URL of the machine type resource to use for this instance,
+ * in the format:
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/<var class="apiparam">machine-type</var></code>.
+ * This is provided by the client when the instance is created. For example,
+ * the following is a valid partial url to a
+ * <a href="/compute/docs/machine-types#predefined_machine_types">predefined machine type</a>:
+ * <code>zones/us-central1-f/machineTypes/n1-standard-1</code>
+ * To create a
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type">custom machine type</a>,
+ * provide a URL to a machine type in the following format, where
+ * <var class="apiparam">CPUS</var> is 1 or an even number up to 32
+ * (2, 4, 6, ... 24, etc), and <var class="apiparam">MEMORY</var> is the total
+ * memory for this instance. Memory must be a multiple of 256 MB and must
+ * be supplied in MB (e.g. 5 GB of memory is 5120 MB):
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/custom-<var class="apiparam">CPUS</var>-<var class="apiparam">MEMORY</var></code>
+ * For example: <code>zones/us-central1-f/machineTypes/custom-4-5120</code>
+ * For a full list of restrictions, read the
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type#specifications">Specifications</a>
+ * for custom machine types.
+ * @required compute.instances.insert
+ *
+ *
+ * optional string machine_type = 6;
+ */
+ public Builder setMachineTypeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ machineType_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int status_ = 0;
+ /**
+ *
+ * [Output Only] The status of the instance. One of the
+ * following values: <code>PROVISIONING</code>, <code>STAGING</code>,
+ * <code>RUNNING</code>, <code>STOPPING</code>, <code>SUSPENDING</code>,
+ * <code>SUSPENDED</code>, and <code>TERMINATED</code>.
+ *
+ *
+ * optional .google.compute.v1.Instance.Status status = 9;
+ */
+ public int getStatusValue() {
+ return status_;
+ }
+ /**
+ *
+ * [Output Only] The status of the instance. One of the
+ * following values: <code>PROVISIONING</code>, <code>STAGING</code>,
+ * <code>RUNNING</code>, <code>STOPPING</code>, <code>SUSPENDING</code>,
+ * <code>SUSPENDED</code>, and <code>TERMINATED</code>.
+ *
+ *
+ * optional .google.compute.v1.Instance.Status status = 9;
+ */
+ public Builder setStatusValue(int value) {
+ status_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The status of the instance. One of the
+ * following values: <code>PROVISIONING</code>, <code>STAGING</code>,
+ * <code>RUNNING</code>, <code>STOPPING</code>, <code>SUSPENDING</code>,
+ * <code>SUSPENDED</code>, and <code>TERMINATED</code>.
+ *
+ *
+ * optional .google.compute.v1.Instance.Status status = 9;
+ */
+ public com.google.cloud.compute.v1.Instance.Status getStatus() {
+ com.google.cloud.compute.v1.Instance.Status result = com.google.cloud.compute.v1.Instance.Status.valueOf(status_);
+ return result == null ? com.google.cloud.compute.v1.Instance.Status.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * [Output Only] The status of the instance. One of the
+ * following values: <code>PROVISIONING</code>, <code>STAGING</code>,
+ * <code>RUNNING</code>, <code>STOPPING</code>, <code>SUSPENDING</code>,
+ * <code>SUSPENDED</code>, and <code>TERMINATED</code>.
+ *
+ *
+ * optional .google.compute.v1.Instance.Status status = 9;
+ */
+ public Builder setStatus(com.google.cloud.compute.v1.Instance.Status value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ status_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The status of the instance. One of the
+ * following values: <code>PROVISIONING</code>, <code>STAGING</code>,
+ * <code>RUNNING</code>, <code>STOPPING</code>, <code>SUSPENDING</code>,
+ * <code>SUSPENDED</code>, and <code>TERMINATED</code>.
+ *
+ *
+ * optional .google.compute.v1.Instance.Status status = 9;
+ */
+ public Builder clearStatus() {
+
+ status_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object statusMessage_ = "";
+ /**
+ *
+ * [Output Only] An optional, human-readable explanation of the status.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public java.lang.String getStatusMessage() {
+ java.lang.Object ref = statusMessage_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ statusMessage_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] An optional, human-readable explanation of the status.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public com.google.protobuf.ByteString
+ getStatusMessageBytes() {
+ java.lang.Object ref = statusMessage_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ statusMessage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] An optional, human-readable explanation of the status.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public Builder setStatusMessage(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ statusMessage_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] An optional, human-readable explanation of the status.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public Builder clearStatusMessage() {
+
+ statusMessage_ = getDefaultInstance().getStatusMessage();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] An optional, human-readable explanation of the status.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public Builder setStatusMessageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ statusMessage_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object zone_ = "";
+ /**
+ *
+ * [Output Only] URL of the zone where the instance resides.
+ *
+ *
+ * optional string zone = 11;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] URL of the zone where the instance resides.
+ *
+ *
+ * optional string zone = 11;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] URL of the zone where the instance resides.
+ *
+ *
+ * optional string zone = 11;
+ */
+ public Builder setZone(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] URL of the zone where the instance resides.
+ *
+ *
+ * optional string zone = 11;
+ */
+ public Builder clearZone() {
+
+ zone_ = getDefaultInstance().getZone();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] URL of the zone where the instance resides.
+ *
+ *
+ * optional string zone = 11;
+ */
+ public Builder setZoneBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+
+ private boolean canIpForward_ ;
+ /**
+ *
+ * Allows this instance to send and receive packets with non-matching
+ * destination or source IPs. This is required if you plan to use this
+ * instance to forward routes. For more information, see
+ * <a href="/compute/docs/networking#canipforward">Enabling IP Forwarding</a>.
+ *
+ *
+ * optional bool can_ip_forward = 12;
+ */
+ public boolean getCanIpForward() {
+ return canIpForward_;
+ }
+ /**
+ *
+ * Allows this instance to send and receive packets with non-matching
+ * destination or source IPs. This is required if you plan to use this
+ * instance to forward routes. For more information, see
+ * <a href="/compute/docs/networking#canipforward">Enabling IP Forwarding</a>.
+ *
+ *
+ * optional bool can_ip_forward = 12;
+ */
+ public Builder setCanIpForward(boolean value) {
+
+ canIpForward_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Allows this instance to send and receive packets with non-matching
+ * destination or source IPs. This is required if you plan to use this
+ * instance to forward routes. For more information, see
+ * <a href="/compute/docs/networking#canipforward">Enabling IP Forwarding</a>.
+ *
+ *
+ * optional bool can_ip_forward = 12;
+ */
+ public Builder clearCanIpForward() {
+
+ canIpForward_ = false;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public java.util.List
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public int getNetworkInterfacesCount() {
+ if (networkInterfacesBuilder_ == null) {
+ return networkInterfaces_.size();
+ } else {
+ return networkInterfacesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public com.google.cloud.compute.v1.NetworkInterface getNetworkInterfaces(int index) {
+ if (networkInterfacesBuilder_ == null) {
+ return networkInterfaces_.get(index);
+ } else {
+ return networkInterfacesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public Builder setNetworkInterfaces(
+ int index, com.google.cloud.compute.v1.NetworkInterface value) {
+ if (networkInterfacesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNetworkInterfacesIsMutable();
+ networkInterfaces_.set(index, value);
+ onChanged();
+ } else {
+ networkInterfacesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public Builder setNetworkInterfaces(
+ int index, com.google.cloud.compute.v1.NetworkInterface.Builder builderForValue) {
+ if (networkInterfacesBuilder_ == null) {
+ ensureNetworkInterfacesIsMutable();
+ networkInterfaces_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ networkInterfacesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public Builder addNetworkInterfaces(com.google.cloud.compute.v1.NetworkInterface value) {
+ if (networkInterfacesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNetworkInterfacesIsMutable();
+ networkInterfaces_.add(value);
+ onChanged();
+ } else {
+ networkInterfacesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public Builder addNetworkInterfaces(
+ int index, com.google.cloud.compute.v1.NetworkInterface value) {
+ if (networkInterfacesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNetworkInterfacesIsMutable();
+ networkInterfaces_.add(index, value);
+ onChanged();
+ } else {
+ networkInterfacesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public Builder addNetworkInterfaces(
+ com.google.cloud.compute.v1.NetworkInterface.Builder builderForValue) {
+ if (networkInterfacesBuilder_ == null) {
+ ensureNetworkInterfacesIsMutable();
+ networkInterfaces_.add(builderForValue.build());
+ onChanged();
+ } else {
+ networkInterfacesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public Builder addNetworkInterfaces(
+ int index, com.google.cloud.compute.v1.NetworkInterface.Builder builderForValue) {
+ if (networkInterfacesBuilder_ == null) {
+ ensureNetworkInterfacesIsMutable();
+ networkInterfaces_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ networkInterfacesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public Builder addAllNetworkInterfaces(
+ java.lang.Iterable extends com.google.cloud.compute.v1.NetworkInterface> values) {
+ if (networkInterfacesBuilder_ == null) {
+ ensureNetworkInterfacesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, networkInterfaces_);
+ onChanged();
+ } else {
+ networkInterfacesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public Builder clearNetworkInterfaces() {
+ if (networkInterfacesBuilder_ == null) {
+ networkInterfaces_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000800);
+ onChanged();
+ } else {
+ networkInterfacesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public Builder removeNetworkInterfaces(int index) {
+ if (networkInterfacesBuilder_ == null) {
+ ensureNetworkInterfacesIsMutable();
+ networkInterfaces_.remove(index);
+ onChanged();
+ } else {
+ networkInterfacesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public com.google.cloud.compute.v1.NetworkInterface.Builder getNetworkInterfacesBuilder(
+ int index) {
+ return getNetworkInterfacesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public com.google.cloud.compute.v1.NetworkInterfaceOrBuilder getNetworkInterfacesOrBuilder(
+ int index) {
+ if (networkInterfacesBuilder_ == null) {
+ return networkInterfaces_.get(index); } else {
+ return networkInterfacesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.NetworkInterfaceOrBuilder>
+ getNetworkInterfacesOrBuilderList() {
+ if (networkInterfacesBuilder_ != null) {
+ return networkInterfacesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(networkInterfaces_);
+ }
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public com.google.cloud.compute.v1.NetworkInterface.Builder addNetworkInterfacesBuilder() {
+ return getNetworkInterfacesFieldBuilder().addBuilder(
+ com.google.cloud.compute.v1.NetworkInterface.getDefaultInstance());
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public com.google.cloud.compute.v1.NetworkInterface.Builder addNetworkInterfacesBuilder(
+ int index) {
+ return getNetworkInterfacesFieldBuilder().addBuilder(
+ index, com.google.cloud.compute.v1.NetworkInterface.getDefaultInstance());
+ }
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ public java.util.List
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public java.util.List
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public int getDisksCount() {
+ if (disksBuilder_ == null) {
+ return disks_.size();
+ } else {
+ return disksBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk getDisks(int index) {
+ if (disksBuilder_ == null) {
+ return disks_.get(index);
+ } else {
+ return disksBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public Builder setDisks(
+ int index, com.google.cloud.compute.v1.AttachedDisk value) {
+ if (disksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureDisksIsMutable();
+ disks_.set(index, value);
+ onChanged();
+ } else {
+ disksBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public Builder setDisks(
+ int index, com.google.cloud.compute.v1.AttachedDisk.Builder builderForValue) {
+ if (disksBuilder_ == null) {
+ ensureDisksIsMutable();
+ disks_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ disksBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public Builder addDisks(com.google.cloud.compute.v1.AttachedDisk value) {
+ if (disksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureDisksIsMutable();
+ disks_.add(value);
+ onChanged();
+ } else {
+ disksBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public Builder addDisks(
+ int index, com.google.cloud.compute.v1.AttachedDisk value) {
+ if (disksBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureDisksIsMutable();
+ disks_.add(index, value);
+ onChanged();
+ } else {
+ disksBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public Builder addDisks(
+ com.google.cloud.compute.v1.AttachedDisk.Builder builderForValue) {
+ if (disksBuilder_ == null) {
+ ensureDisksIsMutable();
+ disks_.add(builderForValue.build());
+ onChanged();
+ } else {
+ disksBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public Builder addDisks(
+ int index, com.google.cloud.compute.v1.AttachedDisk.Builder builderForValue) {
+ if (disksBuilder_ == null) {
+ ensureDisksIsMutable();
+ disks_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ disksBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public Builder addAllDisks(
+ java.lang.Iterable extends com.google.cloud.compute.v1.AttachedDisk> values) {
+ if (disksBuilder_ == null) {
+ ensureDisksIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, disks_);
+ onChanged();
+ } else {
+ disksBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public Builder clearDisks() {
+ if (disksBuilder_ == null) {
+ disks_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00001000);
+ onChanged();
+ } else {
+ disksBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public Builder removeDisks(int index) {
+ if (disksBuilder_ == null) {
+ ensureDisksIsMutable();
+ disks_.remove(index);
+ onChanged();
+ } else {
+ disksBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.Builder getDisksBuilder(
+ int index) {
+ return getDisksFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public com.google.cloud.compute.v1.AttachedDiskOrBuilder getDisksOrBuilder(
+ int index) {
+ if (disksBuilder_ == null) {
+ return disks_.get(index); } else {
+ return disksBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.AttachedDiskOrBuilder>
+ getDisksOrBuilderList() {
+ if (disksBuilder_ != null) {
+ return disksBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(disks_);
+ }
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.Builder addDisksBuilder() {
+ return getDisksFieldBuilder().addBuilder(
+ com.google.cloud.compute.v1.AttachedDisk.getDefaultInstance());
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public com.google.cloud.compute.v1.AttachedDisk.Builder addDisksBuilder(
+ int index) {
+ return getDisksFieldBuilder().addBuilder(
+ index, com.google.cloud.compute.v1.AttachedDisk.getDefaultInstance());
+ }
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ public java.util.List
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public java.util.List
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public int getServiceAccountsCount() {
+ if (serviceAccountsBuilder_ == null) {
+ return serviceAccounts_.size();
+ } else {
+ return serviceAccountsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public com.google.cloud.compute.v1.ServiceAccount getServiceAccounts(int index) {
+ if (serviceAccountsBuilder_ == null) {
+ return serviceAccounts_.get(index);
+ } else {
+ return serviceAccountsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public Builder setServiceAccounts(
+ int index, com.google.cloud.compute.v1.ServiceAccount value) {
+ if (serviceAccountsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureServiceAccountsIsMutable();
+ serviceAccounts_.set(index, value);
+ onChanged();
+ } else {
+ serviceAccountsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public Builder setServiceAccounts(
+ int index, com.google.cloud.compute.v1.ServiceAccount.Builder builderForValue) {
+ if (serviceAccountsBuilder_ == null) {
+ ensureServiceAccountsIsMutable();
+ serviceAccounts_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ serviceAccountsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public Builder addServiceAccounts(com.google.cloud.compute.v1.ServiceAccount value) {
+ if (serviceAccountsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureServiceAccountsIsMutable();
+ serviceAccounts_.add(value);
+ onChanged();
+ } else {
+ serviceAccountsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public Builder addServiceAccounts(
+ int index, com.google.cloud.compute.v1.ServiceAccount value) {
+ if (serviceAccountsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureServiceAccountsIsMutable();
+ serviceAccounts_.add(index, value);
+ onChanged();
+ } else {
+ serviceAccountsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public Builder addServiceAccounts(
+ com.google.cloud.compute.v1.ServiceAccount.Builder builderForValue) {
+ if (serviceAccountsBuilder_ == null) {
+ ensureServiceAccountsIsMutable();
+ serviceAccounts_.add(builderForValue.build());
+ onChanged();
+ } else {
+ serviceAccountsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public Builder addServiceAccounts(
+ int index, com.google.cloud.compute.v1.ServiceAccount.Builder builderForValue) {
+ if (serviceAccountsBuilder_ == null) {
+ ensureServiceAccountsIsMutable();
+ serviceAccounts_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ serviceAccountsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public Builder addAllServiceAccounts(
+ java.lang.Iterable extends com.google.cloud.compute.v1.ServiceAccount> values) {
+ if (serviceAccountsBuilder_ == null) {
+ ensureServiceAccountsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, serviceAccounts_);
+ onChanged();
+ } else {
+ serviceAccountsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public Builder clearServiceAccounts() {
+ if (serviceAccountsBuilder_ == null) {
+ serviceAccounts_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00002000);
+ onChanged();
+ } else {
+ serviceAccountsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public Builder removeServiceAccounts(int index) {
+ if (serviceAccountsBuilder_ == null) {
+ ensureServiceAccountsIsMutable();
+ serviceAccounts_.remove(index);
+ onChanged();
+ } else {
+ serviceAccountsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public com.google.cloud.compute.v1.ServiceAccount.Builder getServiceAccountsBuilder(
+ int index) {
+ return getServiceAccountsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public com.google.cloud.compute.v1.ServiceAccountOrBuilder getServiceAccountsOrBuilder(
+ int index) {
+ if (serviceAccountsBuilder_ == null) {
+ return serviceAccounts_.get(index); } else {
+ return serviceAccountsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.ServiceAccountOrBuilder>
+ getServiceAccountsOrBuilderList() {
+ if (serviceAccountsBuilder_ != null) {
+ return serviceAccountsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(serviceAccounts_);
+ }
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public com.google.cloud.compute.v1.ServiceAccount.Builder addServiceAccountsBuilder() {
+ return getServiceAccountsFieldBuilder().addBuilder(
+ com.google.cloud.compute.v1.ServiceAccount.getDefaultInstance());
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public com.google.cloud.compute.v1.ServiceAccount.Builder addServiceAccountsBuilder(
+ int index) {
+ return getServiceAccountsFieldBuilder().addBuilder(
+ index, com.google.cloud.compute.v1.ServiceAccount.getDefaultInstance());
+ }
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ public java.util.List
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 17;
+ */
+ public java.lang.String getSelfLink() {
+ java.lang.Object ref = selfLink_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ selfLink_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 17;
+ */
+ public com.google.protobuf.ByteString
+ getSelfLinkBytes() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ selfLink_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 17;
+ */
+ public Builder setSelfLink(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ selfLink_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 17;
+ */
+ public Builder clearSelfLink() {
+
+ selfLink_ = getDefaultInstance().getSelfLink();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 17;
+ */
+ public Builder setSelfLinkBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ selfLink_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.compute.v1.Scheduling scheduling_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.Scheduling, com.google.cloud.compute.v1.Scheduling.Builder, com.google.cloud.compute.v1.SchedulingOrBuilder> schedulingBuilder_;
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public boolean hasScheduling() {
+ return schedulingBuilder_ != null || scheduling_ != null;
+ }
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public com.google.cloud.compute.v1.Scheduling getScheduling() {
+ if (schedulingBuilder_ == null) {
+ return scheduling_ == null ? com.google.cloud.compute.v1.Scheduling.getDefaultInstance() : scheduling_;
+ } else {
+ return schedulingBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public Builder setScheduling(com.google.cloud.compute.v1.Scheduling value) {
+ if (schedulingBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ scheduling_ = value;
+ onChanged();
+ } else {
+ schedulingBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public Builder setScheduling(
+ com.google.cloud.compute.v1.Scheduling.Builder builderForValue) {
+ if (schedulingBuilder_ == null) {
+ scheduling_ = builderForValue.build();
+ onChanged();
+ } else {
+ schedulingBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public Builder mergeScheduling(com.google.cloud.compute.v1.Scheduling value) {
+ if (schedulingBuilder_ == null) {
+ if (scheduling_ != null) {
+ scheduling_ =
+ com.google.cloud.compute.v1.Scheduling.newBuilder(scheduling_).mergeFrom(value).buildPartial();
+ } else {
+ scheduling_ = value;
+ }
+ onChanged();
+ } else {
+ schedulingBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public Builder clearScheduling() {
+ if (schedulingBuilder_ == null) {
+ scheduling_ = null;
+ onChanged();
+ } else {
+ scheduling_ = null;
+ schedulingBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public com.google.cloud.compute.v1.Scheduling.Builder getSchedulingBuilder() {
+
+ onChanged();
+ return getSchedulingFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ public com.google.cloud.compute.v1.SchedulingOrBuilder getSchedulingOrBuilder() {
+ if (schedulingBuilder_ != null) {
+ return schedulingBuilder_.getMessageOrBuilder();
+ } else {
+ return scheduling_ == null ?
+ com.google.cloud.compute.v1.Scheduling.getDefaultInstance() : scheduling_;
+ }
+ }
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.Scheduling, com.google.cloud.compute.v1.Scheduling.Builder, com.google.cloud.compute.v1.SchedulingOrBuilder>
+ getSchedulingFieldBuilder() {
+ if (schedulingBuilder_ == null) {
+ schedulingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.Scheduling, com.google.cloud.compute.v1.Scheduling.Builder, com.google.cloud.compute.v1.SchedulingOrBuilder>(
+ getScheduling(),
+ getParentForChildren(),
+ isClean());
+ scheduling_ = null;
+ }
+ return schedulingBuilder_;
+ }
+
+ private java.lang.Object cpuPlatform_ = "";
+ /**
+ *
+ * [Output Only] The CPU platform used by this instance.
+ *
+ *
+ * optional string cpu_platform = 19;
+ */
+ public java.lang.String getCpuPlatform() {
+ java.lang.Object ref = cpuPlatform_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ cpuPlatform_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The CPU platform used by this instance.
+ *
+ *
+ * optional string cpu_platform = 19;
+ */
+ public com.google.protobuf.ByteString
+ getCpuPlatformBytes() {
+ java.lang.Object ref = cpuPlatform_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ cpuPlatform_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The CPU platform used by this instance.
+ *
+ *
+ * optional string cpu_platform = 19;
+ */
+ public Builder setCpuPlatform(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ cpuPlatform_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The CPU platform used by this instance.
+ *
+ *
+ * optional string cpu_platform = 19;
+ */
+ public Builder clearCpuPlatform() {
+
+ cpuPlatform_ = getDefaultInstance().getCpuPlatform();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The CPU platform used by this instance.
+ *
+ *
+ * optional string cpu_platform = 19;
+ */
+ public Builder setCpuPlatformBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ cpuPlatform_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.Instance)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.Instance)
+ private static final com.google.cloud.compute.v1.Instance DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Instance();
+ }
+
+ public static com.google.cloud.compute.v1.Instance getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceAggregatedList</code> for aggregated lists of Instance
+ * resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceAggregatedList</code> for aggregated lists of Instance
+ * resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ID_FIELD_NUMBER = 3;
+ private volatile java.lang.Object id_;
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public java.lang.String getId() {
+ java.lang.Object ref = id_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ id_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getIdBytes() {
+ java.lang.Object ref = id_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ id_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ITEMS_FIELD_NUMBER = 4;
+ private static final class ItemsDefaultEntryHolder {
+ static final com.google.protobuf.MapEntry<
+ java.lang.String, com.google.cloud.compute.v1.InstancesScopedList> defaultEntry =
+ com.google.protobuf.MapEntry
+ .
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ public boolean containsItems(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetItems().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getItemsMap()} instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Map
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ public java.util.Map
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ public com.google.cloud.compute.v1.InstancesScopedList getItemsOrDefault(
+ java.lang.String key,
+ com.google.cloud.compute.v1.InstancesScopedList defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ public com.google.cloud.compute.v1.InstancesScopedList getItemsOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public com.google.protobuf.ByteString
+ getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SELF_LINK_FIELD_NUMBER = 6;
+ private volatile java.lang.Object selfLink_;
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public java.lang.String getSelfLink() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ selfLink_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public com.google.protobuf.ByteString
+ getSelfLinkBytes() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ selfLink_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_);
+ }
+ for (java.util.Map.Entry
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceAggregatedList</code> for aggregated lists of Instance
+ * resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceAggregatedList</code> for aggregated lists of Instance
+ * resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceAggregatedList</code> for aggregated lists of Instance
+ * resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKind(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceAggregatedList</code> for aggregated lists of Instance
+ * resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder clearKind() {
+
+ kind_ = getDefaultInstance().getKind();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceAggregatedList</code> for aggregated lists of Instance
+ * resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKindBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object id_ = "";
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public java.lang.String getId() {
+ java.lang.Object ref = id_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ id_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getIdBytes() {
+ java.lang.Object ref = id_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ id_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public Builder setId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ id_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public Builder clearId() {
+
+ id_ = getDefaultInstance().getId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public Builder setIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ id_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.MapField<
+ java.lang.String, com.google.cloud.compute.v1.InstancesScopedList> items_;
+ private com.google.protobuf.MapField
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ public boolean containsItems(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ return internalGetItems().getMap().containsKey(key);
+ }
+ /**
+ * Use {@link #getItemsMap()} instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Map
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ public java.util.Map
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ public com.google.cloud.compute.v1.InstancesScopedList getItemsOrDefault(
+ java.lang.String key,
+ com.google.cloud.compute.v1.InstancesScopedList defaultValue) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ public com.google.cloud.compute.v1.InstancesScopedList getItemsOrThrow(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ java.util.Map
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ public Builder removeItems(
+ java.lang.String key) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ getMutableItems().remove(key);
+ return this;
+ }
+ /**
+ * Use alternate mutation accessors instead.
+ */
+ @java.lang.Deprecated
+ public java.util.Map
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+ public Builder putItems(
+ java.lang.String key,
+ com.google.cloud.compute.v1.InstancesScopedList value) {
+ if (key == null) { throw new java.lang.NullPointerException(); }
+ if (value == null) { throw new java.lang.NullPointerException(); }
+ getMutableItems().put(key, value);
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ public Builder putAllItems(
+ java.util.Map
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public com.google.protobuf.ByteString
+ getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public Builder setNextPageToken(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public Builder setNextPageTokenBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object selfLink_ = "";
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public java.lang.String getSelfLink() {
+ java.lang.Object ref = selfLink_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ selfLink_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public com.google.protobuf.ByteString
+ getSelfLinkBytes() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ selfLink_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public Builder setSelfLink(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ selfLink_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public Builder clearSelfLink() {
+
+ selfLink_ = getDefaultInstance().getSelfLink();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public Builder setSelfLinkBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ selfLink_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.InstanceAggregatedList)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.InstanceAggregatedList)
+ private static final com.google.cloud.compute.v1.InstanceAggregatedList DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstanceAggregatedList();
+ }
+
+ public static com.google.cloud.compute.v1.InstanceAggregatedList getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceAggregatedList</code> for aggregated lists of Instance
+ * resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ java.lang.String getKind();
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceAggregatedList</code> for aggregated lists of Instance
+ * resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ com.google.protobuf.ByteString
+ getKindBytes();
+
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ java.lang.String getId();
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ com.google.protobuf.ByteString
+ getIdBytes();
+
+ /**
+ *
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+ int getItemsCount();
+ /**
+ *
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+ boolean containsItems(
+ java.lang.String key);
+ /**
+ * Use {@link #getItemsMap()} instead.
+ */
+ @java.lang.Deprecated
+ java.util.Map
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+ java.util.Map
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ com.google.cloud.compute.v1.InstancesScopedList getItemsOrDefault(
+ java.lang.String key,
+ com.google.cloud.compute.v1.InstancesScopedList defaultValue);
+ /**
+ *
+ * [Output Only] A map of scoped instance lists.
+ *
+ *
+ * map<string, .google.compute.v1.InstancesScopedList> items = 4;
+ */
+
+ com.google.cloud.compute.v1.InstancesScopedList getItemsOrThrow(
+ java.lang.String key);
+
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ com.google.protobuf.ByteString
+ getNextPageTokenBytes();
+
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ java.lang.String getSelfLink();
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ com.google.protobuf.ByteString
+ getSelfLinkBytes();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceList.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceList.java
new file mode 100644
index 000000000..188b91f09
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceList.java
@@ -0,0 +1,1484 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ *
+ * Contains a list of instances.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.InstanceList}
+ */
+public final class InstanceList extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.InstanceList)
+ InstanceListOrBuilder {
+ // Use InstanceList.newBuilder() to construct.
+ private InstanceList(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private InstanceList() {
+ kind_ = "";
+ id_ = "";
+ items_ = java.util.Collections.emptyList();
+ nextPageToken_ = "";
+ selfLink_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private InstanceList(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ id_ = s;
+ break;
+ }
+ case 34: {
+ if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ items_ = new java.util.ArrayList
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceList</code> for lists of Instance resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceList</code> for lists of Instance resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ID_FIELD_NUMBER = 3;
+ private volatile java.lang.Object id_;
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public java.lang.String getId() {
+ java.lang.Object ref = id_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ id_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getIdBytes() {
+ java.lang.Object ref = id_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ id_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ITEMS_FIELD_NUMBER = 4;
+ private java.util.List
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public java.util.List
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.InstanceOrBuilder>
+ getItemsOrBuilderList() {
+ return items_;
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public int getItemsCount() {
+ return items_.size();
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public com.google.cloud.compute.v1.Instance getItems(int index) {
+ return items_.get(index);
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public com.google.cloud.compute.v1.InstanceOrBuilder getItemsOrBuilder(
+ int index) {
+ return items_.get(index);
+ }
+
+ public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 5;
+ private volatile java.lang.Object nextPageToken_;
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public com.google.protobuf.ByteString
+ getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SELF_LINK_FIELD_NUMBER = 6;
+ private volatile java.lang.Object selfLink_;
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public java.lang.String getSelfLink() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ selfLink_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public com.google.protobuf.ByteString
+ getSelfLinkBytes() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ selfLink_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_);
+ }
+ for (int i = 0; i < items_.size(); i++) {
+ output.writeMessage(4, items_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, nextPageToken_);
+ }
+ if (!getSelfLinkBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, selfLink_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1000, kind_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, id_);
+ }
+ for (int i = 0; i < items_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, items_.get(i));
+ }
+ if (!getNextPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, nextPageToken_);
+ }
+ if (!getSelfLinkBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, selfLink_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1000, kind_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.InstanceList)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.InstanceList other = (com.google.cloud.compute.v1.InstanceList) obj;
+
+ boolean result = true;
+ result = result && getKind()
+ .equals(other.getKind());
+ result = result && getId()
+ .equals(other.getId());
+ result = result && getItemsList()
+ .equals(other.getItemsList());
+ result = result && getNextPageToken()
+ .equals(other.getNextPageToken());
+ result = result && getSelfLink()
+ .equals(other.getSelfLink());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + KIND_FIELD_NUMBER;
+ hash = (53 * hash) + getKind().hashCode();
+ hash = (37 * hash) + ID_FIELD_NUMBER;
+ hash = (53 * hash) + getId().hashCode();
+ if (getItemsCount() > 0) {
+ hash = (37 * hash) + ITEMS_FIELD_NUMBER;
+ hash = (53 * hash) + getItemsList().hashCode();
+ }
+ hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getNextPageToken().hashCode();
+ hash = (37 * hash) + SELF_LINK_FIELD_NUMBER;
+ hash = (53 * hash) + getSelfLink().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.InstanceList parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstanceList parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstanceList parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstanceList parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstanceList parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstanceList parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstanceList parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstanceList parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstanceList parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstanceList parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.InstanceList prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Contains a list of instances.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.InstanceList}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceList</code> for lists of Instance resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceList</code> for lists of Instance resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceList</code> for lists of Instance resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKind(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceList</code> for lists of Instance resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder clearKind() {
+
+ kind_ = getDefaultInstance().getKind();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceList</code> for lists of Instance resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKindBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object id_ = "";
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public java.lang.String getId() {
+ java.lang.Object ref = id_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ id_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public com.google.protobuf.ByteString
+ getIdBytes() {
+ java.lang.Object ref = id_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ id_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public Builder setId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ id_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public Builder clearId() {
+
+ id_ = getDefaultInstance().getId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ public Builder setIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ id_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public java.util.List
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public int getItemsCount() {
+ if (itemsBuilder_ == null) {
+ return items_.size();
+ } else {
+ return itemsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public com.google.cloud.compute.v1.Instance getItems(int index) {
+ if (itemsBuilder_ == null) {
+ return items_.get(index);
+ } else {
+ return itemsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public Builder setItems(
+ int index, com.google.cloud.compute.v1.Instance value) {
+ if (itemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureItemsIsMutable();
+ items_.set(index, value);
+ onChanged();
+ } else {
+ itemsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public Builder setItems(
+ int index, com.google.cloud.compute.v1.Instance.Builder builderForValue) {
+ if (itemsBuilder_ == null) {
+ ensureItemsIsMutable();
+ items_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ itemsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public Builder addItems(com.google.cloud.compute.v1.Instance value) {
+ if (itemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureItemsIsMutable();
+ items_.add(value);
+ onChanged();
+ } else {
+ itemsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public Builder addItems(
+ int index, com.google.cloud.compute.v1.Instance value) {
+ if (itemsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureItemsIsMutable();
+ items_.add(index, value);
+ onChanged();
+ } else {
+ itemsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public Builder addItems(
+ com.google.cloud.compute.v1.Instance.Builder builderForValue) {
+ if (itemsBuilder_ == null) {
+ ensureItemsIsMutable();
+ items_.add(builderForValue.build());
+ onChanged();
+ } else {
+ itemsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public Builder addItems(
+ int index, com.google.cloud.compute.v1.Instance.Builder builderForValue) {
+ if (itemsBuilder_ == null) {
+ ensureItemsIsMutable();
+ items_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ itemsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public Builder addAllItems(
+ java.lang.Iterable extends com.google.cloud.compute.v1.Instance> values) {
+ if (itemsBuilder_ == null) {
+ ensureItemsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, items_);
+ onChanged();
+ } else {
+ itemsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public Builder clearItems() {
+ if (itemsBuilder_ == null) {
+ items_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ itemsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public Builder removeItems(int index) {
+ if (itemsBuilder_ == null) {
+ ensureItemsIsMutable();
+ items_.remove(index);
+ onChanged();
+ } else {
+ itemsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public com.google.cloud.compute.v1.Instance.Builder getItemsBuilder(
+ int index) {
+ return getItemsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public com.google.cloud.compute.v1.InstanceOrBuilder getItemsOrBuilder(
+ int index) {
+ if (itemsBuilder_ == null) {
+ return items_.get(index); } else {
+ return itemsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.InstanceOrBuilder>
+ getItemsOrBuilderList() {
+ if (itemsBuilder_ != null) {
+ return itemsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(items_);
+ }
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public com.google.cloud.compute.v1.Instance.Builder addItemsBuilder() {
+ return getItemsFieldBuilder().addBuilder(
+ com.google.cloud.compute.v1.Instance.getDefaultInstance());
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public com.google.cloud.compute.v1.Instance.Builder addItemsBuilder(
+ int index) {
+ return getItemsFieldBuilder().addBuilder(
+ index, com.google.cloud.compute.v1.Instance.getDefaultInstance());
+ }
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ public java.util.List
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public java.lang.String getNextPageToken() {
+ java.lang.Object ref = nextPageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ nextPageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public com.google.protobuf.ByteString
+ getNextPageTokenBytes() {
+ java.lang.Object ref = nextPageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ nextPageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public Builder setNextPageToken(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public Builder clearNextPageToken() {
+
+ nextPageToken_ = getDefaultInstance().getNextPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ public Builder setNextPageTokenBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ nextPageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object selfLink_ = "";
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public java.lang.String getSelfLink() {
+ java.lang.Object ref = selfLink_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ selfLink_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public com.google.protobuf.ByteString
+ getSelfLinkBytes() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ selfLink_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public Builder setSelfLink(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ selfLink_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public Builder clearSelfLink() {
+
+ selfLink_ = getDefaultInstance().getSelfLink();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ public Builder setSelfLinkBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ selfLink_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.InstanceList)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.InstanceList)
+ private static final com.google.cloud.compute.v1.InstanceList DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstanceList();
+ }
+
+ public static com.google.cloud.compute.v1.InstanceList getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceList</code> for lists of Instance resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ java.lang.String getKind();
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instanceList</code> for lists of Instance resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ com.google.protobuf.ByteString
+ getKindBytes();
+
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ java.lang.String getId();
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional string id = 3;
+ */
+ com.google.protobuf.ByteString
+ getIdBytes();
+
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ java.util.List
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ com.google.cloud.compute.v1.Instance getItems(int index);
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ int getItemsCount();
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ java.util.List extends com.google.cloud.compute.v1.InstanceOrBuilder>
+ getItemsOrBuilderList();
+ /**
+ *
+ * [Output Only] A list of instances.
+ *
+ *
+ * repeated .google.compute.v1.Instance items = 4;
+ */
+ com.google.cloud.compute.v1.InstanceOrBuilder getItemsOrBuilder(
+ int index);
+
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ java.lang.String getNextPageToken();
+ /**
+ *
+ * [Output Only] This token allows you to get the next page of results for
+ * list requests. If the number of results is larger than
+ * <code>maxResults</code>, use the <code>nextPageToken</code> as a value for
+ * the query parameter <code>pageToken</code> in the next list request.
+ * Subsequent list requests will have their own <code>nextPageToken</code> to
+ * continue paging through the results.
+ *
+ *
+ * optional string next_page_token = 5;
+ */
+ com.google.protobuf.ByteString
+ getNextPageTokenBytes();
+
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ java.lang.String getSelfLink();
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 6;
+ */
+ com.google.protobuf.ByteString
+ getSelfLinkBytes();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceOrBuilder.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceOrBuilder.java
new file mode 100644
index 000000000..11820a7ed
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstanceOrBuilder.java
@@ -0,0 +1,524 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+public interface InstanceOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:google.compute.v1.Instance)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instance</code> for instances.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ java.lang.String getKind();
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#instance</code> for instances.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ com.google.protobuf.ByteString
+ getKindBytes();
+
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional fixed64 id = 1;
+ */
+ long getId();
+
+ /**
+ *
+ * [Output Only] Creation timestamp in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> text format.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ java.lang.String getCreationTimestamp();
+ /**
+ *
+ * [Output Only] Creation timestamp in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt">RFC3339</a> text format.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ com.google.protobuf.ByteString
+ getCreationTimestampBytes();
+
+ /**
+ *
+ * The name of the resource, provided by the client when initially creating
+ * the resource. The resource name must be 1-63 characters long, and comply
+ * with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
+ * Specifically, the name must be 1-63 characters long and match the regular
+ * expression <code>[a-z]([-a-z0-9]*[a-z0-9])?</code> which means the first
+ * character must be a lowercase letter, and all following characters must be
+ * a dash, lowercase letter, or digit, except the last character, which cannot
+ * be a dash.
+ * @required compute.instances.insert
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * optional string name = 3;
+ */
+ java.lang.String getName();
+ /**
+ *
+ * The name of the resource, provided by the client when initially creating
+ * the resource. The resource name must be 1-63 characters long, and comply
+ * with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt" target="_blank">RFC1035</a>.
+ * Specifically, the name must be 1-63 characters long and match the regular
+ * expression <code>[a-z]([-a-z0-9]*[a-z0-9])?</code> which means the first
+ * character must be a lowercase letter, and all following characters must be
+ * a dash, lowercase letter, or digit, except the last character, which cannot
+ * be a dash.
+ * @required compute.instances.insert
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * optional string name = 3;
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ *
+ * An optional description of this resource. Provide this property when you
+ * create the resource.
+ *
+ *
+ * optional string description = 4;
+ */
+ java.lang.String getDescription();
+ /**
+ *
+ * An optional description of this resource. Provide this property when you
+ * create the resource.
+ *
+ *
+ * optional string description = 4;
+ */
+ com.google.protobuf.ByteString
+ getDescriptionBytes();
+
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ boolean hasTags();
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ com.google.cloud.compute.v1.Tags getTags();
+ /**
+ *
+ * A list of tags to apply to this instance. Tags are used to identify valid
+ * sources or targets for network firewalls and are specified by the client
+ * during instance creation. The tags can be later modified by the setTags
+ * method. Each tag within the list must comply with
+ * <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ *
+ *
+ * optional .google.compute.v1.Tags tags = 5;
+ */
+ com.google.cloud.compute.v1.TagsOrBuilder getTagsOrBuilder();
+
+ /**
+ *
+ * Full or partial URL of the machine type resource to use for this instance,
+ * in the format:
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/<var class="apiparam">machine-type</var></code>.
+ * This is provided by the client when the instance is created. For example,
+ * the following is a valid partial url to a
+ * <a href="/compute/docs/machine-types#predefined_machine_types">predefined machine type</a>:
+ * <code>zones/us-central1-f/machineTypes/n1-standard-1</code>
+ * To create a
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type">custom machine type</a>,
+ * provide a URL to a machine type in the following format, where
+ * <var class="apiparam">CPUS</var> is 1 or an even number up to 32
+ * (2, 4, 6, ... 24, etc), and <var class="apiparam">MEMORY</var> is the total
+ * memory for this instance. Memory must be a multiple of 256 MB and must
+ * be supplied in MB (e.g. 5 GB of memory is 5120 MB):
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/custom-<var class="apiparam">CPUS</var>-<var class="apiparam">MEMORY</var></code>
+ * For example: <code>zones/us-central1-f/machineTypes/custom-4-5120</code>
+ * For a full list of restrictions, read the
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type#specifications">Specifications</a>
+ * for custom machine types.
+ * @required compute.instances.insert
+ *
+ *
+ * optional string machine_type = 6;
+ */
+ java.lang.String getMachineType();
+ /**
+ *
+ * Full or partial URL of the machine type resource to use for this instance,
+ * in the format:
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/<var class="apiparam">machine-type</var></code>.
+ * This is provided by the client when the instance is created. For example,
+ * the following is a valid partial url to a
+ * <a href="/compute/docs/machine-types#predefined_machine_types">predefined machine type</a>:
+ * <code>zones/us-central1-f/machineTypes/n1-standard-1</code>
+ * To create a
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type">custom machine type</a>,
+ * provide a URL to a machine type in the following format, where
+ * <var class="apiparam">CPUS</var> is 1 or an even number up to 32
+ * (2, 4, 6, ... 24, etc), and <var class="apiparam">MEMORY</var> is the total
+ * memory for this instance. Memory must be a multiple of 256 MB and must
+ * be supplied in MB (e.g. 5 GB of memory is 5120 MB):
+ * <code>zones/<var class="apiparam">zone</var>/machineTypes/custom-<var class="apiparam">CPUS</var>-<var class="apiparam">MEMORY</var></code>
+ * For example: <code>zones/us-central1-f/machineTypes/custom-4-5120</code>
+ * For a full list of restrictions, read the
+ * <a href="/compute/docs/instances/creating-instance-with-custom-machine-type#specifications">Specifications</a>
+ * for custom machine types.
+ * @required compute.instances.insert
+ *
+ *
+ * optional string machine_type = 6;
+ */
+ com.google.protobuf.ByteString
+ getMachineTypeBytes();
+
+ /**
+ *
+ * [Output Only] The status of the instance. One of the
+ * following values: <code>PROVISIONING</code>, <code>STAGING</code>,
+ * <code>RUNNING</code>, <code>STOPPING</code>, <code>SUSPENDING</code>,
+ * <code>SUSPENDED</code>, and <code>TERMINATED</code>.
+ *
+ *
+ * optional .google.compute.v1.Instance.Status status = 9;
+ */
+ int getStatusValue();
+ /**
+ *
+ * [Output Only] The status of the instance. One of the
+ * following values: <code>PROVISIONING</code>, <code>STAGING</code>,
+ * <code>RUNNING</code>, <code>STOPPING</code>, <code>SUSPENDING</code>,
+ * <code>SUSPENDED</code>, and <code>TERMINATED</code>.
+ *
+ *
+ * optional .google.compute.v1.Instance.Status status = 9;
+ */
+ com.google.cloud.compute.v1.Instance.Status getStatus();
+
+ /**
+ *
+ * [Output Only] An optional, human-readable explanation of the status.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ java.lang.String getStatusMessage();
+ /**
+ *
+ * [Output Only] An optional, human-readable explanation of the status.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ com.google.protobuf.ByteString
+ getStatusMessageBytes();
+
+ /**
+ *
+ * [Output Only] URL of the zone where the instance resides.
+ *
+ *
+ * optional string zone = 11;
+ */
+ java.lang.String getZone();
+ /**
+ *
+ * [Output Only] URL of the zone where the instance resides.
+ *
+ *
+ * optional string zone = 11;
+ */
+ com.google.protobuf.ByteString
+ getZoneBytes();
+
+ /**
+ *
+ * Allows this instance to send and receive packets with non-matching
+ * destination or source IPs. This is required if you plan to use this
+ * instance to forward routes. For more information, see
+ * <a href="/compute/docs/networking#canipforward">Enabling IP Forwarding</a>.
+ *
+ *
+ * optional bool can_ip_forward = 12;
+ */
+ boolean getCanIpForward();
+
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ java.util.List
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ com.google.cloud.compute.v1.NetworkInterface getNetworkInterfaces(int index);
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ int getNetworkInterfacesCount();
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ java.util.List extends com.google.cloud.compute.v1.NetworkInterfaceOrBuilder>
+ getNetworkInterfacesOrBuilderList();
+ /**
+ *
+ * An array of configurations for this interface. This specifies how this
+ * interface is configured to interact with other network services, such as
+ * connecting to the internet. Only one interface is supported
+ * per instance.
+ *
+ *
+ * repeated .google.compute.v1.NetworkInterface network_interfaces = 13;
+ */
+ com.google.cloud.compute.v1.NetworkInterfaceOrBuilder getNetworkInterfacesOrBuilder(
+ int index);
+
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ java.util.List
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ com.google.cloud.compute.v1.AttachedDisk getDisks(int index);
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ int getDisksCount();
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ java.util.List extends com.google.cloud.compute.v1.AttachedDiskOrBuilder>
+ getDisksOrBuilderList();
+ /**
+ *
+ * Array of disks associated with this instance. Persistent disks must be
+ * created before you can assign them.
+ *
+ *
+ * repeated .google.compute.v1.AttachedDisk disks = 14;
+ */
+ com.google.cloud.compute.v1.AttachedDiskOrBuilder getDisksOrBuilder(
+ int index);
+
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ java.util.List
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ com.google.cloud.compute.v1.ServiceAccount getServiceAccounts(int index);
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ int getServiceAccountsCount();
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ java.util.List extends com.google.cloud.compute.v1.ServiceAccountOrBuilder>
+ getServiceAccountsOrBuilderList();
+ /**
+ *
+ * A list of service accounts, with their specified scopes, authorized for
+ * this instance. Only one service account per VM instance is supported.
+ * Service accounts generate access tokens that can be accessed
+ * through the metadata server and used to authenticate applications on the
+ * instance. See
+ * <a href="/compute/docs/access/service-accounts">Service Accounts</a>
+ * for more information.
+ *
+ *
+ * repeated .google.compute.v1.ServiceAccount service_accounts = 16;
+ */
+ com.google.cloud.compute.v1.ServiceAccountOrBuilder getServiceAccountsOrBuilder(
+ int index);
+
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 17;
+ */
+ java.lang.String getSelfLink();
+ /**
+ *
+ * [Output Only] Server-defined URL for this resource.
+ *
+ *
+ * optional string self_link = 17;
+ */
+ com.google.protobuf.ByteString
+ getSelfLinkBytes();
+
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ boolean hasScheduling();
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ com.google.cloud.compute.v1.Scheduling getScheduling();
+ /**
+ *
+ * Sets the scheduling options for this instance.
+ *
+ *
+ * optional .google.compute.v1.Scheduling scheduling = 18;
+ */
+ com.google.cloud.compute.v1.SchedulingOrBuilder getSchedulingOrBuilder();
+
+ /**
+ *
+ * [Output Only] The CPU platform used by this instance.
+ *
+ *
+ * optional string cpu_platform = 19;
+ */
+ java.lang.String getCpuPlatform();
+ /**
+ *
+ * [Output Only] The CPU platform used by this instance.
+ *
+ *
+ * optional string cpu_platform = 19;
+ */
+ com.google.protobuf.ByteString
+ getCpuPlatformBytes();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesAggregatedListRequest.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesAggregatedListRequest.java
new file mode 100644
index 000000000..ef1f638ac
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesAggregatedListRequest.java
@@ -0,0 +1,1315 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ * Protobuf type {@code google.compute.v1.InstancesAggregatedListRequest}
+ */
+public final class InstancesAggregatedListRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.InstancesAggregatedListRequest)
+ InstancesAggregatedListRequestOrBuilder {
+ // Use InstancesAggregatedListRequest.newBuilder() to construct.
+ private InstancesAggregatedListRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private InstancesAggregatedListRequest() {
+ maxResults_ = 0;
+ pageToken_ = "";
+ filter_ = "";
+ orderBy_ = "";
+ project_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private InstancesAggregatedListRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ project_ = s;
+ break;
+ }
+ case 32: {
+
+ maxResults_ = input.readUInt32();
+ break;
+ }
+ case 42: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ pageToken_ = s;
+ break;
+ }
+ case 50: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ filter_ = s;
+ break;
+ }
+ case 114: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ orderBy_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_InstancesAggregatedListRequest_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_InstancesAggregatedListRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.InstancesAggregatedListRequest.class, com.google.cloud.compute.v1.InstancesAggregatedListRequest.Builder.class);
+ }
+
+ public static final int MAX_RESULTS_FIELD_NUMBER = 4;
+ private int maxResults_;
+ /**
+ *
+ * The maximum number of results per page that should be returned.
+ * If the number of available results is larger than <code>maxResults</code>,
+ * Compute Engine returns a <code>nextPageToken</code> that can be used to get
+ * the next page of results in subsequent list requests. Acceptable values are
+ * <code>0</code> to <code>500</code>, inclusive. (Default: <code>500</code>)
+ *
+ *
+ * optional uint32 max_results = 4;
+ */
+ public int getMaxResults() {
+ return maxResults_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 5;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public com.google.protobuf.ByteString
+ getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FILTER_FIELD_NUMBER = 6;
+ private volatile java.lang.Object filter_;
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public com.google.protobuf.ByteString
+ getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ORDER_BY_FIELD_NUMBER = 14;
+ private volatile java.lang.Object orderBy_;
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public java.lang.String getOrderBy() {
+ java.lang.Object ref = orderBy_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ orderBy_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public com.google.protobuf.ByteString
+ getOrderByBytes() {
+ java.lang.Object ref = orderBy_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ orderBy_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROJECT_FIELD_NUMBER = 2;
+ private volatile java.lang.Object project_;
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public com.google.protobuf.ByteString
+ getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getProjectBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_);
+ }
+ if (maxResults_ != 0) {
+ output.writeUInt32(4, maxResults_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, filter_);
+ }
+ if (!getOrderByBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 14, orderBy_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getProjectBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_);
+ }
+ if (maxResults_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(4, maxResults_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, filter_);
+ }
+ if (!getOrderByBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, orderBy_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.InstancesAggregatedListRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.InstancesAggregatedListRequest other = (com.google.cloud.compute.v1.InstancesAggregatedListRequest) obj;
+
+ boolean result = true;
+ result = result && (getMaxResults()
+ == other.getMaxResults());
+ result = result && getPageToken()
+ .equals(other.getPageToken());
+ result = result && getFilter()
+ .equals(other.getFilter());
+ result = result && getOrderBy()
+ .equals(other.getOrderBy());
+ result = result && getProject()
+ .equals(other.getProject());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getMaxResults();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (37 * hash) + FILTER_FIELD_NUMBER;
+ hash = (53 * hash) + getFilter().hashCode();
+ hash = (37 * hash) + ORDER_BY_FIELD_NUMBER;
+ hash = (53 * hash) + getOrderBy().hashCode();
+ hash = (37 * hash) + PROJECT_FIELD_NUMBER;
+ hash = (53 * hash) + getProject().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.InstancesAggregatedListRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code google.compute.v1.InstancesAggregatedListRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * The maximum number of results per page that should be returned.
+ * If the number of available results is larger than <code>maxResults</code>,
+ * Compute Engine returns a <code>nextPageToken</code> that can be used to get
+ * the next page of results in subsequent list requests. Acceptable values are
+ * <code>0</code> to <code>500</code>, inclusive. (Default: <code>500</code>)
+ *
+ *
+ * optional uint32 max_results = 4;
+ */
+ public int getMaxResults() {
+ return maxResults_;
+ }
+ /**
+ *
+ * The maximum number of results per page that should be returned.
+ * If the number of available results is larger than <code>maxResults</code>,
+ * Compute Engine returns a <code>nextPageToken</code> that can be used to get
+ * the next page of results in subsequent list requests. Acceptable values are
+ * <code>0</code> to <code>500</code>, inclusive. (Default: <code>500</code>)
+ *
+ *
+ * optional uint32 max_results = 4;
+ */
+ public Builder setMaxResults(int value) {
+
+ maxResults_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The maximum number of results per page that should be returned.
+ * If the number of available results is larger than <code>maxResults</code>,
+ * Compute Engine returns a <code>nextPageToken</code> that can be used to get
+ * the next page of results in subsequent list requests. Acceptable values are
+ * <code>0</code> to <code>500</code>, inclusive. (Default: <code>500</code>)
+ *
+ *
+ * optional uint32 max_results = 4;
+ */
+ public Builder clearMaxResults() {
+
+ maxResults_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public com.google.protobuf.ByteString
+ getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public Builder setPageToken(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public Builder setPageTokenBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object filter_ = "";
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public com.google.protobuf.ByteString
+ getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public Builder setFilter(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public Builder clearFilter() {
+
+ filter_ = getDefaultInstance().getFilter();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public Builder setFilterBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object orderBy_ = "";
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public java.lang.String getOrderBy() {
+ java.lang.Object ref = orderBy_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ orderBy_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public com.google.protobuf.ByteString
+ getOrderByBytes() {
+ java.lang.Object ref = orderBy_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ orderBy_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public Builder setOrderBy(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ orderBy_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public Builder clearOrderBy() {
+
+ orderBy_ = getDefaultInstance().getOrderBy();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public Builder setOrderByBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ orderBy_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object project_ = "";
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public com.google.protobuf.ByteString
+ getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder setProject(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder clearProject() {
+
+ project_ = getDefaultInstance().getProject();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder setProjectBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.InstancesAggregatedListRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.InstancesAggregatedListRequest)
+ private static final com.google.cloud.compute.v1.InstancesAggregatedListRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstancesAggregatedListRequest();
+ }
+
+ public static com.google.cloud.compute.v1.InstancesAggregatedListRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * The maximum number of results per page that should be returned.
+ * If the number of available results is larger than <code>maxResults</code>,
+ * Compute Engine returns a <code>nextPageToken</code> that can be used to get
+ * the next page of results in subsequent list requests. Acceptable values are
+ * <code>0</code> to <code>500</code>, inclusive. (Default: <code>500</code>)
+ *
+ *
+ * optional uint32 max_results = 4;
+ */
+ int getMaxResults();
+
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ com.google.protobuf.ByteString
+ getPageTokenBytes();
+
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ java.lang.String getFilter();
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ com.google.protobuf.ByteString
+ getFilterBytes();
+
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ java.lang.String getOrderBy();
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ com.google.protobuf.ByteString
+ getOrderByBytes();
+
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ java.lang.String getProject();
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ com.google.protobuf.ByteString
+ getProjectBytes();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesDeleteRequest.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesDeleteRequest.java
new file mode 100644
index 000000000..dd02d6e20
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesDeleteRequest.java
@@ -0,0 +1,832 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ * Protobuf type {@code google.compute.v1.InstancesDeleteRequest}
+ */
+public final class InstancesDeleteRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.InstancesDeleteRequest)
+ InstancesDeleteRequestOrBuilder {
+ // Use InstancesDeleteRequest.newBuilder() to construct.
+ private InstancesDeleteRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private InstancesDeleteRequest() {
+ project_ = "";
+ zone_ = "";
+ instance_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private InstancesDeleteRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ project_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ zone_ = s;
+ break;
+ }
+ case 34: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ instance_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_InstancesDeleteRequest_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_InstancesDeleteRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.InstancesDeleteRequest.class, com.google.cloud.compute.v1.InstancesDeleteRequest.Builder.class);
+ }
+
+ public static final int PROJECT_FIELD_NUMBER = 2;
+ private volatile java.lang.Object project_;
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public com.google.protobuf.ByteString
+ getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ZONE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object zone_;
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int INSTANCE_FIELD_NUMBER = 4;
+ private volatile java.lang.Object instance_;
+ /**
+ *
+ * Name of the instance resource to delete.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public java.lang.String getInstance() {
+ java.lang.Object ref = instance_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ instance_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Name of the instance resource to delete.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public com.google.protobuf.ByteString
+ getInstanceBytes() {
+ java.lang.Object ref = instance_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ instance_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getProjectBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, zone_);
+ }
+ if (!getInstanceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, instance_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getProjectBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, zone_);
+ }
+ if (!getInstanceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, instance_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.InstancesDeleteRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.InstancesDeleteRequest other = (com.google.cloud.compute.v1.InstancesDeleteRequest) obj;
+
+ boolean result = true;
+ result = result && getProject()
+ .equals(other.getProject());
+ result = result && getZone()
+ .equals(other.getZone());
+ result = result && getInstance()
+ .equals(other.getInstance());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + PROJECT_FIELD_NUMBER;
+ hash = (53 * hash) + getProject().hashCode();
+ hash = (37 * hash) + ZONE_FIELD_NUMBER;
+ hash = (53 * hash) + getZone().hashCode();
+ hash = (37 * hash) + INSTANCE_FIELD_NUMBER;
+ hash = (53 * hash) + getInstance().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.InstancesDeleteRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code google.compute.v1.InstancesDeleteRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public com.google.protobuf.ByteString
+ getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder setProject(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder clearProject() {
+
+ project_ = getDefaultInstance().getProject();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder setProjectBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object zone_ = "";
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder setZone(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder clearZone() {
+
+ zone_ = getDefaultInstance().getZone();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder setZoneBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object instance_ = "";
+ /**
+ *
+ * Name of the instance resource to delete.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public java.lang.String getInstance() {
+ java.lang.Object ref = instance_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ instance_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Name of the instance resource to delete.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public com.google.protobuf.ByteString
+ getInstanceBytes() {
+ java.lang.Object ref = instance_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ instance_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Name of the instance resource to delete.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public Builder setInstance(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ instance_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Name of the instance resource to delete.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public Builder clearInstance() {
+
+ instance_ = getDefaultInstance().getInstance();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Name of the instance resource to delete.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public Builder setInstanceBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ instance_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.InstancesDeleteRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.InstancesDeleteRequest)
+ private static final com.google.cloud.compute.v1.InstancesDeleteRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstancesDeleteRequest();
+ }
+
+ public static com.google.cloud.compute.v1.InstancesDeleteRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ java.lang.String getProject();
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ com.google.protobuf.ByteString
+ getProjectBytes();
+
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ java.lang.String getZone();
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ com.google.protobuf.ByteString
+ getZoneBytes();
+
+ /**
+ *
+ * Name of the instance resource to delete.
+ *
+ *
+ * optional string instance = 4;
+ */
+ java.lang.String getInstance();
+ /**
+ *
+ * Name of the instance resource to delete.
+ *
+ *
+ * optional string instance = 4;
+ */
+ com.google.protobuf.ByteString
+ getInstanceBytes();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetRequest.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetRequest.java
new file mode 100644
index 000000000..5783ff7a8
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesGetRequest.java
@@ -0,0 +1,832 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ * Protobuf type {@code google.compute.v1.InstancesGetRequest}
+ */
+public final class InstancesGetRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.InstancesGetRequest)
+ InstancesGetRequestOrBuilder {
+ // Use InstancesGetRequest.newBuilder() to construct.
+ private InstancesGetRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private InstancesGetRequest() {
+ project_ = "";
+ zone_ = "";
+ instance_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private InstancesGetRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ project_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ zone_ = s;
+ break;
+ }
+ case 34: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ instance_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_InstancesGetRequest_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_InstancesGetRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.InstancesGetRequest.class, com.google.cloud.compute.v1.InstancesGetRequest.Builder.class);
+ }
+
+ public static final int PROJECT_FIELD_NUMBER = 2;
+ private volatile java.lang.Object project_;
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public com.google.protobuf.ByteString
+ getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ZONE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object zone_;
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int INSTANCE_FIELD_NUMBER = 4;
+ private volatile java.lang.Object instance_;
+ /**
+ *
+ * Name of the instance resource to return.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public java.lang.String getInstance() {
+ java.lang.Object ref = instance_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ instance_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Name of the instance resource to return.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public com.google.protobuf.ByteString
+ getInstanceBytes() {
+ java.lang.Object ref = instance_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ instance_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getProjectBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, zone_);
+ }
+ if (!getInstanceBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, instance_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getProjectBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, zone_);
+ }
+ if (!getInstanceBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, instance_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.InstancesGetRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.InstancesGetRequest other = (com.google.cloud.compute.v1.InstancesGetRequest) obj;
+
+ boolean result = true;
+ result = result && getProject()
+ .equals(other.getProject());
+ result = result && getZone()
+ .equals(other.getZone());
+ result = result && getInstance()
+ .equals(other.getInstance());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + PROJECT_FIELD_NUMBER;
+ hash = (53 * hash) + getProject().hashCode();
+ hash = (37 * hash) + ZONE_FIELD_NUMBER;
+ hash = (53 * hash) + getZone().hashCode();
+ hash = (37 * hash) + INSTANCE_FIELD_NUMBER;
+ hash = (53 * hash) + getInstance().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.InstancesGetRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesGetRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesGetRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesGetRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesGetRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesGetRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesGetRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesGetRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesGetRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesGetRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.InstancesGetRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code google.compute.v1.InstancesGetRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public com.google.protobuf.ByteString
+ getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder setProject(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder clearProject() {
+
+ project_ = getDefaultInstance().getProject();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder setProjectBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object zone_ = "";
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder setZone(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder clearZone() {
+
+ zone_ = getDefaultInstance().getZone();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder setZoneBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object instance_ = "";
+ /**
+ *
+ * Name of the instance resource to return.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public java.lang.String getInstance() {
+ java.lang.Object ref = instance_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ instance_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Name of the instance resource to return.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public com.google.protobuf.ByteString
+ getInstanceBytes() {
+ java.lang.Object ref = instance_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ instance_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Name of the instance resource to return.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public Builder setInstance(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ instance_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Name of the instance resource to return.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public Builder clearInstance() {
+
+ instance_ = getDefaultInstance().getInstance();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Name of the instance resource to return.
+ *
+ *
+ * optional string instance = 4;
+ */
+ public Builder setInstanceBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ instance_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.InstancesGetRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.InstancesGetRequest)
+ private static final com.google.cloud.compute.v1.InstancesGetRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstancesGetRequest();
+ }
+
+ public static com.google.cloud.compute.v1.InstancesGetRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ java.lang.String getProject();
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ com.google.protobuf.ByteString
+ getProjectBytes();
+
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ java.lang.String getZone();
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ com.google.protobuf.ByteString
+ getZoneBytes();
+
+ /**
+ *
+ * Name of the instance resource to return.
+ *
+ *
+ * optional string instance = 4;
+ */
+ java.lang.String getInstance();
+ /**
+ *
+ * Name of the instance resource to return.
+ *
+ *
+ * optional string instance = 4;
+ */
+ com.google.protobuf.ByteString
+ getInstanceBytes();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesInsertRequest.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesInsertRequest.java
new file mode 100644
index 000000000..ef99e4fe8
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesInsertRequest.java
@@ -0,0 +1,858 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ * Protobuf type {@code google.compute.v1.InstancesInsertRequest}
+ */
+public final class InstancesInsertRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.InstancesInsertRequest)
+ InstancesInsertRequestOrBuilder {
+ // Use InstancesInsertRequest.newBuilder() to construct.
+ private InstancesInsertRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private InstancesInsertRequest() {
+ project_ = "";
+ zone_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private InstancesInsertRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ project_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ zone_ = s;
+ break;
+ }
+ case 34: {
+ com.google.cloud.compute.v1.Instance.Builder subBuilder = null;
+ if (resource_ != null) {
+ subBuilder = resource_.toBuilder();
+ }
+ resource_ = input.readMessage(com.google.cloud.compute.v1.Instance.parser(), extensionRegistry);
+ if (subBuilder != null) {
+ subBuilder.mergeFrom(resource_);
+ resource_ = subBuilder.buildPartial();
+ }
+
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_InstancesInsertRequest_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_InstancesInsertRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.InstancesInsertRequest.class, com.google.cloud.compute.v1.InstancesInsertRequest.Builder.class);
+ }
+
+ public static final int PROJECT_FIELD_NUMBER = 2;
+ private volatile java.lang.Object project_;
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public com.google.protobuf.ByteString
+ getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ZONE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object zone_;
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int RESOURCE_FIELD_NUMBER = 4;
+ private com.google.cloud.compute.v1.Instance resource_;
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public boolean hasResource() {
+ return resource_ != null;
+ }
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public com.google.cloud.compute.v1.Instance getResource() {
+ return resource_ == null ? com.google.cloud.compute.v1.Instance.getDefaultInstance() : resource_;
+ }
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public com.google.cloud.compute.v1.InstanceOrBuilder getResourceOrBuilder() {
+ return getResource();
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getProjectBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, zone_);
+ }
+ if (resource_ != null) {
+ output.writeMessage(4, getResource());
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getProjectBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, zone_);
+ }
+ if (resource_ != null) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, getResource());
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.InstancesInsertRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.InstancesInsertRequest other = (com.google.cloud.compute.v1.InstancesInsertRequest) obj;
+
+ boolean result = true;
+ result = result && getProject()
+ .equals(other.getProject());
+ result = result && getZone()
+ .equals(other.getZone());
+ result = result && (hasResource() == other.hasResource());
+ if (hasResource()) {
+ result = result && getResource()
+ .equals(other.getResource());
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + PROJECT_FIELD_NUMBER;
+ hash = (53 * hash) + getProject().hashCode();
+ hash = (37 * hash) + ZONE_FIELD_NUMBER;
+ hash = (53 * hash) + getZone().hashCode();
+ if (hasResource()) {
+ hash = (37 * hash) + RESOURCE_FIELD_NUMBER;
+ hash = (53 * hash) + getResource().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.InstancesInsertRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesInsertRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesInsertRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesInsertRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesInsertRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesInsertRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesInsertRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesInsertRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesInsertRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesInsertRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.InstancesInsertRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code google.compute.v1.InstancesInsertRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public com.google.protobuf.ByteString
+ getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder setProject(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder clearProject() {
+
+ project_ = getDefaultInstance().getProject();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder setProjectBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object zone_ = "";
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder setZone(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder clearZone() {
+
+ zone_ = getDefaultInstance().getZone();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder setZoneBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.cloud.compute.v1.Instance resource_ = null;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.Instance, com.google.cloud.compute.v1.Instance.Builder, com.google.cloud.compute.v1.InstanceOrBuilder> resourceBuilder_;
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public boolean hasResource() {
+ return resourceBuilder_ != null || resource_ != null;
+ }
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public com.google.cloud.compute.v1.Instance getResource() {
+ if (resourceBuilder_ == null) {
+ return resource_ == null ? com.google.cloud.compute.v1.Instance.getDefaultInstance() : resource_;
+ } else {
+ return resourceBuilder_.getMessage();
+ }
+ }
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public Builder setResource(com.google.cloud.compute.v1.Instance value) {
+ if (resourceBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ resource_ = value;
+ onChanged();
+ } else {
+ resourceBuilder_.setMessage(value);
+ }
+
+ return this;
+ }
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public Builder setResource(
+ com.google.cloud.compute.v1.Instance.Builder builderForValue) {
+ if (resourceBuilder_ == null) {
+ resource_ = builderForValue.build();
+ onChanged();
+ } else {
+ resourceBuilder_.setMessage(builderForValue.build());
+ }
+
+ return this;
+ }
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public Builder mergeResource(com.google.cloud.compute.v1.Instance value) {
+ if (resourceBuilder_ == null) {
+ if (resource_ != null) {
+ resource_ =
+ com.google.cloud.compute.v1.Instance.newBuilder(resource_).mergeFrom(value).buildPartial();
+ } else {
+ resource_ = value;
+ }
+ onChanged();
+ } else {
+ resourceBuilder_.mergeFrom(value);
+ }
+
+ return this;
+ }
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public Builder clearResource() {
+ if (resourceBuilder_ == null) {
+ resource_ = null;
+ onChanged();
+ } else {
+ resource_ = null;
+ resourceBuilder_ = null;
+ }
+
+ return this;
+ }
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public com.google.cloud.compute.v1.Instance.Builder getResourceBuilder() {
+
+ onChanged();
+ return getResourceFieldBuilder().getBuilder();
+ }
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ public com.google.cloud.compute.v1.InstanceOrBuilder getResourceOrBuilder() {
+ if (resourceBuilder_ != null) {
+ return resourceBuilder_.getMessageOrBuilder();
+ } else {
+ return resource_ == null ?
+ com.google.cloud.compute.v1.Instance.getDefaultInstance() : resource_;
+ }
+ }
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.Instance, com.google.cloud.compute.v1.Instance.Builder, com.google.cloud.compute.v1.InstanceOrBuilder>
+ getResourceFieldBuilder() {
+ if (resourceBuilder_ == null) {
+ resourceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.cloud.compute.v1.Instance, com.google.cloud.compute.v1.Instance.Builder, com.google.cloud.compute.v1.InstanceOrBuilder>(
+ getResource(),
+ getParentForChildren(),
+ isClean());
+ resource_ = null;
+ }
+ return resourceBuilder_;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.InstancesInsertRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.InstancesInsertRequest)
+ private static final com.google.cloud.compute.v1.InstancesInsertRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstancesInsertRequest();
+ }
+
+ public static com.google.cloud.compute.v1.InstancesInsertRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ java.lang.String getProject();
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ com.google.protobuf.ByteString
+ getProjectBytes();
+
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ java.lang.String getZone();
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ com.google.protobuf.ByteString
+ getZoneBytes();
+
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ boolean hasResource();
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ com.google.cloud.compute.v1.Instance getResource();
+ /**
+ * optional .google.compute.v1.Instance resource = 4;
+ */
+ com.google.cloud.compute.v1.InstanceOrBuilder getResourceOrBuilder();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesListRequest.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesListRequest.java
new file mode 100644
index 000000000..6d3c65a87
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesListRequest.java
@@ -0,0 +1,1470 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ * Protobuf type {@code google.compute.v1.InstancesListRequest}
+ */
+public final class InstancesListRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.InstancesListRequest)
+ InstancesListRequestOrBuilder {
+ // Use InstancesListRequest.newBuilder() to construct.
+ private InstancesListRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private InstancesListRequest() {
+ maxResults_ = 0;
+ pageToken_ = "";
+ filter_ = "";
+ orderBy_ = "";
+ project_ = "";
+ zone_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private InstancesListRequest(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ project_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ zone_ = s;
+ break;
+ }
+ case 32: {
+
+ maxResults_ = input.readUInt32();
+ break;
+ }
+ case 42: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ pageToken_ = s;
+ break;
+ }
+ case 50: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ filter_ = s;
+ break;
+ }
+ case 114: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ orderBy_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_InstancesListRequest_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_InstancesListRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.InstancesListRequest.class, com.google.cloud.compute.v1.InstancesListRequest.Builder.class);
+ }
+
+ public static final int MAX_RESULTS_FIELD_NUMBER = 4;
+ private int maxResults_;
+ /**
+ *
+ * The maximum number of results per page that should be returned.
+ * If the number of available results is larger than <code>maxResults</code>,
+ * Compute Engine returns a <code>nextPageToken</code> that can be used to get
+ * the next page of results in subsequent list requests. Acceptable values are
+ * <code>0</code> to <code>500</code>, inclusive. (Default: <code>500</code>)
+ *
+ *
+ * optional uint32 max_results = 4;
+ */
+ public int getMaxResults() {
+ return maxResults_;
+ }
+
+ public static final int PAGE_TOKEN_FIELD_NUMBER = 5;
+ private volatile java.lang.Object pageToken_;
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public com.google.protobuf.ByteString
+ getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int FILTER_FIELD_NUMBER = 6;
+ private volatile java.lang.Object filter_;
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public com.google.protobuf.ByteString
+ getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ORDER_BY_FIELD_NUMBER = 14;
+ private volatile java.lang.Object orderBy_;
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public java.lang.String getOrderBy() {
+ java.lang.Object ref = orderBy_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ orderBy_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public com.google.protobuf.ByteString
+ getOrderByBytes() {
+ java.lang.Object ref = orderBy_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ orderBy_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROJECT_FIELD_NUMBER = 2;
+ private volatile java.lang.Object project_;
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public com.google.protobuf.ByteString
+ getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ZONE_FIELD_NUMBER = 3;
+ private volatile java.lang.Object zone_;
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getProjectBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, project_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, zone_);
+ }
+ if (maxResults_ != 0) {
+ output.writeUInt32(4, maxResults_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, filter_);
+ }
+ if (!getOrderByBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 14, orderBy_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getProjectBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, project_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, zone_);
+ }
+ if (maxResults_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeUInt32Size(4, maxResults_);
+ }
+ if (!getPageTokenBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_);
+ }
+ if (!getFilterBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, filter_);
+ }
+ if (!getOrderByBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, orderBy_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.InstancesListRequest)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.InstancesListRequest other = (com.google.cloud.compute.v1.InstancesListRequest) obj;
+
+ boolean result = true;
+ result = result && (getMaxResults()
+ == other.getMaxResults());
+ result = result && getPageToken()
+ .equals(other.getPageToken());
+ result = result && getFilter()
+ .equals(other.getFilter());
+ result = result && getOrderBy()
+ .equals(other.getOrderBy());
+ result = result && getProject()
+ .equals(other.getProject());
+ result = result && getZone()
+ .equals(other.getZone());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + MAX_RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getMaxResults();
+ hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPageToken().hashCode();
+ hash = (37 * hash) + FILTER_FIELD_NUMBER;
+ hash = (53 * hash) + getFilter().hashCode();
+ hash = (37 * hash) + ORDER_BY_FIELD_NUMBER;
+ hash = (53 * hash) + getOrderBy().hashCode();
+ hash = (37 * hash) + PROJECT_FIELD_NUMBER;
+ hash = (53 * hash) + getProject().hashCode();
+ hash = (37 * hash) + ZONE_FIELD_NUMBER;
+ hash = (53 * hash) + getZone().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.InstancesListRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesListRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesListRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesListRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesListRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesListRequest parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesListRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesListRequest parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesListRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesListRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.InstancesListRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code google.compute.v1.InstancesListRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * The maximum number of results per page that should be returned.
+ * If the number of available results is larger than <code>maxResults</code>,
+ * Compute Engine returns a <code>nextPageToken</code> that can be used to get
+ * the next page of results in subsequent list requests. Acceptable values are
+ * <code>0</code> to <code>500</code>, inclusive. (Default: <code>500</code>)
+ *
+ *
+ * optional uint32 max_results = 4;
+ */
+ public int getMaxResults() {
+ return maxResults_;
+ }
+ /**
+ *
+ * The maximum number of results per page that should be returned.
+ * If the number of available results is larger than <code>maxResults</code>,
+ * Compute Engine returns a <code>nextPageToken</code> that can be used to get
+ * the next page of results in subsequent list requests. Acceptable values are
+ * <code>0</code> to <code>500</code>, inclusive. (Default: <code>500</code>)
+ *
+ *
+ * optional uint32 max_results = 4;
+ */
+ public Builder setMaxResults(int value) {
+
+ maxResults_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The maximum number of results per page that should be returned.
+ * If the number of available results is larger than <code>maxResults</code>,
+ * Compute Engine returns a <code>nextPageToken</code> that can be used to get
+ * the next page of results in subsequent list requests. Acceptable values are
+ * <code>0</code> to <code>500</code>, inclusive. (Default: <code>500</code>)
+ *
+ *
+ * optional uint32 max_results = 4;
+ */
+ public Builder clearMaxResults() {
+
+ maxResults_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object pageToken_ = "";
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public java.lang.String getPageToken() {
+ java.lang.Object ref = pageToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ pageToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public com.google.protobuf.ByteString
+ getPageTokenBytes() {
+ java.lang.Object ref = pageToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ pageToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public Builder setPageToken(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public Builder clearPageToken() {
+
+ pageToken_ = getDefaultInstance().getPageToken();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ public Builder setPageTokenBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ pageToken_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object filter_ = "";
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public java.lang.String getFilter() {
+ java.lang.Object ref = filter_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ filter_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public com.google.protobuf.ByteString
+ getFilterBytes() {
+ java.lang.Object ref = filter_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ filter_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public Builder setFilter(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public Builder clearFilter() {
+
+ filter_ = getDefaultInstance().getFilter();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ public Builder setFilterBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ filter_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object orderBy_ = "";
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public java.lang.String getOrderBy() {
+ java.lang.Object ref = orderBy_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ orderBy_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public com.google.protobuf.ByteString
+ getOrderByBytes() {
+ java.lang.Object ref = orderBy_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ orderBy_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public Builder setOrderBy(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ orderBy_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public Builder clearOrderBy() {
+
+ orderBy_ = getDefaultInstance().getOrderBy();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ public Builder setOrderByBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ orderBy_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object project_ = "";
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public java.lang.String getProject() {
+ java.lang.Object ref = project_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ project_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public com.google.protobuf.ByteString
+ getProjectBytes() {
+ java.lang.Object ref = project_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ project_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder setProject(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder clearProject() {
+
+ project_ = getDefaultInstance().getProject();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ public Builder setProjectBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ project_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object zone_ = "";
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder setZone(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder clearZone() {
+
+ zone_ = getDefaultInstance().getZone();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ public Builder setZoneBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.InstancesListRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.InstancesListRequest)
+ private static final com.google.cloud.compute.v1.InstancesListRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.InstancesListRequest();
+ }
+
+ public static com.google.cloud.compute.v1.InstancesListRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * The maximum number of results per page that should be returned.
+ * If the number of available results is larger than <code>maxResults</code>,
+ * Compute Engine returns a <code>nextPageToken</code> that can be used to get
+ * the next page of results in subsequent list requests. Acceptable values are
+ * <code>0</code> to <code>500</code>, inclusive. (Default: <code>500</code>)
+ *
+ *
+ * optional uint32 max_results = 4;
+ */
+ int getMaxResults();
+
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ java.lang.String getPageToken();
+ /**
+ *
+ * Specifies a page token to use. Set <code>pageToken</code> to the
+ * <code>nextPageToken</code> returned by a previous list request to get
+ * the next page of results.
+ *
+ *
+ * optional string page_token = 5;
+ */
+ com.google.protobuf.ByteString
+ getPageTokenBytes();
+
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ java.lang.String getFilter();
+ /**
+ *
+ * Sets a filter expression for filtering listed resources, in the form
+ * <code>filter={expression}</code>. Your <code>{expression}</code> must
+ * be in the format: <code>field_name comparison_string literal_string</code>.
+ * The <code>field_name</code> is the name of the field you want to compare.
+ * Only atomic field types are supported (string, number, boolean). The
+ * <code>comparison_string</code> must be either <code>eq</code> (equals) or
+ * <code>ne</code> (not equals). The <code>literal_string</code> is the string
+ * value to filter to. The literal value must be valid for the type of field
+ * you are filtering by (string, number, boolean). For string fields, the
+ * literal value is interpreted as a regular expression
+ * using <a href="https://github.com/google/re2" target="_blank">RE2</a>
+ * syntax. The literal value must match the entire field.
+ * For example, to filter for instances that do not have a name of
+ * <code>example-instance</code>, you would use
+ * <code>filter=name ne example-instance</code>.
+ * You can filter on nested fields. For example, you could filter on
+ * instances that have set the <code>scheduling.automaticRestart</code> field
+ * to <code>true</code>. Use filtering on nested fields to take advantage of
+ * <a href="/compute/docs/label-or-tag-resources">labels</a>
+ * to organize and search for results based on label values.
+ * To filter on multiple expressions, provide each separate expression within
+ * parentheses. For example,
+ * <code>(scheduling.automaticRestart eq true) (zone eq us-central1-f)</code>.
+ * Multiple expressions are treated as <code>AND</code> expressions, meaning
+ * that resources must match all expressions to pass the filters.
+ *
+ *
+ * optional string filter = 6;
+ */
+ com.google.protobuf.ByteString
+ getFilterBytes();
+
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ java.lang.String getOrderBy();
+ /**
+ *
+ * Sorts list results by a certain order. By default, results
+ * are returned in alphanumerical order based on the resource name.
+ * You can also sort results in descending order based on the creation timestamp
+ * using <code>orderBy="creationTimestamp desc"</code>. This sorts
+ * results based on the <code>creationTimestamp</code> field in
+ * reverse chronological order (newest result first). Use this to sort resources
+ * like operations so that the newest operation is returned first.
+ * Currently, only sorting by <code>name</code> or
+ * <code>creationTimestamp desc</code> is supported.
+ *
+ *
+ * optional string order_by = 14;
+ */
+ com.google.protobuf.ByteString
+ getOrderByBytes();
+
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ java.lang.String getProject();
+ /**
+ *
+ * Project ID for this request.
+ *
+ *
+ * optional string project = 2;
+ */
+ com.google.protobuf.ByteString
+ getProjectBytes();
+
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ java.lang.String getZone();
+ /**
+ *
+ * The name of the zone for this request.
+ *
+ *
+ * optional string zone = 3;
+ */
+ com.google.protobuf.ByteString
+ getZoneBytes();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesScopedList.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesScopedList.java
new file mode 100644
index 000000000..dd81a2626
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesScopedList.java
@@ -0,0 +1,804 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ * Protobuf type {@code google.compute.v1.InstancesScopedList}
+ */
+public final class InstancesScopedList extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.InstancesScopedList)
+ InstancesScopedListOrBuilder {
+ // Use InstancesScopedList.newBuilder() to construct.
+ private InstancesScopedList(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private InstancesScopedList() {
+ instances_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private InstancesScopedList(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 18: {
+ if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ instances_ = new java.util.ArrayList
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public java.util.List
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.InstanceOrBuilder>
+ getInstancesOrBuilderList() {
+ return instances_;
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public int getInstancesCount() {
+ return instances_.size();
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public com.google.cloud.compute.v1.Instance getInstances(int index) {
+ return instances_.get(index);
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public com.google.cloud.compute.v1.InstanceOrBuilder getInstancesOrBuilder(
+ int index) {
+ return instances_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ for (int i = 0; i < instances_.size(); i++) {
+ output.writeMessage(2, instances_.get(i));
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < instances_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(2, instances_.get(i));
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.InstancesScopedList)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.InstancesScopedList other = (com.google.cloud.compute.v1.InstancesScopedList) obj;
+
+ boolean result = true;
+ result = result && getInstancesList()
+ .equals(other.getInstancesList());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ if (getInstancesCount() > 0) {
+ hash = (37 * hash) + INSTANCES_FIELD_NUMBER;
+ hash = (53 * hash) + getInstancesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.InstancesScopedList parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesScopedList parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesScopedList parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.InstancesScopedList parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesScopedList parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesScopedList parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesScopedList parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesScopedList parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.InstancesScopedList parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.InstancesScopedList parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.InstancesScopedList prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * Protobuf type {@code google.compute.v1.InstancesScopedList}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public java.util.List
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public int getInstancesCount() {
+ if (instancesBuilder_ == null) {
+ return instances_.size();
+ } else {
+ return instancesBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public com.google.cloud.compute.v1.Instance getInstances(int index) {
+ if (instancesBuilder_ == null) {
+ return instances_.get(index);
+ } else {
+ return instancesBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public Builder setInstances(
+ int index, com.google.cloud.compute.v1.Instance value) {
+ if (instancesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInstancesIsMutable();
+ instances_.set(index, value);
+ onChanged();
+ } else {
+ instancesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public Builder setInstances(
+ int index, com.google.cloud.compute.v1.Instance.Builder builderForValue) {
+ if (instancesBuilder_ == null) {
+ ensureInstancesIsMutable();
+ instances_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ instancesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public Builder addInstances(com.google.cloud.compute.v1.Instance value) {
+ if (instancesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInstancesIsMutable();
+ instances_.add(value);
+ onChanged();
+ } else {
+ instancesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public Builder addInstances(
+ int index, com.google.cloud.compute.v1.Instance value) {
+ if (instancesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureInstancesIsMutable();
+ instances_.add(index, value);
+ onChanged();
+ } else {
+ instancesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public Builder addInstances(
+ com.google.cloud.compute.v1.Instance.Builder builderForValue) {
+ if (instancesBuilder_ == null) {
+ ensureInstancesIsMutable();
+ instances_.add(builderForValue.build());
+ onChanged();
+ } else {
+ instancesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public Builder addInstances(
+ int index, com.google.cloud.compute.v1.Instance.Builder builderForValue) {
+ if (instancesBuilder_ == null) {
+ ensureInstancesIsMutable();
+ instances_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ instancesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public Builder addAllInstances(
+ java.lang.Iterable extends com.google.cloud.compute.v1.Instance> values) {
+ if (instancesBuilder_ == null) {
+ ensureInstancesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, instances_);
+ onChanged();
+ } else {
+ instancesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public Builder clearInstances() {
+ if (instancesBuilder_ == null) {
+ instances_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ instancesBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public Builder removeInstances(int index) {
+ if (instancesBuilder_ == null) {
+ ensureInstancesIsMutable();
+ instances_.remove(index);
+ onChanged();
+ } else {
+ instancesBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public com.google.cloud.compute.v1.Instance.Builder getInstancesBuilder(
+ int index) {
+ return getInstancesFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public com.google.cloud.compute.v1.InstanceOrBuilder getInstancesOrBuilder(
+ int index) {
+ if (instancesBuilder_ == null) {
+ return instances_.get(index); } else {
+ return instancesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.InstanceOrBuilder>
+ getInstancesOrBuilderList() {
+ if (instancesBuilder_ != null) {
+ return instancesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(instances_);
+ }
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public com.google.cloud.compute.v1.Instance.Builder addInstancesBuilder() {
+ return getInstancesFieldBuilder().addBuilder(
+ com.google.cloud.compute.v1.Instance.getDefaultInstance());
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public com.google.cloud.compute.v1.Instance.Builder addInstancesBuilder(
+ int index) {
+ return getInstancesFieldBuilder().addBuilder(
+ index, com.google.cloud.compute.v1.Instance.getDefaultInstance());
+ }
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ public java.util.List
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ java.util.List
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ com.google.cloud.compute.v1.Instance getInstances(int index);
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ int getInstancesCount();
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ java.util.List extends com.google.cloud.compute.v1.InstanceOrBuilder>
+ getInstancesOrBuilderList();
+ /**
+ *
+ * [Output Only] List of instances contained in this scope.
+ *
+ *
+ * repeated .google.compute.v1.Instance instances = 2;
+ */
+ com.google.cloud.compute.v1.InstanceOrBuilder getInstancesOrBuilder(
+ int index);
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesServiceGrpc.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesServiceGrpc.java
new file mode 100644
index 000000000..1e5bd8adb
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/InstancesServiceGrpc.java
@@ -0,0 +1,431 @@
+package com.google.cloud.compute.v1;
+
+import static io.grpc.stub.ClientCalls.asyncUnaryCall;
+import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
+import static io.grpc.stub.ClientCalls.blockingUnaryCall;
+import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
+import static io.grpc.stub.ClientCalls.futureUnaryCall;
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+import static io.grpc.stub.ServerCalls.asyncUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
+
+/**
+ */
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler (version 1.0.1)",
+ comments = "Source: google/compute/v1/compute_instances.proto")
+public class InstancesServiceGrpc {
+
+ private InstancesServiceGrpc() {}
+
+ public static final String SERVICE_NAME = "google.compute.v1.InstancesService";
+
+ // Static method descriptors that strictly reflect the proto.
+ @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
+ public static final io.grpc.MethodDescriptor
+ * Retrieves the list of instances contained within
+ * the specified zone.
+ *
+ */
+ public void listInstances(com.google.cloud.compute.v1.InstancesListRequest request,
+ io.grpc.stub.StreamObserver
+ * Returns the specified Instance resource. Get a list of available instances
+ * by making a <code>list()</code> request.
+ *
+ */
+ public void getInstance(com.google.cloud.compute.v1.InstancesGetRequest request,
+ io.grpc.stub.StreamObserver
+ * Creates an instance resource in the specified project using the data
+ * included in the request.
+ *
+ */
+ public void insertInstance(com.google.cloud.compute.v1.InstancesInsertRequest request,
+ io.grpc.stub.StreamObserver
+ * Deletes the specified Instance resource. For more information, see
+ * <a href="/compute/docs/instances/stopping-or-deleting-an-instance">Stopping or Deleting an Instance</a>.
+ *
+ */
+ public void deleteInstance(com.google.cloud.compute.v1.InstancesDeleteRequest request,
+ io.grpc.stub.StreamObserver
+ * Retrieves the list of instances contained within
+ * the specified zone.
+ *
+ */
+ public void listInstances(com.google.cloud.compute.v1.InstancesListRequest request,
+ io.grpc.stub.StreamObserver
+ * Returns the specified Instance resource. Get a list of available instances
+ * by making a <code>list()</code> request.
+ *
+ */
+ public void getInstance(com.google.cloud.compute.v1.InstancesGetRequest request,
+ io.grpc.stub.StreamObserver
+ * Creates an instance resource in the specified project using the data
+ * included in the request.
+ *
+ */
+ public void insertInstance(com.google.cloud.compute.v1.InstancesInsertRequest request,
+ io.grpc.stub.StreamObserver
+ * Deletes the specified Instance resource. For more information, see
+ * <a href="/compute/docs/instances/stopping-or-deleting-an-instance">Stopping or Deleting an Instance</a>.
+ *
+ */
+ public void deleteInstance(com.google.cloud.compute.v1.InstancesDeleteRequest request,
+ io.grpc.stub.StreamObserver
+ * Retrieves the list of instances contained within
+ * the specified zone.
+ *
+ */
+ public com.google.cloud.compute.v1.InstanceList listInstances(com.google.cloud.compute.v1.InstancesListRequest request) {
+ return blockingUnaryCall(
+ getChannel(), METHOD_LIST_INSTANCES, getCallOptions(), request);
+ }
+
+ /**
+ *
+ * Returns the specified Instance resource. Get a list of available instances
+ * by making a <code>list()</code> request.
+ *
+ */
+ public com.google.cloud.compute.v1.Instance getInstance(com.google.cloud.compute.v1.InstancesGetRequest request) {
+ return blockingUnaryCall(
+ getChannel(), METHOD_GET_INSTANCE, getCallOptions(), request);
+ }
+
+ /**
+ *
+ * Creates an instance resource in the specified project using the data
+ * included in the request.
+ *
+ */
+ public com.google.cloud.compute.v1.Operation insertInstance(com.google.cloud.compute.v1.InstancesInsertRequest request) {
+ return blockingUnaryCall(
+ getChannel(), METHOD_INSERT_INSTANCE, getCallOptions(), request);
+ }
+
+ /**
+ *
+ * Deletes the specified Instance resource. For more information, see
+ * <a href="/compute/docs/instances/stopping-or-deleting-an-instance">Stopping or Deleting an Instance</a>.
+ *
+ */
+ public com.google.cloud.compute.v1.Operation deleteInstance(com.google.cloud.compute.v1.InstancesDeleteRequest request) {
+ return blockingUnaryCall(
+ getChannel(), METHOD_DELETE_INSTANCE, getCallOptions(), request);
+ }
+ }
+
+ /**
+ */
+ public static final class InstancesServiceFutureStub extends io.grpc.stub.AbstractStub
+ * Retrieves the list of instances contained within
+ * the specified zone.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * Returns the specified Instance resource. Get a list of available instances
+ * by making a <code>list()</code> request.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * Creates an instance resource in the specified project using the data
+ * included in the request.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * Deletes the specified Instance resource. For more information, see
+ * <a href="/compute/docs/instances/stopping-or-deleting-an-instance">Stopping or Deleting an Instance</a>.
+ *
+ */
+ public com.google.common.util.concurrent.ListenableFuture
+ * A network interface resource attached to an instance.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.NetworkInterface}
+ */
+public final class NetworkInterface extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.NetworkInterface)
+ NetworkInterfaceOrBuilder {
+ // Use NetworkInterface.newBuilder() to construct.
+ private NetworkInterface(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private NetworkInterface() {
+ kind_ = "";
+ network_ = "";
+ subnetwork_ = "";
+ networkIp_ = "";
+ name_ = "";
+ accessConfigs_ = java.util.Collections.emptyList();
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private NetworkInterface(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ network_ = s;
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ networkIp_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 34: {
+ if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
+ accessConfigs_ = new java.util.ArrayList
+ * [Output Only] Type of the resource. Always
+ * <code>compute#networkInterface</code> for network interfaces.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#networkInterface</code> for network interfaces.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int NETWORK_FIELD_NUMBER = 1;
+ private volatile java.lang.Object network_;
+ /**
+ *
+ * URL of the network resource for this instance. When creating an instance,
+ * if neither the network nor the subnetwork is specified, the
+ * default network <code>global/networks/default</code> is used; if the
+ * network is not specified but the subnetwork is specified, the network is
+ * inferred.
+ * This field is optional when creating a firewall rule. If not specified when
+ * creating a firewall rule, the default network
+ * <code>global/networks/default</code> is used.
+ * If you specify this property, you can specify the network as
+ * a full or partial URL. For example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>global/networks/default</code></li>
+ * </ul>
+ *
+ *
+ * optional string network = 1;
+ */
+ public java.lang.String getNetwork() {
+ java.lang.Object ref = network_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ network_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * URL of the network resource for this instance. When creating an instance,
+ * if neither the network nor the subnetwork is specified, the
+ * default network <code>global/networks/default</code> is used; if the
+ * network is not specified but the subnetwork is specified, the network is
+ * inferred.
+ * This field is optional when creating a firewall rule. If not specified when
+ * creating a firewall rule, the default network
+ * <code>global/networks/default</code> is used.
+ * If you specify this property, you can specify the network as
+ * a full or partial URL. For example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>global/networks/default</code></li>
+ * </ul>
+ *
+ *
+ * optional string network = 1;
+ */
+ public com.google.protobuf.ByteString
+ getNetworkBytes() {
+ java.lang.Object ref = network_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ network_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SUBNETWORK_FIELD_NUMBER = 5;
+ private volatile java.lang.Object subnetwork_;
+ /**
+ *
+ * The URL of the Subnetwork resource for this instance. If the network
+ * resource is in
+ * <a href="/compute/docs/subnetworks#legacy_non-subnet_network">legacy</a>
+ * mode, do not provide this property. If the network is in auto subnet
+ * mode, providing the subnetwork is optional. If the network is in custom
+ * subnet mode, then this field should be specified. If you specify this
+ * property, you can specify the subnetwork as a full or partial URL. For
+ * example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * <li><code>regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * </ul>
+ *
+ *
+ * optional string subnetwork = 5;
+ */
+ public java.lang.String getSubnetwork() {
+ java.lang.Object ref = subnetwork_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ subnetwork_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * The URL of the Subnetwork resource for this instance. If the network
+ * resource is in
+ * <a href="/compute/docs/subnetworks#legacy_non-subnet_network">legacy</a>
+ * mode, do not provide this property. If the network is in auto subnet
+ * mode, providing the subnetwork is optional. If the network is in custom
+ * subnet mode, then this field should be specified. If you specify this
+ * property, you can specify the subnetwork as a full or partial URL. For
+ * example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * <li><code>regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * </ul>
+ *
+ *
+ * optional string subnetwork = 5;
+ */
+ public com.google.protobuf.ByteString
+ getSubnetworkBytes() {
+ java.lang.Object ref = subnetwork_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ subnetwork_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int NETWORK_IP_FIELD_NUMBER = 2;
+ private volatile java.lang.Object networkIp_;
+ /**
+ *
+ * An IPv4 internal network address to assign to the instance for this network
+ * interface. If not specified by the user, an unused internal IP is
+ * assigned by the system.
+ *
+ *
+ * optional string network_ip = 2;
+ */
+ public java.lang.String getNetworkIp() {
+ java.lang.Object ref = networkIp_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ networkIp_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * An IPv4 internal network address to assign to the instance for this network
+ * interface. If not specified by the user, an unused internal IP is
+ * assigned by the system.
+ *
+ *
+ * optional string network_ip = 2;
+ */
+ public com.google.protobuf.ByteString
+ getNetworkIpBytes() {
+ java.lang.Object ref = networkIp_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ networkIp_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int NAME_FIELD_NUMBER = 3;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ * [Output Only] The name of the network interface, generated by the server.
+ * For network devices, these are <code>eth0</code>, <code>eth1</code>, etc.
+ *
+ *
+ * optional string name = 3;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The name of the network interface, generated by the server.
+ * For network devices, these are <code>eth0</code>, <code>eth1</code>, etc.
+ *
+ *
+ * optional string name = 3;
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ACCESS_CONFIGS_FIELD_NUMBER = 4;
+ private java.util.List
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public java.util.List
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.AccessConfigOrBuilder>
+ getAccessConfigsOrBuilderList() {
+ return accessConfigs_;
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public int getAccessConfigsCount() {
+ return accessConfigs_.size();
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public com.google.cloud.compute.v1.AccessConfig getAccessConfigs(int index) {
+ return accessConfigs_.get(index);
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public com.google.cloud.compute.v1.AccessConfigOrBuilder getAccessConfigsOrBuilder(
+ int index) {
+ return accessConfigs_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getNetworkBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_);
+ }
+ if (!getNetworkIpBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, networkIp_);
+ }
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
+ }
+ for (int i = 0; i < accessConfigs_.size(); i++) {
+ output.writeMessage(4, accessConfigs_.get(i));
+ }
+ if (!getSubnetworkBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, subnetwork_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1000, kind_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getNetworkBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_);
+ }
+ if (!getNetworkIpBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, networkIp_);
+ }
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
+ }
+ for (int i = 0; i < accessConfigs_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(4, accessConfigs_.get(i));
+ }
+ if (!getSubnetworkBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, subnetwork_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1000, kind_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.NetworkInterface)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.NetworkInterface other = (com.google.cloud.compute.v1.NetworkInterface) obj;
+
+ boolean result = true;
+ result = result && getKind()
+ .equals(other.getKind());
+ result = result && getNetwork()
+ .equals(other.getNetwork());
+ result = result && getSubnetwork()
+ .equals(other.getSubnetwork());
+ result = result && getNetworkIp()
+ .equals(other.getNetworkIp());
+ result = result && getName()
+ .equals(other.getName());
+ result = result && getAccessConfigsList()
+ .equals(other.getAccessConfigsList());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + KIND_FIELD_NUMBER;
+ hash = (53 * hash) + getKind().hashCode();
+ hash = (37 * hash) + NETWORK_FIELD_NUMBER;
+ hash = (53 * hash) + getNetwork().hashCode();
+ hash = (37 * hash) + SUBNETWORK_FIELD_NUMBER;
+ hash = (53 * hash) + getSubnetwork().hashCode();
+ hash = (37 * hash) + NETWORK_IP_FIELD_NUMBER;
+ hash = (53 * hash) + getNetworkIp().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ if (getAccessConfigsCount() > 0) {
+ hash = (37 * hash) + ACCESS_CONFIGS_FIELD_NUMBER;
+ hash = (53 * hash) + getAccessConfigsList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.NetworkInterface parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.NetworkInterface parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.NetworkInterface parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.NetworkInterface parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.NetworkInterface parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.NetworkInterface parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.NetworkInterface parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.NetworkInterface parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.NetworkInterface parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.NetworkInterface parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.NetworkInterface prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * A network interface resource attached to an instance.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.NetworkInterface}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * [Output Only] Type of the resource. Always
+ * <code>compute#networkInterface</code> for network interfaces.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#networkInterface</code> for network interfaces.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#networkInterface</code> for network interfaces.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKind(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#networkInterface</code> for network interfaces.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder clearKind() {
+
+ kind_ = getDefaultInstance().getKind();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#networkInterface</code> for network interfaces.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKindBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object network_ = "";
+ /**
+ *
+ * URL of the network resource for this instance. When creating an instance,
+ * if neither the network nor the subnetwork is specified, the
+ * default network <code>global/networks/default</code> is used; if the
+ * network is not specified but the subnetwork is specified, the network is
+ * inferred.
+ * This field is optional when creating a firewall rule. If not specified when
+ * creating a firewall rule, the default network
+ * <code>global/networks/default</code> is used.
+ * If you specify this property, you can specify the network as
+ * a full or partial URL. For example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>global/networks/default</code></li>
+ * </ul>
+ *
+ *
+ * optional string network = 1;
+ */
+ public java.lang.String getNetwork() {
+ java.lang.Object ref = network_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ network_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * URL of the network resource for this instance. When creating an instance,
+ * if neither the network nor the subnetwork is specified, the
+ * default network <code>global/networks/default</code> is used; if the
+ * network is not specified but the subnetwork is specified, the network is
+ * inferred.
+ * This field is optional when creating a firewall rule. If not specified when
+ * creating a firewall rule, the default network
+ * <code>global/networks/default</code> is used.
+ * If you specify this property, you can specify the network as
+ * a full or partial URL. For example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>global/networks/default</code></li>
+ * </ul>
+ *
+ *
+ * optional string network = 1;
+ */
+ public com.google.protobuf.ByteString
+ getNetworkBytes() {
+ java.lang.Object ref = network_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ network_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * URL of the network resource for this instance. When creating an instance,
+ * if neither the network nor the subnetwork is specified, the
+ * default network <code>global/networks/default</code> is used; if the
+ * network is not specified but the subnetwork is specified, the network is
+ * inferred.
+ * This field is optional when creating a firewall rule. If not specified when
+ * creating a firewall rule, the default network
+ * <code>global/networks/default</code> is used.
+ * If you specify this property, you can specify the network as
+ * a full or partial URL. For example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>global/networks/default</code></li>
+ * </ul>
+ *
+ *
+ * optional string network = 1;
+ */
+ public Builder setNetwork(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ network_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * URL of the network resource for this instance. When creating an instance,
+ * if neither the network nor the subnetwork is specified, the
+ * default network <code>global/networks/default</code> is used; if the
+ * network is not specified but the subnetwork is specified, the network is
+ * inferred.
+ * This field is optional when creating a firewall rule. If not specified when
+ * creating a firewall rule, the default network
+ * <code>global/networks/default</code> is used.
+ * If you specify this property, you can specify the network as
+ * a full or partial URL. For example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>global/networks/default</code></li>
+ * </ul>
+ *
+ *
+ * optional string network = 1;
+ */
+ public Builder clearNetwork() {
+
+ network_ = getDefaultInstance().getNetwork();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * URL of the network resource for this instance. When creating an instance,
+ * if neither the network nor the subnetwork is specified, the
+ * default network <code>global/networks/default</code> is used; if the
+ * network is not specified but the subnetwork is specified, the network is
+ * inferred.
+ * This field is optional when creating a firewall rule. If not specified when
+ * creating a firewall rule, the default network
+ * <code>global/networks/default</code> is used.
+ * If you specify this property, you can specify the network as
+ * a full or partial URL. For example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>global/networks/default</code></li>
+ * </ul>
+ *
+ *
+ * optional string network = 1;
+ */
+ public Builder setNetworkBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ network_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object subnetwork_ = "";
+ /**
+ *
+ * The URL of the Subnetwork resource for this instance. If the network
+ * resource is in
+ * <a href="/compute/docs/subnetworks#legacy_non-subnet_network">legacy</a>
+ * mode, do not provide this property. If the network is in auto subnet
+ * mode, providing the subnetwork is optional. If the network is in custom
+ * subnet mode, then this field should be specified. If you specify this
+ * property, you can specify the subnetwork as a full or partial URL. For
+ * example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * <li><code>regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * </ul>
+ *
+ *
+ * optional string subnetwork = 5;
+ */
+ public java.lang.String getSubnetwork() {
+ java.lang.Object ref = subnetwork_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ subnetwork_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * The URL of the Subnetwork resource for this instance. If the network
+ * resource is in
+ * <a href="/compute/docs/subnetworks#legacy_non-subnet_network">legacy</a>
+ * mode, do not provide this property. If the network is in auto subnet
+ * mode, providing the subnetwork is optional. If the network is in custom
+ * subnet mode, then this field should be specified. If you specify this
+ * property, you can specify the subnetwork as a full or partial URL. For
+ * example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * <li><code>regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * </ul>
+ *
+ *
+ * optional string subnetwork = 5;
+ */
+ public com.google.protobuf.ByteString
+ getSubnetworkBytes() {
+ java.lang.Object ref = subnetwork_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ subnetwork_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * The URL of the Subnetwork resource for this instance. If the network
+ * resource is in
+ * <a href="/compute/docs/subnetworks#legacy_non-subnet_network">legacy</a>
+ * mode, do not provide this property. If the network is in auto subnet
+ * mode, providing the subnetwork is optional. If the network is in custom
+ * subnet mode, then this field should be specified. If you specify this
+ * property, you can specify the subnetwork as a full or partial URL. For
+ * example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * <li><code>regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * </ul>
+ *
+ *
+ * optional string subnetwork = 5;
+ */
+ public Builder setSubnetwork(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ subnetwork_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The URL of the Subnetwork resource for this instance. If the network
+ * resource is in
+ * <a href="/compute/docs/subnetworks#legacy_non-subnet_network">legacy</a>
+ * mode, do not provide this property. If the network is in auto subnet
+ * mode, providing the subnetwork is optional. If the network is in custom
+ * subnet mode, then this field should be specified. If you specify this
+ * property, you can specify the subnetwork as a full or partial URL. For
+ * example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * <li><code>regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * </ul>
+ *
+ *
+ * optional string subnetwork = 5;
+ */
+ public Builder clearSubnetwork() {
+
+ subnetwork_ = getDefaultInstance().getSubnetwork();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The URL of the Subnetwork resource for this instance. If the network
+ * resource is in
+ * <a href="/compute/docs/subnetworks#legacy_non-subnet_network">legacy</a>
+ * mode, do not provide this property. If the network is in auto subnet
+ * mode, providing the subnetwork is optional. If the network is in custom
+ * subnet mode, then this field should be specified. If you specify this
+ * property, you can specify the subnetwork as a full or partial URL. For
+ * example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * <li><code>regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * </ul>
+ *
+ *
+ * optional string subnetwork = 5;
+ */
+ public Builder setSubnetworkBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ subnetwork_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object networkIp_ = "";
+ /**
+ *
+ * An IPv4 internal network address to assign to the instance for this network
+ * interface. If not specified by the user, an unused internal IP is
+ * assigned by the system.
+ *
+ *
+ * optional string network_ip = 2;
+ */
+ public java.lang.String getNetworkIp() {
+ java.lang.Object ref = networkIp_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ networkIp_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * An IPv4 internal network address to assign to the instance for this network
+ * interface. If not specified by the user, an unused internal IP is
+ * assigned by the system.
+ *
+ *
+ * optional string network_ip = 2;
+ */
+ public com.google.protobuf.ByteString
+ getNetworkIpBytes() {
+ java.lang.Object ref = networkIp_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ networkIp_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * An IPv4 internal network address to assign to the instance for this network
+ * interface. If not specified by the user, an unused internal IP is
+ * assigned by the system.
+ *
+ *
+ * optional string network_ip = 2;
+ */
+ public Builder setNetworkIp(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ networkIp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * An IPv4 internal network address to assign to the instance for this network
+ * interface. If not specified by the user, an unused internal IP is
+ * assigned by the system.
+ *
+ *
+ * optional string network_ip = 2;
+ */
+ public Builder clearNetworkIp() {
+
+ networkIp_ = getDefaultInstance().getNetworkIp();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * An IPv4 internal network address to assign to the instance for this network
+ * interface. If not specified by the user, an unused internal IP is
+ * assigned by the system.
+ *
+ *
+ * optional string network_ip = 2;
+ */
+ public Builder setNetworkIpBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ networkIp_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object name_ = "";
+ /**
+ *
+ * [Output Only] The name of the network interface, generated by the server.
+ * For network devices, these are <code>eth0</code>, <code>eth1</code>, etc.
+ *
+ *
+ * optional string name = 3;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The name of the network interface, generated by the server.
+ * For network devices, these are <code>eth0</code>, <code>eth1</code>, etc.
+ *
+ *
+ * optional string name = 3;
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The name of the network interface, generated by the server.
+ * For network devices, these are <code>eth0</code>, <code>eth1</code>, etc.
+ *
+ *
+ * optional string name = 3;
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The name of the network interface, generated by the server.
+ * For network devices, these are <code>eth0</code>, <code>eth1</code>, etc.
+ *
+ *
+ * optional string name = 3;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The name of the network interface, generated by the server.
+ * For network devices, these are <code>eth0</code>, <code>eth1</code>, etc.
+ *
+ *
+ * optional string name = 3;
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public java.util.List
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public int getAccessConfigsCount() {
+ if (accessConfigsBuilder_ == null) {
+ return accessConfigs_.size();
+ } else {
+ return accessConfigsBuilder_.getCount();
+ }
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public com.google.cloud.compute.v1.AccessConfig getAccessConfigs(int index) {
+ if (accessConfigsBuilder_ == null) {
+ return accessConfigs_.get(index);
+ } else {
+ return accessConfigsBuilder_.getMessage(index);
+ }
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public Builder setAccessConfigs(
+ int index, com.google.cloud.compute.v1.AccessConfig value) {
+ if (accessConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAccessConfigsIsMutable();
+ accessConfigs_.set(index, value);
+ onChanged();
+ } else {
+ accessConfigsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public Builder setAccessConfigs(
+ int index, com.google.cloud.compute.v1.AccessConfig.Builder builderForValue) {
+ if (accessConfigsBuilder_ == null) {
+ ensureAccessConfigsIsMutable();
+ accessConfigs_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ accessConfigsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public Builder addAccessConfigs(com.google.cloud.compute.v1.AccessConfig value) {
+ if (accessConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAccessConfigsIsMutable();
+ accessConfigs_.add(value);
+ onChanged();
+ } else {
+ accessConfigsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public Builder addAccessConfigs(
+ int index, com.google.cloud.compute.v1.AccessConfig value) {
+ if (accessConfigsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAccessConfigsIsMutable();
+ accessConfigs_.add(index, value);
+ onChanged();
+ } else {
+ accessConfigsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public Builder addAccessConfigs(
+ com.google.cloud.compute.v1.AccessConfig.Builder builderForValue) {
+ if (accessConfigsBuilder_ == null) {
+ ensureAccessConfigsIsMutable();
+ accessConfigs_.add(builderForValue.build());
+ onChanged();
+ } else {
+ accessConfigsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public Builder addAccessConfigs(
+ int index, com.google.cloud.compute.v1.AccessConfig.Builder builderForValue) {
+ if (accessConfigsBuilder_ == null) {
+ ensureAccessConfigsIsMutable();
+ accessConfigs_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ accessConfigsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public Builder addAllAccessConfigs(
+ java.lang.Iterable extends com.google.cloud.compute.v1.AccessConfig> values) {
+ if (accessConfigsBuilder_ == null) {
+ ensureAccessConfigsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(
+ values, accessConfigs_);
+ onChanged();
+ } else {
+ accessConfigsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public Builder clearAccessConfigs() {
+ if (accessConfigsBuilder_ == null) {
+ accessConfigs_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000020);
+ onChanged();
+ } else {
+ accessConfigsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public Builder removeAccessConfigs(int index) {
+ if (accessConfigsBuilder_ == null) {
+ ensureAccessConfigsIsMutable();
+ accessConfigs_.remove(index);
+ onChanged();
+ } else {
+ accessConfigsBuilder_.remove(index);
+ }
+ return this;
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public com.google.cloud.compute.v1.AccessConfig.Builder getAccessConfigsBuilder(
+ int index) {
+ return getAccessConfigsFieldBuilder().getBuilder(index);
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public com.google.cloud.compute.v1.AccessConfigOrBuilder getAccessConfigsOrBuilder(
+ int index) {
+ if (accessConfigsBuilder_ == null) {
+ return accessConfigs_.get(index); } else {
+ return accessConfigsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public java.util.List extends com.google.cloud.compute.v1.AccessConfigOrBuilder>
+ getAccessConfigsOrBuilderList() {
+ if (accessConfigsBuilder_ != null) {
+ return accessConfigsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(accessConfigs_);
+ }
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public com.google.cloud.compute.v1.AccessConfig.Builder addAccessConfigsBuilder() {
+ return getAccessConfigsFieldBuilder().addBuilder(
+ com.google.cloud.compute.v1.AccessConfig.getDefaultInstance());
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public com.google.cloud.compute.v1.AccessConfig.Builder addAccessConfigsBuilder(
+ int index) {
+ return getAccessConfigsFieldBuilder().addBuilder(
+ index, com.google.cloud.compute.v1.AccessConfig.getDefaultInstance());
+ }
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ public java.util.List
+ * [Output Only] Type of the resource. Always
+ * <code>compute#networkInterface</code> for network interfaces.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ java.lang.String getKind();
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#networkInterface</code> for network interfaces.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ com.google.protobuf.ByteString
+ getKindBytes();
+
+ /**
+ *
+ * URL of the network resource for this instance. When creating an instance,
+ * if neither the network nor the subnetwork is specified, the
+ * default network <code>global/networks/default</code> is used; if the
+ * network is not specified but the subnetwork is specified, the network is
+ * inferred.
+ * This field is optional when creating a firewall rule. If not specified when
+ * creating a firewall rule, the default network
+ * <code>global/networks/default</code> is used.
+ * If you specify this property, you can specify the network as
+ * a full or partial URL. For example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>global/networks/default</code></li>
+ * </ul>
+ *
+ *
+ * optional string network = 1;
+ */
+ java.lang.String getNetwork();
+ /**
+ *
+ * URL of the network resource for this instance. When creating an instance,
+ * if neither the network nor the subnetwork is specified, the
+ * default network <code>global/networks/default</code> is used; if the
+ * network is not specified but the subnetwork is specified, the network is
+ * inferred.
+ * This field is optional when creating a firewall rule. If not specified when
+ * creating a firewall rule, the default network
+ * <code>global/networks/default</code> is used.
+ * If you specify this property, you can specify the network as
+ * a full or partial URL. For example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>projects/<var
+ * class="apiparam">project</var>/global/networks/<var
+ * class="apiparam">network</var></code></li>
+ * <li><code>global/networks/default</code></li>
+ * </ul>
+ *
+ *
+ * optional string network = 1;
+ */
+ com.google.protobuf.ByteString
+ getNetworkBytes();
+
+ /**
+ *
+ * The URL of the Subnetwork resource for this instance. If the network
+ * resource is in
+ * <a href="/compute/docs/subnetworks#legacy_non-subnet_network">legacy</a>
+ * mode, do not provide this property. If the network is in auto subnet
+ * mode, providing the subnetwork is optional. If the network is in custom
+ * subnet mode, then this field should be specified. If you specify this
+ * property, you can specify the subnetwork as a full or partial URL. For
+ * example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * <li><code>regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * </ul>
+ *
+ *
+ * optional string subnetwork = 5;
+ */
+ java.lang.String getSubnetwork();
+ /**
+ *
+ * The URL of the Subnetwork resource for this instance. If the network
+ * resource is in
+ * <a href="/compute/docs/subnetworks#legacy_non-subnet_network">legacy</a>
+ * mode, do not provide this property. If the network is in auto subnet
+ * mode, providing the subnetwork is optional. If the network is in custom
+ * subnet mode, then this field should be specified. If you specify this
+ * property, you can specify the subnetwork as a full or partial URL. For
+ * example, the following are all valid URLs:
+ * <ul>
+ * <li><code>https://www.googleapis.com/compute/v1/projects/<var class="apiparam">project</var>/regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * <li><code>regions/<var class="apiparam">region</var>/subnetworks/<var class="apiparam">subnetwork</var></code></li>
+ * </ul>
+ *
+ *
+ * optional string subnetwork = 5;
+ */
+ com.google.protobuf.ByteString
+ getSubnetworkBytes();
+
+ /**
+ *
+ * An IPv4 internal network address to assign to the instance for this network
+ * interface. If not specified by the user, an unused internal IP is
+ * assigned by the system.
+ *
+ *
+ * optional string network_ip = 2;
+ */
+ java.lang.String getNetworkIp();
+ /**
+ *
+ * An IPv4 internal network address to assign to the instance for this network
+ * interface. If not specified by the user, an unused internal IP is
+ * assigned by the system.
+ *
+ *
+ * optional string network_ip = 2;
+ */
+ com.google.protobuf.ByteString
+ getNetworkIpBytes();
+
+ /**
+ *
+ * [Output Only] The name of the network interface, generated by the server.
+ * For network devices, these are <code>eth0</code>, <code>eth1</code>, etc.
+ *
+ *
+ * optional string name = 3;
+ */
+ java.lang.String getName();
+ /**
+ *
+ * [Output Only] The name of the network interface, generated by the server.
+ * For network devices, these are <code>eth0</code>, <code>eth1</code>, etc.
+ *
+ *
+ * optional string name = 3;
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ java.util.List
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ com.google.cloud.compute.v1.AccessConfig getAccessConfigs(int index);
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ int getAccessConfigsCount();
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ java.util.List extends com.google.cloud.compute.v1.AccessConfigOrBuilder>
+ getAccessConfigsOrBuilderList();
+ /**
+ *
+ * An array of configurations for this interface. Currently, only one access
+ * config, <code>ONE_TO_ONE_NAT</code>, is supported. If there are no
+ * <code>accessConfigs</code> specified, then this instance will have
+ * no external internet access.
+ *
+ *
+ * repeated .google.compute.v1.AccessConfig access_configs = 4;
+ */
+ com.google.cloud.compute.v1.AccessConfigOrBuilder getAccessConfigsOrBuilder(
+ int index);
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Operation.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Operation.java
new file mode 100644
index 000000000..46c05c95c
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Operation.java
@@ -0,0 +1,3436 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ *
+ * An Operation resource, used to manage asynchronous API requests.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.Operation}
+ */
+public final class Operation extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.Operation)
+ OperationOrBuilder {
+ // Use Operation.newBuilder() to construct.
+ private Operation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Operation() {
+ kind_ = "";
+ id_ = 0L;
+ creationTimestamp_ = "";
+ name_ = "";
+ zone_ = "";
+ clientOperationId_ = "";
+ operationType_ = "";
+ targetLink_ = "";
+ targetId_ = 0L;
+ status_ = 0;
+ statusMessage_ = "";
+ user_ = "";
+ progress_ = 0;
+ insertTime_ = "";
+ startTime_ = "";
+ endTime_ = "";
+ httpErrorStatusCode_ = 0;
+ httpErrorMessage_ = "";
+ selfLink_ = "";
+ region_ = "";
+ description_ = "";
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private Operation(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 9: {
+
+ id_ = input.readFixed64();
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ creationTimestamp_ = s;
+ break;
+ }
+ case 26: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ name_ = s;
+ break;
+ }
+ case 34: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ zone_ = s;
+ break;
+ }
+ case 42: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ clientOperationId_ = s;
+ break;
+ }
+ case 50: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ operationType_ = s;
+ break;
+ }
+ case 58: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ targetLink_ = s;
+ break;
+ }
+ case 65: {
+
+ targetId_ = input.readFixed64();
+ break;
+ }
+ case 72: {
+ int rawValue = input.readEnum();
+
+ status_ = rawValue;
+ break;
+ }
+ case 82: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ statusMessage_ = s;
+ break;
+ }
+ case 90: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ user_ = s;
+ break;
+ }
+ case 96: {
+
+ progress_ = input.readInt32();
+ break;
+ }
+ case 106: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ insertTime_ = s;
+ break;
+ }
+ case 114: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ startTime_ = s;
+ break;
+ }
+ case 122: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ endTime_ = s;
+ break;
+ }
+ case 144: {
+
+ httpErrorStatusCode_ = input.readInt32();
+ break;
+ }
+ case 154: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ httpErrorMessage_ = s;
+ break;
+ }
+ case 162: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ selfLink_ = s;
+ break;
+ }
+ case 170: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ region_ = s;
+ break;
+ }
+ case 178: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ description_ = s;
+ break;
+ }
+ case 8002: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ kind_ = s;
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_Operation_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_Operation_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.Operation.class, com.google.cloud.compute.v1.Operation.Builder.class);
+ }
+
+ public static final int KIND_FIELD_NUMBER = 1000;
+ private volatile java.lang.Object kind_;
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#operation</code> for Operation resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#operation</code> for Operation resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ID_FIELD_NUMBER = 1;
+ private long id_;
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional fixed64 id = 1;
+ */
+ public long getId() {
+ return id_;
+ }
+
+ public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 2;
+ private volatile java.lang.Object creationTimestamp_;
+ /**
+ *
+ * [Deprecated] This field is deprecated.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public java.lang.String getCreationTimestamp() {
+ java.lang.Object ref = creationTimestamp_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ creationTimestamp_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Deprecated] This field is deprecated.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public com.google.protobuf.ByteString
+ getCreationTimestampBytes() {
+ java.lang.Object ref = creationTimestamp_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ creationTimestamp_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int NAME_FIELD_NUMBER = 3;
+ private volatile java.lang.Object name_;
+ /**
+ *
+ * [Output Only] Name of the resource.
+ *
+ *
+ * optional string name = 3;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Name of the resource.
+ *
+ *
+ * optional string name = 3;
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ZONE_FIELD_NUMBER = 4;
+ private volatile java.lang.Object zone_;
+ /**
+ *
+ * [Output Only] The URL of the zone where the operation resides. Only
+ * available when performing per-zone operations.
+ *
+ *
+ * optional string zone = 4;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The URL of the zone where the operation resides. Only
+ * available when performing per-zone operations.
+ *
+ *
+ * optional string zone = 4;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int CLIENT_OPERATION_ID_FIELD_NUMBER = 5;
+ private volatile java.lang.Object clientOperationId_;
+ /**
+ *
+ * [Output Only] Reserved for future use.
+ *
+ *
+ * optional string client_operation_id = 5;
+ */
+ public java.lang.String getClientOperationId() {
+ java.lang.Object ref = clientOperationId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ clientOperationId_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Reserved for future use.
+ *
+ *
+ * optional string client_operation_id = 5;
+ */
+ public com.google.protobuf.ByteString
+ getClientOperationIdBytes() {
+ java.lang.Object ref = clientOperationId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ clientOperationId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int OPERATION_TYPE_FIELD_NUMBER = 6;
+ private volatile java.lang.Object operationType_;
+ /**
+ *
+ * [Output Only] The type of operation, such as <code>insert</code>,
+ * <code>update</code>, or <code>delete</code>, and so on.
+ *
+ *
+ * optional string operation_type = 6;
+ */
+ public java.lang.String getOperationType() {
+ java.lang.Object ref = operationType_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ operationType_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The type of operation, such as <code>insert</code>,
+ * <code>update</code>, or <code>delete</code>, and so on.
+ *
+ *
+ * optional string operation_type = 6;
+ */
+ public com.google.protobuf.ByteString
+ getOperationTypeBytes() {
+ java.lang.Object ref = operationType_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ operationType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TARGET_LINK_FIELD_NUMBER = 7;
+ private volatile java.lang.Object targetLink_;
+ /**
+ *
+ * [Output Only] The URL of the resource that the operation modifies. For
+ * operations related to creating a snapshot, this points to the persistent
+ * disk that the snapshot was created from.
+ *
+ *
+ * optional string target_link = 7;
+ */
+ public java.lang.String getTargetLink() {
+ java.lang.Object ref = targetLink_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ targetLink_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The URL of the resource that the operation modifies. For
+ * operations related to creating a snapshot, this points to the persistent
+ * disk that the snapshot was created from.
+ *
+ *
+ * optional string target_link = 7;
+ */
+ public com.google.protobuf.ByteString
+ getTargetLinkBytes() {
+ java.lang.Object ref = targetLink_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ targetLink_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TARGET_ID_FIELD_NUMBER = 8;
+ private long targetId_;
+ /**
+ *
+ * [Output Only] The unique target ID, which identifies a specific incarnation
+ * of the target resource.
+ *
+ *
+ * optional fixed64 target_id = 8;
+ */
+ public long getTargetId() {
+ return targetId_;
+ }
+
+ public static final int STATUS_FIELD_NUMBER = 9;
+ private int status_;
+ /**
+ *
+ * [Output Only] The status of the operation, which can be one of the
+ * following:
+ * <code>PENDING</code>, <code>RUNNING</code>, or <code>DONE</code>.
+ *
+ *
+ * optional .google.compute.v1.OperationStatus status = 9;
+ */
+ public int getStatusValue() {
+ return status_;
+ }
+ /**
+ *
+ * [Output Only] The status of the operation, which can be one of the
+ * following:
+ * <code>PENDING</code>, <code>RUNNING</code>, or <code>DONE</code>.
+ *
+ *
+ * optional .google.compute.v1.OperationStatus status = 9;
+ */
+ public com.google.cloud.compute.v1.OperationStatus getStatus() {
+ com.google.cloud.compute.v1.OperationStatus result = com.google.cloud.compute.v1.OperationStatus.valueOf(status_);
+ return result == null ? com.google.cloud.compute.v1.OperationStatus.UNRECOGNIZED : result;
+ }
+
+ public static final int STATUS_MESSAGE_FIELD_NUMBER = 10;
+ private volatile java.lang.Object statusMessage_;
+ /**
+ *
+ * [Output Only] An optional textual description of the current status of the
+ * operation.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public java.lang.String getStatusMessage() {
+ java.lang.Object ref = statusMessage_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ statusMessage_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] An optional textual description of the current status of the
+ * operation.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public com.google.protobuf.ByteString
+ getStatusMessageBytes() {
+ java.lang.Object ref = statusMessage_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ statusMessage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int USER_FIELD_NUMBER = 11;
+ private volatile java.lang.Object user_;
+ /**
+ *
+ * [Output Only] User who requested the operation, for example:
+ * <code>user@example.com</code>.
+ *
+ *
+ * optional string user = 11;
+ */
+ public java.lang.String getUser() {
+ java.lang.Object ref = user_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ user_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] User who requested the operation, for example:
+ * <code>user@example.com</code>.
+ *
+ *
+ * optional string user = 11;
+ */
+ public com.google.protobuf.ByteString
+ getUserBytes() {
+ java.lang.Object ref = user_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ user_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PROGRESS_FIELD_NUMBER = 12;
+ private int progress_;
+ /**
+ *
+ * [Output Only] An optional progress indicator that ranges from 0 to 100.
+ * There is no requirement that this be linear or support any granularity of
+ * operations. This should not be used to guess when the operation will be
+ * complete. This number should monotonically increase as the operation
+ * progresses.
+ *
+ *
+ * optional int32 progress = 12;
+ */
+ public int getProgress() {
+ return progress_;
+ }
+
+ public static final int INSERT_TIME_FIELD_NUMBER = 13;
+ private volatile java.lang.Object insertTime_;
+ /**
+ *
+ * [Output Only] The time that this operation was requested.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string insert_time = 13;
+ */
+ public java.lang.String getInsertTime() {
+ java.lang.Object ref = insertTime_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ insertTime_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was requested.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string insert_time = 13;
+ */
+ public com.google.protobuf.ByteString
+ getInsertTimeBytes() {
+ java.lang.Object ref = insertTime_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ insertTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int START_TIME_FIELD_NUMBER = 14;
+ private volatile java.lang.Object startTime_;
+ /**
+ *
+ * [Output Only] The time that this operation was started by the server.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string start_time = 14;
+ */
+ public java.lang.String getStartTime() {
+ java.lang.Object ref = startTime_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ startTime_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was started by the server.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string start_time = 14;
+ */
+ public com.google.protobuf.ByteString
+ getStartTimeBytes() {
+ java.lang.Object ref = startTime_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ startTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int END_TIME_FIELD_NUMBER = 15;
+ private volatile java.lang.Object endTime_;
+ /**
+ *
+ * [Output Only] The time that this operation was completed. This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string end_time = 15;
+ */
+ public java.lang.String getEndTime() {
+ java.lang.Object ref = endTime_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ endTime_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was completed. This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string end_time = 15;
+ */
+ public com.google.protobuf.ByteString
+ getEndTimeBytes() {
+ java.lang.Object ref = endTime_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ endTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int HTTP_ERROR_STATUS_CODE_FIELD_NUMBER = 18;
+ private int httpErrorStatusCode_;
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * status code that was returned. For example, a <code>404</code> means the
+ * resource was not found.
+ *
+ *
+ * optional int32 http_error_status_code = 18;
+ */
+ public int getHttpErrorStatusCode() {
+ return httpErrorStatusCode_;
+ }
+
+ public static final int HTTP_ERROR_MESSAGE_FIELD_NUMBER = 19;
+ private volatile java.lang.Object httpErrorMessage_;
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * message that was returned, such as <code>NOT FOUND</code>.
+ *
+ *
+ * optional string http_error_message = 19;
+ */
+ public java.lang.String getHttpErrorMessage() {
+ java.lang.Object ref = httpErrorMessage_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ httpErrorMessage_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * message that was returned, such as <code>NOT FOUND</code>.
+ *
+ *
+ * optional string http_error_message = 19;
+ */
+ public com.google.protobuf.ByteString
+ getHttpErrorMessageBytes() {
+ java.lang.Object ref = httpErrorMessage_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ httpErrorMessage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SELF_LINK_FIELD_NUMBER = 20;
+ private volatile java.lang.Object selfLink_;
+ /**
+ *
+ * [Output Only] Server-defined URL for the resource.
+ *
+ *
+ * optional string self_link = 20;
+ */
+ public java.lang.String getSelfLink() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ selfLink_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for the resource.
+ *
+ *
+ * optional string self_link = 20;
+ */
+ public com.google.protobuf.ByteString
+ getSelfLinkBytes() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ selfLink_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int REGION_FIELD_NUMBER = 21;
+ private volatile java.lang.Object region_;
+ /**
+ *
+ * [Output Only] The URL of the region where the operation resides. Only
+ * available when performing regional operations.
+ *
+ *
+ * optional string region = 21;
+ */
+ public java.lang.String getRegion() {
+ java.lang.Object ref = region_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ region_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] The URL of the region where the operation resides. Only
+ * available when performing regional operations.
+ *
+ *
+ * optional string region = 21;
+ */
+ public com.google.protobuf.ByteString
+ getRegionBytes() {
+ java.lang.Object ref = region_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ region_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int DESCRIPTION_FIELD_NUMBER = 22;
+ private volatile java.lang.Object description_;
+ /**
+ *
+ * [Output Only] A textual description of the operation, which is
+ * set when the operation is created.
+ *
+ *
+ * optional string description = 22;
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ description_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * [Output Only] A textual description of the operation, which is
+ * set when the operation is created.
+ *
+ *
+ * optional string description = 22;
+ */
+ public com.google.protobuf.ByteString
+ getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (id_ != 0L) {
+ output.writeFixed64(1, id_);
+ }
+ if (!getCreationTimestampBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, creationTimestamp_);
+ }
+ if (!getNameBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, zone_);
+ }
+ if (!getClientOperationIdBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, clientOperationId_);
+ }
+ if (!getOperationTypeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 6, operationType_);
+ }
+ if (!getTargetLinkBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 7, targetLink_);
+ }
+ if (targetId_ != 0L) {
+ output.writeFixed64(8, targetId_);
+ }
+ if (status_ != com.google.cloud.compute.v1.OperationStatus.UNKNOWN_OPERATION_STATUS.getNumber()) {
+ output.writeEnum(9, status_);
+ }
+ if (!getStatusMessageBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 10, statusMessage_);
+ }
+ if (!getUserBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 11, user_);
+ }
+ if (progress_ != 0) {
+ output.writeInt32(12, progress_);
+ }
+ if (!getInsertTimeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 13, insertTime_);
+ }
+ if (!getStartTimeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 14, startTime_);
+ }
+ if (!getEndTimeBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 15, endTime_);
+ }
+ if (httpErrorStatusCode_ != 0) {
+ output.writeInt32(18, httpErrorStatusCode_);
+ }
+ if (!getHttpErrorMessageBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 19, httpErrorMessage_);
+ }
+ if (!getSelfLinkBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 20, selfLink_);
+ }
+ if (!getRegionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 21, region_);
+ }
+ if (!getDescriptionBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 22, description_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1000, kind_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (id_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeFixed64Size(1, id_);
+ }
+ if (!getCreationTimestampBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, creationTimestamp_);
+ }
+ if (!getNameBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, name_);
+ }
+ if (!getZoneBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, zone_);
+ }
+ if (!getClientOperationIdBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, clientOperationId_);
+ }
+ if (!getOperationTypeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, operationType_);
+ }
+ if (!getTargetLinkBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, targetLink_);
+ }
+ if (targetId_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeFixed64Size(8, targetId_);
+ }
+ if (status_ != com.google.cloud.compute.v1.OperationStatus.UNKNOWN_OPERATION_STATUS.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(9, status_);
+ }
+ if (!getStatusMessageBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, statusMessage_);
+ }
+ if (!getUserBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, user_);
+ }
+ if (progress_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(12, progress_);
+ }
+ if (!getInsertTimeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, insertTime_);
+ }
+ if (!getStartTimeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, startTime_);
+ }
+ if (!getEndTimeBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, endTime_);
+ }
+ if (httpErrorStatusCode_ != 0) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32Size(18, httpErrorStatusCode_);
+ }
+ if (!getHttpErrorMessageBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, httpErrorMessage_);
+ }
+ if (!getSelfLinkBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, selfLink_);
+ }
+ if (!getRegionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, region_);
+ }
+ if (!getDescriptionBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(22, description_);
+ }
+ if (!getKindBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1000, kind_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.Operation)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.Operation other = (com.google.cloud.compute.v1.Operation) obj;
+
+ boolean result = true;
+ result = result && getKind()
+ .equals(other.getKind());
+ result = result && (getId()
+ == other.getId());
+ result = result && getCreationTimestamp()
+ .equals(other.getCreationTimestamp());
+ result = result && getName()
+ .equals(other.getName());
+ result = result && getZone()
+ .equals(other.getZone());
+ result = result && getClientOperationId()
+ .equals(other.getClientOperationId());
+ result = result && getOperationType()
+ .equals(other.getOperationType());
+ result = result && getTargetLink()
+ .equals(other.getTargetLink());
+ result = result && (getTargetId()
+ == other.getTargetId());
+ result = result && status_ == other.status_;
+ result = result && getStatusMessage()
+ .equals(other.getStatusMessage());
+ result = result && getUser()
+ .equals(other.getUser());
+ result = result && (getProgress()
+ == other.getProgress());
+ result = result && getInsertTime()
+ .equals(other.getInsertTime());
+ result = result && getStartTime()
+ .equals(other.getStartTime());
+ result = result && getEndTime()
+ .equals(other.getEndTime());
+ result = result && (getHttpErrorStatusCode()
+ == other.getHttpErrorStatusCode());
+ result = result && getHttpErrorMessage()
+ .equals(other.getHttpErrorMessage());
+ result = result && getSelfLink()
+ .equals(other.getSelfLink());
+ result = result && getRegion()
+ .equals(other.getRegion());
+ result = result && getDescription()
+ .equals(other.getDescription());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + KIND_FIELD_NUMBER;
+ hash = (53 * hash) + getKind().hashCode();
+ hash = (37 * hash) + ID_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getId());
+ hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + getCreationTimestamp().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + ZONE_FIELD_NUMBER;
+ hash = (53 * hash) + getZone().hashCode();
+ hash = (37 * hash) + CLIENT_OPERATION_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getClientOperationId().hashCode();
+ hash = (37 * hash) + OPERATION_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getOperationType().hashCode();
+ hash = (37 * hash) + TARGET_LINK_FIELD_NUMBER;
+ hash = (53 * hash) + getTargetLink().hashCode();
+ hash = (37 * hash) + TARGET_ID_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
+ getTargetId());
+ hash = (37 * hash) + STATUS_FIELD_NUMBER;
+ hash = (53 * hash) + status_;
+ hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getStatusMessage().hashCode();
+ hash = (37 * hash) + USER_FIELD_NUMBER;
+ hash = (53 * hash) + getUser().hashCode();
+ hash = (37 * hash) + PROGRESS_FIELD_NUMBER;
+ hash = (53 * hash) + getProgress();
+ hash = (37 * hash) + INSERT_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getInsertTime().hashCode();
+ hash = (37 * hash) + START_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getStartTime().hashCode();
+ hash = (37 * hash) + END_TIME_FIELD_NUMBER;
+ hash = (53 * hash) + getEndTime().hashCode();
+ hash = (37 * hash) + HTTP_ERROR_STATUS_CODE_FIELD_NUMBER;
+ hash = (53 * hash) + getHttpErrorStatusCode();
+ hash = (37 * hash) + HTTP_ERROR_MESSAGE_FIELD_NUMBER;
+ hash = (53 * hash) + getHttpErrorMessage().hashCode();
+ hash = (37 * hash) + SELF_LINK_FIELD_NUMBER;
+ hash = (53 * hash) + getSelfLink().hashCode();
+ hash = (37 * hash) + REGION_FIELD_NUMBER;
+ hash = (53 * hash) + getRegion().hashCode();
+ hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
+ hash = (53 * hash) + getDescription().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.Operation parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.Operation parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Operation parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.Operation parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Operation parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Operation parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Operation parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Operation parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Operation parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Operation parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.Operation prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * An Operation resource, used to manage asynchronous API requests.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.Operation}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * [Output Only] Type of the resource. Always
+ * <code>compute#operation</code> for Operation resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public java.lang.String getKind() {
+ java.lang.Object ref = kind_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ kind_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#operation</code> for Operation resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public com.google.protobuf.ByteString
+ getKindBytes() {
+ java.lang.Object ref = kind_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ kind_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#operation</code> for Operation resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKind(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#operation</code> for Operation resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder clearKind() {
+
+ kind_ = getDefaultInstance().getKind();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#operation</code> for Operation resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ public Builder setKindBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ kind_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long id_ ;
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional fixed64 id = 1;
+ */
+ public long getId() {
+ return id_;
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional fixed64 id = 1;
+ */
+ public Builder setId(long value) {
+
+ id_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional fixed64 id = 1;
+ */
+ public Builder clearId() {
+
+ id_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object creationTimestamp_ = "";
+ /**
+ *
+ * [Deprecated] This field is deprecated.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public java.lang.String getCreationTimestamp() {
+ java.lang.Object ref = creationTimestamp_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ creationTimestamp_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Deprecated] This field is deprecated.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public com.google.protobuf.ByteString
+ getCreationTimestampBytes() {
+ java.lang.Object ref = creationTimestamp_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ creationTimestamp_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Deprecated] This field is deprecated.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public Builder setCreationTimestamp(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ creationTimestamp_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Deprecated] This field is deprecated.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public Builder clearCreationTimestamp() {
+
+ creationTimestamp_ = getDefaultInstance().getCreationTimestamp();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Deprecated] This field is deprecated.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ public Builder setCreationTimestampBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ creationTimestamp_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object name_ = "";
+ /**
+ *
+ * [Output Only] Name of the resource.
+ *
+ *
+ * optional string name = 3;
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Name of the resource.
+ *
+ *
+ * optional string name = 3;
+ */
+ public com.google.protobuf.ByteString
+ getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Name of the resource.
+ *
+ *
+ * optional string name = 3;
+ */
+ public Builder setName(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Name of the resource.
+ *
+ *
+ * optional string name = 3;
+ */
+ public Builder clearName() {
+
+ name_ = getDefaultInstance().getName();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Name of the resource.
+ *
+ *
+ * optional string name = 3;
+ */
+ public Builder setNameBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ name_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object zone_ = "";
+ /**
+ *
+ * [Output Only] The URL of the zone where the operation resides. Only
+ * available when performing per-zone operations.
+ *
+ *
+ * optional string zone = 4;
+ */
+ public java.lang.String getZone() {
+ java.lang.Object ref = zone_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ zone_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The URL of the zone where the operation resides. Only
+ * available when performing per-zone operations.
+ *
+ *
+ * optional string zone = 4;
+ */
+ public com.google.protobuf.ByteString
+ getZoneBytes() {
+ java.lang.Object ref = zone_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ zone_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The URL of the zone where the operation resides. Only
+ * available when performing per-zone operations.
+ *
+ *
+ * optional string zone = 4;
+ */
+ public Builder setZone(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The URL of the zone where the operation resides. Only
+ * available when performing per-zone operations.
+ *
+ *
+ * optional string zone = 4;
+ */
+ public Builder clearZone() {
+
+ zone_ = getDefaultInstance().getZone();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The URL of the zone where the operation resides. Only
+ * available when performing per-zone operations.
+ *
+ *
+ * optional string zone = 4;
+ */
+ public Builder setZoneBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ zone_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object clientOperationId_ = "";
+ /**
+ *
+ * [Output Only] Reserved for future use.
+ *
+ *
+ * optional string client_operation_id = 5;
+ */
+ public java.lang.String getClientOperationId() {
+ java.lang.Object ref = clientOperationId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ clientOperationId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Reserved for future use.
+ *
+ *
+ * optional string client_operation_id = 5;
+ */
+ public com.google.protobuf.ByteString
+ getClientOperationIdBytes() {
+ java.lang.Object ref = clientOperationId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ clientOperationId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Reserved for future use.
+ *
+ *
+ * optional string client_operation_id = 5;
+ */
+ public Builder setClientOperationId(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ clientOperationId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Reserved for future use.
+ *
+ *
+ * optional string client_operation_id = 5;
+ */
+ public Builder clearClientOperationId() {
+
+ clientOperationId_ = getDefaultInstance().getClientOperationId();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Reserved for future use.
+ *
+ *
+ * optional string client_operation_id = 5;
+ */
+ public Builder setClientOperationIdBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ clientOperationId_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object operationType_ = "";
+ /**
+ *
+ * [Output Only] The type of operation, such as <code>insert</code>,
+ * <code>update</code>, or <code>delete</code>, and so on.
+ *
+ *
+ * optional string operation_type = 6;
+ */
+ public java.lang.String getOperationType() {
+ java.lang.Object ref = operationType_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ operationType_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The type of operation, such as <code>insert</code>,
+ * <code>update</code>, or <code>delete</code>, and so on.
+ *
+ *
+ * optional string operation_type = 6;
+ */
+ public com.google.protobuf.ByteString
+ getOperationTypeBytes() {
+ java.lang.Object ref = operationType_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ operationType_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The type of operation, such as <code>insert</code>,
+ * <code>update</code>, or <code>delete</code>, and so on.
+ *
+ *
+ * optional string operation_type = 6;
+ */
+ public Builder setOperationType(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ operationType_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The type of operation, such as <code>insert</code>,
+ * <code>update</code>, or <code>delete</code>, and so on.
+ *
+ *
+ * optional string operation_type = 6;
+ */
+ public Builder clearOperationType() {
+
+ operationType_ = getDefaultInstance().getOperationType();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The type of operation, such as <code>insert</code>,
+ * <code>update</code>, or <code>delete</code>, and so on.
+ *
+ *
+ * optional string operation_type = 6;
+ */
+ public Builder setOperationTypeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ operationType_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object targetLink_ = "";
+ /**
+ *
+ * [Output Only] The URL of the resource that the operation modifies. For
+ * operations related to creating a snapshot, this points to the persistent
+ * disk that the snapshot was created from.
+ *
+ *
+ * optional string target_link = 7;
+ */
+ public java.lang.String getTargetLink() {
+ java.lang.Object ref = targetLink_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ targetLink_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The URL of the resource that the operation modifies. For
+ * operations related to creating a snapshot, this points to the persistent
+ * disk that the snapshot was created from.
+ *
+ *
+ * optional string target_link = 7;
+ */
+ public com.google.protobuf.ByteString
+ getTargetLinkBytes() {
+ java.lang.Object ref = targetLink_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ targetLink_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The URL of the resource that the operation modifies. For
+ * operations related to creating a snapshot, this points to the persistent
+ * disk that the snapshot was created from.
+ *
+ *
+ * optional string target_link = 7;
+ */
+ public Builder setTargetLink(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ targetLink_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The URL of the resource that the operation modifies. For
+ * operations related to creating a snapshot, this points to the persistent
+ * disk that the snapshot was created from.
+ *
+ *
+ * optional string target_link = 7;
+ */
+ public Builder clearTargetLink() {
+
+ targetLink_ = getDefaultInstance().getTargetLink();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The URL of the resource that the operation modifies. For
+ * operations related to creating a snapshot, this points to the persistent
+ * disk that the snapshot was created from.
+ *
+ *
+ * optional string target_link = 7;
+ */
+ public Builder setTargetLinkBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ targetLink_ = value;
+ onChanged();
+ return this;
+ }
+
+ private long targetId_ ;
+ /**
+ *
+ * [Output Only] The unique target ID, which identifies a specific incarnation
+ * of the target resource.
+ *
+ *
+ * optional fixed64 target_id = 8;
+ */
+ public long getTargetId() {
+ return targetId_;
+ }
+ /**
+ *
+ * [Output Only] The unique target ID, which identifies a specific incarnation
+ * of the target resource.
+ *
+ *
+ * optional fixed64 target_id = 8;
+ */
+ public Builder setTargetId(long value) {
+
+ targetId_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The unique target ID, which identifies a specific incarnation
+ * of the target resource.
+ *
+ *
+ * optional fixed64 target_id = 8;
+ */
+ public Builder clearTargetId() {
+
+ targetId_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private int status_ = 0;
+ /**
+ *
+ * [Output Only] The status of the operation, which can be one of the
+ * following:
+ * <code>PENDING</code>, <code>RUNNING</code>, or <code>DONE</code>.
+ *
+ *
+ * optional .google.compute.v1.OperationStatus status = 9;
+ */
+ public int getStatusValue() {
+ return status_;
+ }
+ /**
+ *
+ * [Output Only] The status of the operation, which can be one of the
+ * following:
+ * <code>PENDING</code>, <code>RUNNING</code>, or <code>DONE</code>.
+ *
+ *
+ * optional .google.compute.v1.OperationStatus status = 9;
+ */
+ public Builder setStatusValue(int value) {
+ status_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The status of the operation, which can be one of the
+ * following:
+ * <code>PENDING</code>, <code>RUNNING</code>, or <code>DONE</code>.
+ *
+ *
+ * optional .google.compute.v1.OperationStatus status = 9;
+ */
+ public com.google.cloud.compute.v1.OperationStatus getStatus() {
+ com.google.cloud.compute.v1.OperationStatus result = com.google.cloud.compute.v1.OperationStatus.valueOf(status_);
+ return result == null ? com.google.cloud.compute.v1.OperationStatus.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * [Output Only] The status of the operation, which can be one of the
+ * following:
+ * <code>PENDING</code>, <code>RUNNING</code>, or <code>DONE</code>.
+ *
+ *
+ * optional .google.compute.v1.OperationStatus status = 9;
+ */
+ public Builder setStatus(com.google.cloud.compute.v1.OperationStatus value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ status_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The status of the operation, which can be one of the
+ * following:
+ * <code>PENDING</code>, <code>RUNNING</code>, or <code>DONE</code>.
+ *
+ *
+ * optional .google.compute.v1.OperationStatus status = 9;
+ */
+ public Builder clearStatus() {
+
+ status_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object statusMessage_ = "";
+ /**
+ *
+ * [Output Only] An optional textual description of the current status of the
+ * operation.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public java.lang.String getStatusMessage() {
+ java.lang.Object ref = statusMessage_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ statusMessage_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] An optional textual description of the current status of the
+ * operation.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public com.google.protobuf.ByteString
+ getStatusMessageBytes() {
+ java.lang.Object ref = statusMessage_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ statusMessage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] An optional textual description of the current status of the
+ * operation.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public Builder setStatusMessage(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ statusMessage_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] An optional textual description of the current status of the
+ * operation.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public Builder clearStatusMessage() {
+
+ statusMessage_ = getDefaultInstance().getStatusMessage();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] An optional textual description of the current status of the
+ * operation.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ public Builder setStatusMessageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ statusMessage_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object user_ = "";
+ /**
+ *
+ * [Output Only] User who requested the operation, for example:
+ * <code>user@example.com</code>.
+ *
+ *
+ * optional string user = 11;
+ */
+ public java.lang.String getUser() {
+ java.lang.Object ref = user_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ user_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] User who requested the operation, for example:
+ * <code>user@example.com</code>.
+ *
+ *
+ * optional string user = 11;
+ */
+ public com.google.protobuf.ByteString
+ getUserBytes() {
+ java.lang.Object ref = user_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ user_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] User who requested the operation, for example:
+ * <code>user@example.com</code>.
+ *
+ *
+ * optional string user = 11;
+ */
+ public Builder setUser(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ user_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] User who requested the operation, for example:
+ * <code>user@example.com</code>.
+ *
+ *
+ * optional string user = 11;
+ */
+ public Builder clearUser() {
+
+ user_ = getDefaultInstance().getUser();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] User who requested the operation, for example:
+ * <code>user@example.com</code>.
+ *
+ *
+ * optional string user = 11;
+ */
+ public Builder setUserBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ user_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int progress_ ;
+ /**
+ *
+ * [Output Only] An optional progress indicator that ranges from 0 to 100.
+ * There is no requirement that this be linear or support any granularity of
+ * operations. This should not be used to guess when the operation will be
+ * complete. This number should monotonically increase as the operation
+ * progresses.
+ *
+ *
+ * optional int32 progress = 12;
+ */
+ public int getProgress() {
+ return progress_;
+ }
+ /**
+ *
+ * [Output Only] An optional progress indicator that ranges from 0 to 100.
+ * There is no requirement that this be linear or support any granularity of
+ * operations. This should not be used to guess when the operation will be
+ * complete. This number should monotonically increase as the operation
+ * progresses.
+ *
+ *
+ * optional int32 progress = 12;
+ */
+ public Builder setProgress(int value) {
+
+ progress_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] An optional progress indicator that ranges from 0 to 100.
+ * There is no requirement that this be linear or support any granularity of
+ * operations. This should not be used to guess when the operation will be
+ * complete. This number should monotonically increase as the operation
+ * progresses.
+ *
+ *
+ * optional int32 progress = 12;
+ */
+ public Builder clearProgress() {
+
+ progress_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object insertTime_ = "";
+ /**
+ *
+ * [Output Only] The time that this operation was requested.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string insert_time = 13;
+ */
+ public java.lang.String getInsertTime() {
+ java.lang.Object ref = insertTime_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ insertTime_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was requested.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string insert_time = 13;
+ */
+ public com.google.protobuf.ByteString
+ getInsertTimeBytes() {
+ java.lang.Object ref = insertTime_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ insertTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was requested.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string insert_time = 13;
+ */
+ public Builder setInsertTime(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ insertTime_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was requested.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string insert_time = 13;
+ */
+ public Builder clearInsertTime() {
+
+ insertTime_ = getDefaultInstance().getInsertTime();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was requested.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string insert_time = 13;
+ */
+ public Builder setInsertTimeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ insertTime_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object startTime_ = "";
+ /**
+ *
+ * [Output Only] The time that this operation was started by the server.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string start_time = 14;
+ */
+ public java.lang.String getStartTime() {
+ java.lang.Object ref = startTime_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ startTime_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was started by the server.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string start_time = 14;
+ */
+ public com.google.protobuf.ByteString
+ getStartTimeBytes() {
+ java.lang.Object ref = startTime_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ startTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was started by the server.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string start_time = 14;
+ */
+ public Builder setStartTime(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ startTime_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was started by the server.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string start_time = 14;
+ */
+ public Builder clearStartTime() {
+
+ startTime_ = getDefaultInstance().getStartTime();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was started by the server.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string start_time = 14;
+ */
+ public Builder setStartTimeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ startTime_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object endTime_ = "";
+ /**
+ *
+ * [Output Only] The time that this operation was completed. This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string end_time = 15;
+ */
+ public java.lang.String getEndTime() {
+ java.lang.Object ref = endTime_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ endTime_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was completed. This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string end_time = 15;
+ */
+ public com.google.protobuf.ByteString
+ getEndTimeBytes() {
+ java.lang.Object ref = endTime_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ endTime_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was completed. This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string end_time = 15;
+ */
+ public Builder setEndTime(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ endTime_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was completed. This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string end_time = 15;
+ */
+ public Builder clearEndTime() {
+
+ endTime_ = getDefaultInstance().getEndTime();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The time that this operation was completed. This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string end_time = 15;
+ */
+ public Builder setEndTimeBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ endTime_ = value;
+ onChanged();
+ return this;
+ }
+
+ private int httpErrorStatusCode_ ;
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * status code that was returned. For example, a <code>404</code> means the
+ * resource was not found.
+ *
+ *
+ * optional int32 http_error_status_code = 18;
+ */
+ public int getHttpErrorStatusCode() {
+ return httpErrorStatusCode_;
+ }
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * status code that was returned. For example, a <code>404</code> means the
+ * resource was not found.
+ *
+ *
+ * optional int32 http_error_status_code = 18;
+ */
+ public Builder setHttpErrorStatusCode(int value) {
+
+ httpErrorStatusCode_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * status code that was returned. For example, a <code>404</code> means the
+ * resource was not found.
+ *
+ *
+ * optional int32 http_error_status_code = 18;
+ */
+ public Builder clearHttpErrorStatusCode() {
+
+ httpErrorStatusCode_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object httpErrorMessage_ = "";
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * message that was returned, such as <code>NOT FOUND</code>.
+ *
+ *
+ * optional string http_error_message = 19;
+ */
+ public java.lang.String getHttpErrorMessage() {
+ java.lang.Object ref = httpErrorMessage_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ httpErrorMessage_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * message that was returned, such as <code>NOT FOUND</code>.
+ *
+ *
+ * optional string http_error_message = 19;
+ */
+ public com.google.protobuf.ByteString
+ getHttpErrorMessageBytes() {
+ java.lang.Object ref = httpErrorMessage_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ httpErrorMessage_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * message that was returned, such as <code>NOT FOUND</code>.
+ *
+ *
+ * optional string http_error_message = 19;
+ */
+ public Builder setHttpErrorMessage(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ httpErrorMessage_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * message that was returned, such as <code>NOT FOUND</code>.
+ *
+ *
+ * optional string http_error_message = 19;
+ */
+ public Builder clearHttpErrorMessage() {
+
+ httpErrorMessage_ = getDefaultInstance().getHttpErrorMessage();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * message that was returned, such as <code>NOT FOUND</code>.
+ *
+ *
+ * optional string http_error_message = 19;
+ */
+ public Builder setHttpErrorMessageBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ httpErrorMessage_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object selfLink_ = "";
+ /**
+ *
+ * [Output Only] Server-defined URL for the resource.
+ *
+ *
+ * optional string self_link = 20;
+ */
+ public java.lang.String getSelfLink() {
+ java.lang.Object ref = selfLink_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ selfLink_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for the resource.
+ *
+ *
+ * optional string self_link = 20;
+ */
+ public com.google.protobuf.ByteString
+ getSelfLinkBytes() {
+ java.lang.Object ref = selfLink_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ selfLink_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for the resource.
+ *
+ *
+ * optional string self_link = 20;
+ */
+ public Builder setSelfLink(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ selfLink_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for the resource.
+ *
+ *
+ * optional string self_link = 20;
+ */
+ public Builder clearSelfLink() {
+
+ selfLink_ = getDefaultInstance().getSelfLink();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] Server-defined URL for the resource.
+ *
+ *
+ * optional string self_link = 20;
+ */
+ public Builder setSelfLinkBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ selfLink_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object region_ = "";
+ /**
+ *
+ * [Output Only] The URL of the region where the operation resides. Only
+ * available when performing regional operations.
+ *
+ *
+ * optional string region = 21;
+ */
+ public java.lang.String getRegion() {
+ java.lang.Object ref = region_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ region_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The URL of the region where the operation resides. Only
+ * available when performing regional operations.
+ *
+ *
+ * optional string region = 21;
+ */
+ public com.google.protobuf.ByteString
+ getRegionBytes() {
+ java.lang.Object ref = region_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ region_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] The URL of the region where the operation resides. Only
+ * available when performing regional operations.
+ *
+ *
+ * optional string region = 21;
+ */
+ public Builder setRegion(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ region_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The URL of the region where the operation resides. Only
+ * available when performing regional operations.
+ *
+ *
+ * optional string region = 21;
+ */
+ public Builder clearRegion() {
+
+ region_ = getDefaultInstance().getRegion();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] The URL of the region where the operation resides. Only
+ * available when performing regional operations.
+ *
+ *
+ * optional string region = 21;
+ */
+ public Builder setRegionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ region_ = value;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object description_ = "";
+ /**
+ *
+ * [Output Only] A textual description of the operation, which is
+ * set when the operation is created.
+ *
+ *
+ * optional string description = 22;
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ description_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] A textual description of the operation, which is
+ * set when the operation is created.
+ *
+ *
+ * optional string description = 22;
+ */
+ public com.google.protobuf.ByteString
+ getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * [Output Only] A textual description of the operation, which is
+ * set when the operation is created.
+ *
+ *
+ * optional string description = 22;
+ */
+ public Builder setDescription(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ description_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A textual description of the operation, which is
+ * set when the operation is created.
+ *
+ *
+ * optional string description = 22;
+ */
+ public Builder clearDescription() {
+
+ description_ = getDefaultInstance().getDescription();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * [Output Only] A textual description of the operation, which is
+ * set when the operation is created.
+ *
+ *
+ * optional string description = 22;
+ */
+ public Builder setDescriptionBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ description_ = value;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.Operation)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.Operation)
+ private static final com.google.cloud.compute.v1.Operation DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Operation();
+ }
+
+ public static com.google.cloud.compute.v1.Operation getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * [Output Only] Type of the resource. Always
+ * <code>compute#operation</code> for Operation resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ java.lang.String getKind();
+ /**
+ *
+ * [Output Only] Type of the resource. Always
+ * <code>compute#operation</code> for Operation resources.
+ *
+ *
+ * optional string kind = 1000;
+ */
+ com.google.protobuf.ByteString
+ getKindBytes();
+
+ /**
+ *
+ * [Output Only] The unique identifier for the resource. This identifier is
+ * defined by the server.
+ *
+ *
+ * optional fixed64 id = 1;
+ */
+ long getId();
+
+ /**
+ *
+ * [Deprecated] This field is deprecated.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ java.lang.String getCreationTimestamp();
+ /**
+ *
+ * [Deprecated] This field is deprecated.
+ *
+ *
+ * optional string creation_timestamp = 2;
+ */
+ com.google.protobuf.ByteString
+ getCreationTimestampBytes();
+
+ /**
+ *
+ * [Output Only] Name of the resource.
+ *
+ *
+ * optional string name = 3;
+ */
+ java.lang.String getName();
+ /**
+ *
+ * [Output Only] Name of the resource.
+ *
+ *
+ * optional string name = 3;
+ */
+ com.google.protobuf.ByteString
+ getNameBytes();
+
+ /**
+ *
+ * [Output Only] The URL of the zone where the operation resides. Only
+ * available when performing per-zone operations.
+ *
+ *
+ * optional string zone = 4;
+ */
+ java.lang.String getZone();
+ /**
+ *
+ * [Output Only] The URL of the zone where the operation resides. Only
+ * available when performing per-zone operations.
+ *
+ *
+ * optional string zone = 4;
+ */
+ com.google.protobuf.ByteString
+ getZoneBytes();
+
+ /**
+ *
+ * [Output Only] Reserved for future use.
+ *
+ *
+ * optional string client_operation_id = 5;
+ */
+ java.lang.String getClientOperationId();
+ /**
+ *
+ * [Output Only] Reserved for future use.
+ *
+ *
+ * optional string client_operation_id = 5;
+ */
+ com.google.protobuf.ByteString
+ getClientOperationIdBytes();
+
+ /**
+ *
+ * [Output Only] The type of operation, such as <code>insert</code>,
+ * <code>update</code>, or <code>delete</code>, and so on.
+ *
+ *
+ * optional string operation_type = 6;
+ */
+ java.lang.String getOperationType();
+ /**
+ *
+ * [Output Only] The type of operation, such as <code>insert</code>,
+ * <code>update</code>, or <code>delete</code>, and so on.
+ *
+ *
+ * optional string operation_type = 6;
+ */
+ com.google.protobuf.ByteString
+ getOperationTypeBytes();
+
+ /**
+ *
+ * [Output Only] The URL of the resource that the operation modifies. For
+ * operations related to creating a snapshot, this points to the persistent
+ * disk that the snapshot was created from.
+ *
+ *
+ * optional string target_link = 7;
+ */
+ java.lang.String getTargetLink();
+ /**
+ *
+ * [Output Only] The URL of the resource that the operation modifies. For
+ * operations related to creating a snapshot, this points to the persistent
+ * disk that the snapshot was created from.
+ *
+ *
+ * optional string target_link = 7;
+ */
+ com.google.protobuf.ByteString
+ getTargetLinkBytes();
+
+ /**
+ *
+ * [Output Only] The unique target ID, which identifies a specific incarnation
+ * of the target resource.
+ *
+ *
+ * optional fixed64 target_id = 8;
+ */
+ long getTargetId();
+
+ /**
+ *
+ * [Output Only] The status of the operation, which can be one of the
+ * following:
+ * <code>PENDING</code>, <code>RUNNING</code>, or <code>DONE</code>.
+ *
+ *
+ * optional .google.compute.v1.OperationStatus status = 9;
+ */
+ int getStatusValue();
+ /**
+ *
+ * [Output Only] The status of the operation, which can be one of the
+ * following:
+ * <code>PENDING</code>, <code>RUNNING</code>, or <code>DONE</code>.
+ *
+ *
+ * optional .google.compute.v1.OperationStatus status = 9;
+ */
+ com.google.cloud.compute.v1.OperationStatus getStatus();
+
+ /**
+ *
+ * [Output Only] An optional textual description of the current status of the
+ * operation.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ java.lang.String getStatusMessage();
+ /**
+ *
+ * [Output Only] An optional textual description of the current status of the
+ * operation.
+ *
+ *
+ * optional string status_message = 10;
+ */
+ com.google.protobuf.ByteString
+ getStatusMessageBytes();
+
+ /**
+ *
+ * [Output Only] User who requested the operation, for example:
+ * <code>user@example.com</code>.
+ *
+ *
+ * optional string user = 11;
+ */
+ java.lang.String getUser();
+ /**
+ *
+ * [Output Only] User who requested the operation, for example:
+ * <code>user@example.com</code>.
+ *
+ *
+ * optional string user = 11;
+ */
+ com.google.protobuf.ByteString
+ getUserBytes();
+
+ /**
+ *
+ * [Output Only] An optional progress indicator that ranges from 0 to 100.
+ * There is no requirement that this be linear or support any granularity of
+ * operations. This should not be used to guess when the operation will be
+ * complete. This number should monotonically increase as the operation
+ * progresses.
+ *
+ *
+ * optional int32 progress = 12;
+ */
+ int getProgress();
+
+ /**
+ *
+ * [Output Only] The time that this operation was requested.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string insert_time = 13;
+ */
+ java.lang.String getInsertTime();
+ /**
+ *
+ * [Output Only] The time that this operation was requested.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string insert_time = 13;
+ */
+ com.google.protobuf.ByteString
+ getInsertTimeBytes();
+
+ /**
+ *
+ * [Output Only] The time that this operation was started by the server.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string start_time = 14;
+ */
+ java.lang.String getStartTime();
+ /**
+ *
+ * [Output Only] The time that this operation was started by the server.
+ * This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string start_time = 14;
+ */
+ com.google.protobuf.ByteString
+ getStartTimeBytes();
+
+ /**
+ *
+ * [Output Only] The time that this operation was completed. This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string end_time = 15;
+ */
+ java.lang.String getEndTime();
+ /**
+ *
+ * [Output Only] The time that this operation was completed. This value is in
+ * <a href="https://www.ietf.org/rfc/rfc3339.txt" target="_blank">RFC3339</a>
+ * text format.
+ *
+ *
+ * optional string end_time = 15;
+ */
+ com.google.protobuf.ByteString
+ getEndTimeBytes();
+
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * status code that was returned. For example, a <code>404</code> means the
+ * resource was not found.
+ *
+ *
+ * optional int32 http_error_status_code = 18;
+ */
+ int getHttpErrorStatusCode();
+
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * message that was returned, such as <code>NOT FOUND</code>.
+ *
+ *
+ * optional string http_error_message = 19;
+ */
+ java.lang.String getHttpErrorMessage();
+ /**
+ *
+ * [Output Only] If the operation fails, this field contains the HTTP error
+ * message that was returned, such as <code>NOT FOUND</code>.
+ *
+ *
+ * optional string http_error_message = 19;
+ */
+ com.google.protobuf.ByteString
+ getHttpErrorMessageBytes();
+
+ /**
+ *
+ * [Output Only] Server-defined URL for the resource.
+ *
+ *
+ * optional string self_link = 20;
+ */
+ java.lang.String getSelfLink();
+ /**
+ *
+ * [Output Only] Server-defined URL for the resource.
+ *
+ *
+ * optional string self_link = 20;
+ */
+ com.google.protobuf.ByteString
+ getSelfLinkBytes();
+
+ /**
+ *
+ * [Output Only] The URL of the region where the operation resides. Only
+ * available when performing regional operations.
+ *
+ *
+ * optional string region = 21;
+ */
+ java.lang.String getRegion();
+ /**
+ *
+ * [Output Only] The URL of the region where the operation resides. Only
+ * available when performing regional operations.
+ *
+ *
+ * optional string region = 21;
+ */
+ com.google.protobuf.ByteString
+ getRegionBytes();
+
+ /**
+ *
+ * [Output Only] A textual description of the operation, which is
+ * set when the operation is created.
+ *
+ *
+ * optional string description = 22;
+ */
+ java.lang.String getDescription();
+ /**
+ *
+ * [Output Only] A textual description of the operation, which is
+ * set when the operation is created.
+ *
+ *
+ * optional string description = 22;
+ */
+ com.google.protobuf.ByteString
+ getDescriptionBytes();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationStatus.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationStatus.java
new file mode 100644
index 000000000..82d6b697b
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/OperationStatus.java
@@ -0,0 +1,122 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ * Protobuf enum {@code google.compute.v1.OperationStatus}
+ */
+public enum OperationStatus
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ * UNKNOWN_OPERATION_STATUS = 0;
+ */
+ UNKNOWN_OPERATION_STATUS(0),
+ /**
+ * PENDING = 1;
+ */
+ PENDING(1),
+ /**
+ * RUNNING = 2;
+ */
+ RUNNING(2),
+ /**
+ * DONE = 3;
+ */
+ DONE(3),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ * UNKNOWN_OPERATION_STATUS = 0;
+ */
+ public static final int UNKNOWN_OPERATION_STATUS_VALUE = 0;
+ /**
+ * PENDING = 1;
+ */
+ public static final int PENDING_VALUE = 1;
+ /**
+ * RUNNING = 2;
+ */
+ public static final int RUNNING_VALUE = 2;
+ /**
+ * DONE = 3;
+ */
+ public static final int DONE_VALUE = 3;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static OperationStatus valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static OperationStatus forNumber(int value) {
+ switch (value) {
+ case 0: return UNKNOWN_OPERATION_STATUS;
+ case 1: return PENDING;
+ case 2: return RUNNING;
+ case 3: return DONE;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Sets the scheduling options for an Instance.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.Scheduling}
+ */
+public final class Scheduling extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.Scheduling)
+ SchedulingOrBuilder {
+ // Use Scheduling.newBuilder() to construct.
+ private Scheduling(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Scheduling() {
+ onHostMaintenance_ = 0;
+ automaticRestart_ = false;
+ preemptible_ = false;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private Scheduling(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 8: {
+ int rawValue = input.readEnum();
+
+ onHostMaintenance_ = rawValue;
+ break;
+ }
+ case 16: {
+
+ automaticRestart_ = input.readBool();
+ break;
+ }
+ case 24: {
+
+ preemptible_ = input.readBool();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_Scheduling_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_Scheduling_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.Scheduling.class, com.google.cloud.compute.v1.Scheduling.Builder.class);
+ }
+
+ /**
+ *
+ * Defines the maintenance behavior for this instance, either
+ * <code>TERMINATE</code> or <code>MIGRATE</code>. For standard instances, the
+ * default behavior is <code>MIGRATE</code>. For
+ * <a href="/compute/docs/instances/preemptible">preemptible instances</a>,
+ * the default, and only possible behavior, is <code>TERMINATE</code>. For
+ * more information, see
+ * <a href="/compute/docs/instances/setting-instance-scheduling-options">Setting Instance Scheduling Options</a>.
+ *
+ *
+ * Protobuf enum {@code google.compute.v1.Scheduling.OnHostMaintenance}
+ */
+ public enum OnHostMaintenance
+ implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ * <b>[Default]</b> Allows Compute Engine to automatically migrate instances
+ * out of the way of maintenance events.
+ *
+ *
+ * TERMINATE = 0;
+ */
+ TERMINATE(0),
+ /**
+ *
+ * Tells Compute Engine to terminate and (optionally) restart the instance
+ * away from the maintenance activity. If you would like your instance to be
+ * restarted, set the <code>automaticRestart</code> flag to true. Your
+ * instance may be restarted more than once, and it may be restarted outside
+ * the window of maintenance events.
+ *
+ *
+ * MIGRATE = 1000;
+ */
+ MIGRATE(1000),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ * <b>[Default]</b> Allows Compute Engine to automatically migrate instances
+ * out of the way of maintenance events.
+ *
+ *
+ * TERMINATE = 0;
+ */
+ public static final int TERMINATE_VALUE = 0;
+ /**
+ *
+ * Tells Compute Engine to terminate and (optionally) restart the instance
+ * away from the maintenance activity. If you would like your instance to be
+ * restarted, set the <code>automaticRestart</code> flag to true. Your
+ * instance may be restarted more than once, and it may be restarted outside
+ * the window of maintenance events.
+ *
+ *
+ * MIGRATE = 1000;
+ */
+ public static final int MIGRATE_VALUE = 1000;
+
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static OnHostMaintenance valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static OnHostMaintenance forNumber(int value) {
+ switch (value) {
+ case 0: return TERMINATE;
+ case 1000: return MIGRATE;
+ default: return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Defines the maintenance behavior for this instance. For standard instances,
+ * the default behavior is <code>MIGRATE</code>. For
+ * <a href="/compute/docs/instances/preemptible">preemptible instances</a>,
+ * the default and only possible behavior is <code>TERMINATE</code>. For more
+ * information, see
+ * <a href="/compute/docs/instances/setting-instance-scheduling-options">Setting Instance Scheduling Options</a>.
+ *
+ *
+ * optional .google.compute.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1;
+ */
+ public int getOnHostMaintenanceValue() {
+ return onHostMaintenance_;
+ }
+ /**
+ *
+ * Defines the maintenance behavior for this instance. For standard instances,
+ * the default behavior is <code>MIGRATE</code>. For
+ * <a href="/compute/docs/instances/preemptible">preemptible instances</a>,
+ * the default and only possible behavior is <code>TERMINATE</code>. For more
+ * information, see
+ * <a href="/compute/docs/instances/setting-instance-scheduling-options">Setting Instance Scheduling Options</a>.
+ *
+ *
+ * optional .google.compute.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1;
+ */
+ public com.google.cloud.compute.v1.Scheduling.OnHostMaintenance getOnHostMaintenance() {
+ com.google.cloud.compute.v1.Scheduling.OnHostMaintenance result = com.google.cloud.compute.v1.Scheduling.OnHostMaintenance.valueOf(onHostMaintenance_);
+ return result == null ? com.google.cloud.compute.v1.Scheduling.OnHostMaintenance.UNRECOGNIZED : result;
+ }
+
+ public static final int AUTOMATIC_RESTART_FIELD_NUMBER = 2;
+ private boolean automaticRestart_;
+ /**
+ *
+ * Specifies whether the instance should be automatically restarted if it is
+ * terminated by Compute Engine (not terminated by a user). You can only set
+ * the automatic restart option for standard instances.
+ * <a href="/compute/docs/instances/preemptible">Preemptible instances</a>
+ * cannot be automatically restarted.
+ * By default, this is set to <code>true</code> so an instance is
+ * automatically restarted if it is terminated by Compute Engine.
+ *
+ *
+ * optional bool automatic_restart = 2;
+ */
+ public boolean getAutomaticRestart() {
+ return automaticRestart_;
+ }
+
+ public static final int PREEMPTIBLE_FIELD_NUMBER = 3;
+ private boolean preemptible_;
+ /**
+ *
+ * Defines whether the instance is preemptible. This can only be set during
+ * instance creation, it cannot be set or changed after the instance has
+ * been created.
+ *
+ *
+ * optional bool preemptible = 3;
+ */
+ public boolean getPreemptible() {
+ return preemptible_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (onHostMaintenance_ != com.google.cloud.compute.v1.Scheduling.OnHostMaintenance.TERMINATE.getNumber()) {
+ output.writeEnum(1, onHostMaintenance_);
+ }
+ if (automaticRestart_ != false) {
+ output.writeBool(2, automaticRestart_);
+ }
+ if (preemptible_ != false) {
+ output.writeBool(3, preemptible_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (onHostMaintenance_ != com.google.cloud.compute.v1.Scheduling.OnHostMaintenance.TERMINATE.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeEnumSize(1, onHostMaintenance_);
+ }
+ if (automaticRestart_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(2, automaticRestart_);
+ }
+ if (preemptible_ != false) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBoolSize(3, preemptible_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.Scheduling)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.Scheduling other = (com.google.cloud.compute.v1.Scheduling) obj;
+
+ boolean result = true;
+ result = result && onHostMaintenance_ == other.onHostMaintenance_;
+ result = result && (getAutomaticRestart()
+ == other.getAutomaticRestart());
+ result = result && (getPreemptible()
+ == other.getPreemptible());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + ON_HOST_MAINTENANCE_FIELD_NUMBER;
+ hash = (53 * hash) + onHostMaintenance_;
+ hash = (37 * hash) + AUTOMATIC_RESTART_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getAutomaticRestart());
+ hash = (37 * hash) + PREEMPTIBLE_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
+ getPreemptible());
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.Scheduling parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.Scheduling parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Scheduling parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.Scheduling parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Scheduling parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Scheduling parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Scheduling parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Scheduling parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Scheduling parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Scheduling parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.Scheduling prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * Sets the scheduling options for an Instance.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.Scheduling}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * Defines the maintenance behavior for this instance. For standard instances,
+ * the default behavior is <code>MIGRATE</code>. For
+ * <a href="/compute/docs/instances/preemptible">preemptible instances</a>,
+ * the default and only possible behavior is <code>TERMINATE</code>. For more
+ * information, see
+ * <a href="/compute/docs/instances/setting-instance-scheduling-options">Setting Instance Scheduling Options</a>.
+ *
+ *
+ * optional .google.compute.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1;
+ */
+ public int getOnHostMaintenanceValue() {
+ return onHostMaintenance_;
+ }
+ /**
+ *
+ * Defines the maintenance behavior for this instance. For standard instances,
+ * the default behavior is <code>MIGRATE</code>. For
+ * <a href="/compute/docs/instances/preemptible">preemptible instances</a>,
+ * the default and only possible behavior is <code>TERMINATE</code>. For more
+ * information, see
+ * <a href="/compute/docs/instances/setting-instance-scheduling-options">Setting Instance Scheduling Options</a>.
+ *
+ *
+ * optional .google.compute.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1;
+ */
+ public Builder setOnHostMaintenanceValue(int value) {
+ onHostMaintenance_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Defines the maintenance behavior for this instance. For standard instances,
+ * the default behavior is <code>MIGRATE</code>. For
+ * <a href="/compute/docs/instances/preemptible">preemptible instances</a>,
+ * the default and only possible behavior is <code>TERMINATE</code>. For more
+ * information, see
+ * <a href="/compute/docs/instances/setting-instance-scheduling-options">Setting Instance Scheduling Options</a>.
+ *
+ *
+ * optional .google.compute.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1;
+ */
+ public com.google.cloud.compute.v1.Scheduling.OnHostMaintenance getOnHostMaintenance() {
+ com.google.cloud.compute.v1.Scheduling.OnHostMaintenance result = com.google.cloud.compute.v1.Scheduling.OnHostMaintenance.valueOf(onHostMaintenance_);
+ return result == null ? com.google.cloud.compute.v1.Scheduling.OnHostMaintenance.UNRECOGNIZED : result;
+ }
+ /**
+ *
+ * Defines the maintenance behavior for this instance. For standard instances,
+ * the default behavior is <code>MIGRATE</code>. For
+ * <a href="/compute/docs/instances/preemptible">preemptible instances</a>,
+ * the default and only possible behavior is <code>TERMINATE</code>. For more
+ * information, see
+ * <a href="/compute/docs/instances/setting-instance-scheduling-options">Setting Instance Scheduling Options</a>.
+ *
+ *
+ * optional .google.compute.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1;
+ */
+ public Builder setOnHostMaintenance(com.google.cloud.compute.v1.Scheduling.OnHostMaintenance value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ onHostMaintenance_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Defines the maintenance behavior for this instance. For standard instances,
+ * the default behavior is <code>MIGRATE</code>. For
+ * <a href="/compute/docs/instances/preemptible">preemptible instances</a>,
+ * the default and only possible behavior is <code>TERMINATE</code>. For more
+ * information, see
+ * <a href="/compute/docs/instances/setting-instance-scheduling-options">Setting Instance Scheduling Options</a>.
+ *
+ *
+ * optional .google.compute.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1;
+ */
+ public Builder clearOnHostMaintenance() {
+
+ onHostMaintenance_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private boolean automaticRestart_ ;
+ /**
+ *
+ * Specifies whether the instance should be automatically restarted if it is
+ * terminated by Compute Engine (not terminated by a user). You can only set
+ * the automatic restart option for standard instances.
+ * <a href="/compute/docs/instances/preemptible">Preemptible instances</a>
+ * cannot be automatically restarted.
+ * By default, this is set to <code>true</code> so an instance is
+ * automatically restarted if it is terminated by Compute Engine.
+ *
+ *
+ * optional bool automatic_restart = 2;
+ */
+ public boolean getAutomaticRestart() {
+ return automaticRestart_;
+ }
+ /**
+ *
+ * Specifies whether the instance should be automatically restarted if it is
+ * terminated by Compute Engine (not terminated by a user). You can only set
+ * the automatic restart option for standard instances.
+ * <a href="/compute/docs/instances/preemptible">Preemptible instances</a>
+ * cannot be automatically restarted.
+ * By default, this is set to <code>true</code> so an instance is
+ * automatically restarted if it is terminated by Compute Engine.
+ *
+ *
+ * optional bool automatic_restart = 2;
+ */
+ public Builder setAutomaticRestart(boolean value) {
+
+ automaticRestart_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies whether the instance should be automatically restarted if it is
+ * terminated by Compute Engine (not terminated by a user). You can only set
+ * the automatic restart option for standard instances.
+ * <a href="/compute/docs/instances/preemptible">Preemptible instances</a>
+ * cannot be automatically restarted.
+ * By default, this is set to <code>true</code> so an instance is
+ * automatically restarted if it is terminated by Compute Engine.
+ *
+ *
+ * optional bool automatic_restart = 2;
+ */
+ public Builder clearAutomaticRestart() {
+
+ automaticRestart_ = false;
+ onChanged();
+ return this;
+ }
+
+ private boolean preemptible_ ;
+ /**
+ *
+ * Defines whether the instance is preemptible. This can only be set during
+ * instance creation, it cannot be set or changed after the instance has
+ * been created.
+ *
+ *
+ * optional bool preemptible = 3;
+ */
+ public boolean getPreemptible() {
+ return preemptible_;
+ }
+ /**
+ *
+ * Defines whether the instance is preemptible. This can only be set during
+ * instance creation, it cannot be set or changed after the instance has
+ * been created.
+ *
+ *
+ * optional bool preemptible = 3;
+ */
+ public Builder setPreemptible(boolean value) {
+
+ preemptible_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Defines whether the instance is preemptible. This can only be set during
+ * instance creation, it cannot be set or changed after the instance has
+ * been created.
+ *
+ *
+ * optional bool preemptible = 3;
+ */
+ public Builder clearPreemptible() {
+
+ preemptible_ = false;
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.Scheduling)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.Scheduling)
+ private static final com.google.cloud.compute.v1.Scheduling DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Scheduling();
+ }
+
+ public static com.google.cloud.compute.v1.Scheduling getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Defines the maintenance behavior for this instance. For standard instances,
+ * the default behavior is <code>MIGRATE</code>. For
+ * <a href="/compute/docs/instances/preemptible">preemptible instances</a>,
+ * the default and only possible behavior is <code>TERMINATE</code>. For more
+ * information, see
+ * <a href="/compute/docs/instances/setting-instance-scheduling-options">Setting Instance Scheduling Options</a>.
+ *
+ *
+ * optional .google.compute.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1;
+ */
+ int getOnHostMaintenanceValue();
+ /**
+ *
+ * Defines the maintenance behavior for this instance. For standard instances,
+ * the default behavior is <code>MIGRATE</code>. For
+ * <a href="/compute/docs/instances/preemptible">preemptible instances</a>,
+ * the default and only possible behavior is <code>TERMINATE</code>. For more
+ * information, see
+ * <a href="/compute/docs/instances/setting-instance-scheduling-options">Setting Instance Scheduling Options</a>.
+ *
+ *
+ * optional .google.compute.v1.Scheduling.OnHostMaintenance on_host_maintenance = 1;
+ */
+ com.google.cloud.compute.v1.Scheduling.OnHostMaintenance getOnHostMaintenance();
+
+ /**
+ *
+ * Specifies whether the instance should be automatically restarted if it is
+ * terminated by Compute Engine (not terminated by a user). You can only set
+ * the automatic restart option for standard instances.
+ * <a href="/compute/docs/instances/preemptible">Preemptible instances</a>
+ * cannot be automatically restarted.
+ * By default, this is set to <code>true</code> so an instance is
+ * automatically restarted if it is terminated by Compute Engine.
+ *
+ *
+ * optional bool automatic_restart = 2;
+ */
+ boolean getAutomaticRestart();
+
+ /**
+ *
+ * Defines whether the instance is preemptible. This can only be set during
+ * instance creation, it cannot be set or changed after the instance has
+ * been created.
+ *
+ *
+ * optional bool preemptible = 3;
+ */
+ boolean getPreemptible();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAccount.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAccount.java
new file mode 100644
index 000000000..90e45566f
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/ServiceAccount.java
@@ -0,0 +1,757 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ *
+ * A service account.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.ServiceAccount}
+ */
+public final class ServiceAccount extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.ServiceAccount)
+ ServiceAccountOrBuilder {
+ // Use ServiceAccount.newBuilder() to construct.
+ private ServiceAccount(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private ServiceAccount() {
+ email_ = "";
+ scopes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private ServiceAccount(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+
+ email_ = s;
+ break;
+ }
+ case 18: {
+ java.lang.String s = input.readStringRequireUtf8();
+ if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ scopes_ = new com.google.protobuf.LazyStringArrayList();
+ mutable_bitField0_ |= 0x00000002;
+ }
+ scopes_.add(s);
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+ scopes_ = scopes_.getUnmodifiableView();
+ }
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_ServiceAccount_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_ServiceAccount_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.ServiceAccount.class, com.google.cloud.compute.v1.ServiceAccount.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int EMAIL_FIELD_NUMBER = 1;
+ private volatile java.lang.Object email_;
+ /**
+ *
+ * Email address of the service account.
+ *
+ *
+ * optional string email = 1;
+ */
+ public java.lang.String getEmail() {
+ java.lang.Object ref = email_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ email_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ * Email address of the service account.
+ *
+ *
+ * optional string email = 1;
+ */
+ public com.google.protobuf.ByteString
+ getEmailBytes() {
+ java.lang.Object ref = email_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ email_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SCOPES_FIELD_NUMBER = 2;
+ private com.google.protobuf.LazyStringList scopes_;
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getScopesList() {
+ return scopes_;
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public int getScopesCount() {
+ return scopes_.size();
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public java.lang.String getScopes(int index) {
+ return scopes_.get(index);
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public com.google.protobuf.ByteString
+ getScopesBytes(int index) {
+ return scopes_.getByteString(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!getEmailBytes().isEmpty()) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, email_);
+ }
+ for (int i = 0; i < scopes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, scopes_.getRaw(i));
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!getEmailBytes().isEmpty()) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, email_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < scopes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(scopes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getScopesList().size();
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.ServiceAccount)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.ServiceAccount other = (com.google.cloud.compute.v1.ServiceAccount) obj;
+
+ boolean result = true;
+ result = result && getEmail()
+ .equals(other.getEmail());
+ result = result && getScopesList()
+ .equals(other.getScopesList());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ hash = (37 * hash) + EMAIL_FIELD_NUMBER;
+ hash = (53 * hash) + getEmail().hashCode();
+ if (getScopesCount() > 0) {
+ hash = (37 * hash) + SCOPES_FIELD_NUMBER;
+ hash = (53 * hash) + getScopesList().hashCode();
+ }
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.ServiceAccount parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.ServiceAccount parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.ServiceAccount parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.ServiceAccount parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.ServiceAccount parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.ServiceAccount parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.ServiceAccount parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.ServiceAccount parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.ServiceAccount parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.ServiceAccount parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.ServiceAccount prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * A service account.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.ServiceAccount}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * Email address of the service account.
+ *
+ *
+ * optional string email = 1;
+ */
+ public java.lang.String getEmail() {
+ java.lang.Object ref = email_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs =
+ (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ email_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ * Email address of the service account.
+ *
+ *
+ * optional string email = 1;
+ */
+ public com.google.protobuf.ByteString
+ getEmailBytes() {
+ java.lang.Object ref = email_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8(
+ (java.lang.String) ref);
+ email_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ * Email address of the service account.
+ *
+ *
+ * optional string email = 1;
+ */
+ public Builder setEmail(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ email_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Email address of the service account.
+ *
+ *
+ * optional string email = 1;
+ */
+ public Builder clearEmail() {
+
+ email_ = getDefaultInstance().getEmail();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Email address of the service account.
+ *
+ *
+ * optional string email = 1;
+ */
+ public Builder setEmailBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+
+ email_ = value;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringList scopes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ private void ensureScopesIsMutable() {
+ if (!((bitField0_ & 0x00000002) == 0x00000002)) {
+ scopes_ = new com.google.protobuf.LazyStringArrayList(scopes_);
+ bitField0_ |= 0x00000002;
+ }
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getScopesList() {
+ return scopes_.getUnmodifiableView();
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public int getScopesCount() {
+ return scopes_.size();
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public java.lang.String getScopes(int index) {
+ return scopes_.get(index);
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public com.google.protobuf.ByteString
+ getScopesBytes(int index) {
+ return scopes_.getByteString(index);
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public Builder setScopes(
+ int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureScopesIsMutable();
+ scopes_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public Builder addScopes(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureScopesIsMutable();
+ scopes_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public Builder addAllScopes(
+ java.lang.Iterable
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public Builder clearScopes() {
+ scopes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ public Builder addScopesBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureScopesIsMutable();
+ scopes_.add(value);
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.ServiceAccount)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.ServiceAccount)
+ private static final com.google.cloud.compute.v1.ServiceAccount DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.ServiceAccount();
+ }
+
+ public static com.google.cloud.compute.v1.ServiceAccount getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Email address of the service account.
+ *
+ *
+ * optional string email = 1;
+ */
+ java.lang.String getEmail();
+ /**
+ *
+ * Email address of the service account.
+ *
+ *
+ * optional string email = 1;
+ */
+ com.google.protobuf.ByteString
+ getEmailBytes();
+
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ java.util.List
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ int getScopesCount();
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ java.lang.String getScopes(int index);
+ /**
+ *
+ * The list of scopes to be made available for this service account.
+ *
+ *
+ * repeated string scopes = 2;
+ */
+ com.google.protobuf.ByteString
+ getScopesBytes(int index);
+}
diff --git a/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Tags.java b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Tags.java
new file mode 100644
index 000000000..c0c455922
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/main/java/com/google/cloud/compute/v1/Tags.java
@@ -0,0 +1,729 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: google/compute/v1/compute_instances.proto
+
+package com.google.cloud.compute.v1;
+
+/**
+ *
+ * A set of instance tags.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.Tags}
+ */
+public final class Tags extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:google.compute.v1.Tags)
+ TagsOrBuilder {
+ // Use Tags.newBuilder() to construct.
+ private Tags(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+ private Tags() {
+ items_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ fingerprint_ = com.google.protobuf.ByteString.EMPTY;
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private Tags(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ this();
+ int mutable_bitField0_ = 0;
+ try {
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ default: {
+ if (!input.skipField(tag)) {
+ done = true;
+ }
+ break;
+ }
+ case 10: {
+ java.lang.String s = input.readStringRequireUtf8();
+ if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ items_ = new com.google.protobuf.LazyStringArrayList();
+ mutable_bitField0_ |= 0x00000001;
+ }
+ items_.add(s);
+ break;
+ }
+ case 18: {
+
+ fingerprint_ = input.readBytes();
+ break;
+ }
+ }
+ }
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(this);
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(
+ e).setUnfinishedMessage(this);
+ } finally {
+ if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+ items_ = items_.getUnmodifiableView();
+ }
+ makeExtensionsImmutable();
+ }
+ }
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_Tags_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.cloud.compute.v1.ComputeInstances.internal_static_google_compute_v1_Tags_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.cloud.compute.v1.Tags.class, com.google.cloud.compute.v1.Tags.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int ITEMS_FIELD_NUMBER = 1;
+ private com.google.protobuf.LazyStringList items_;
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getItemsList() {
+ return items_;
+ }
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public int getItemsCount() {
+ return items_.size();
+ }
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public java.lang.String getItems(int index) {
+ return items_.get(index);
+ }
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public com.google.protobuf.ByteString
+ getItemsBytes(int index) {
+ return items_.getByteString(index);
+ }
+
+ public static final int FINGERPRINT_FIELD_NUMBER = 2;
+ private com.google.protobuf.ByteString fingerprint_;
+ /**
+ *
+ * Specifies a fingerprint for this request, which is essentially a hash of
+ * the metadata's contents and used for optimistic locking. The
+ * fingerprint is initially generated by Compute Engine and changes after
+ * every request to modify or update metadata. You must always provide an
+ * up-to-date fingerprint hash in order to update or change metadata.
+ * To see the latest fingerprint, make <code>get()</code> request to the
+ * instance.
+ *
+ *
+ * optional bytes fingerprint = 2;
+ */
+ public com.google.protobuf.ByteString getFingerprint() {
+ return fingerprint_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ for (int i = 0; i < items_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, items_.getRaw(i));
+ }
+ if (!fingerprint_.isEmpty()) {
+ output.writeBytes(2, fingerprint_);
+ }
+ }
+
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < items_.size(); i++) {
+ dataSize += computeStringSizeNoTag(items_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getItemsList().size();
+ }
+ if (!fingerprint_.isEmpty()) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeBytesSize(2, fingerprint_);
+ }
+ memoizedSize = size;
+ return size;
+ }
+
+ private static final long serialVersionUID = 0L;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.cloud.compute.v1.Tags)) {
+ return super.equals(obj);
+ }
+ com.google.cloud.compute.v1.Tags other = (com.google.cloud.compute.v1.Tags) obj;
+
+ boolean result = true;
+ result = result && getItemsList()
+ .equals(other.getItemsList());
+ result = result && getFingerprint()
+ .equals(other.getFingerprint());
+ return result;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptorForType().hashCode();
+ if (getItemsCount() > 0) {
+ hash = (37 * hash) + ITEMS_FIELD_NUMBER;
+ hash = (53 * hash) + getItemsList().hashCode();
+ }
+ hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER;
+ hash = (53 * hash) + getFingerprint().hashCode();
+ hash = (29 * hash) + unknownFields.hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.cloud.compute.v1.Tags parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.Tags parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Tags parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static com.google.cloud.compute.v1.Tags parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Tags parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Tags parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Tags parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Tags parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
+ }
+ public static com.google.cloud.compute.v1.Tags parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static com.google.cloud.compute.v1.Tags parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input, extensionRegistry);
+ }
+
+ public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+ public static Builder newBuilder(com.google.cloud.compute.v1.Tags prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ *
+ * A set of instance tags.
+ *
+ *
+ * Protobuf type {@code google.compute.v1.Tags}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public com.google.protobuf.ProtocolStringList
+ getItemsList() {
+ return items_.getUnmodifiableView();
+ }
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public int getItemsCount() {
+ return items_.size();
+ }
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public java.lang.String getItems(int index) {
+ return items_.get(index);
+ }
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public com.google.protobuf.ByteString
+ getItemsBytes(int index) {
+ return items_.getByteString(index);
+ }
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public Builder setItems(
+ int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureItemsIsMutable();
+ items_.set(index, value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public Builder addItems(
+ java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureItemsIsMutable();
+ items_.add(value);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public Builder addAllItems(
+ java.lang.Iterable
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public Builder clearItems() {
+ items_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ public Builder addItemsBytes(
+ com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureItemsIsMutable();
+ items_.add(value);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.ByteString fingerprint_ = com.google.protobuf.ByteString.EMPTY;
+ /**
+ *
+ * Specifies a fingerprint for this request, which is essentially a hash of
+ * the metadata's contents and used for optimistic locking. The
+ * fingerprint is initially generated by Compute Engine and changes after
+ * every request to modify or update metadata. You must always provide an
+ * up-to-date fingerprint hash in order to update or change metadata.
+ * To see the latest fingerprint, make <code>get()</code> request to the
+ * instance.
+ *
+ *
+ * optional bytes fingerprint = 2;
+ */
+ public com.google.protobuf.ByteString getFingerprint() {
+ return fingerprint_;
+ }
+ /**
+ *
+ * Specifies a fingerprint for this request, which is essentially a hash of
+ * the metadata's contents and used for optimistic locking. The
+ * fingerprint is initially generated by Compute Engine and changes after
+ * every request to modify or update metadata. You must always provide an
+ * up-to-date fingerprint hash in order to update or change metadata.
+ * To see the latest fingerprint, make <code>get()</code> request to the
+ * instance.
+ *
+ *
+ * optional bytes fingerprint = 2;
+ */
+ public Builder setFingerprint(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+
+ fingerprint_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ * Specifies a fingerprint for this request, which is essentially a hash of
+ * the metadata's contents and used for optimistic locking. The
+ * fingerprint is initially generated by Compute Engine and changes after
+ * every request to modify or update metadata. You must always provide an
+ * up-to-date fingerprint hash in order to update or change metadata.
+ * To see the latest fingerprint, make <code>get()</code> request to the
+ * instance.
+ *
+ *
+ * optional bytes fingerprint = 2;
+ */
+ public Builder clearFingerprint() {
+
+ fingerprint_ = getDefaultInstance().getFingerprint();
+ onChanged();
+ return this;
+ }
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return this;
+ }
+
+
+ // @@protoc_insertion_point(builder_scope:google.compute.v1.Tags)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.compute.v1.Tags)
+ private static final com.google.cloud.compute.v1.Tags DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.cloud.compute.v1.Tags();
+ }
+
+ public static com.google.cloud.compute.v1.Tags getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ java.util.List
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ int getItemsCount();
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ java.lang.String getItems(int index);
+ /**
+ *
+ * An array of tags. Each tag must be 1-63 characters long, and comply
+ * with <a href="https://www.ietf.org/rfc/rfc1035.txt">RFC1035</a>.
+ * @pattern [a-z](?:[-a-z0-9]{0,61}[a-z0-9])?
+ *
+ *
+ * repeated string items = 1;
+ */
+ com.google.protobuf.ByteString
+ getItemsBytes(int index);
+
+ /**
+ *
+ * Specifies a fingerprint for this request, which is essentially a hash of
+ * the metadata's contents and used for optimistic locking. The
+ * fingerprint is initially generated by Compute Engine and changes after
+ * every request to modify or update metadata. You must always provide an
+ * up-to-date fingerprint hash in order to update or change metadata.
+ * To see the latest fingerprint, make <code>get()</code> request to the
+ * instance.
+ *
+ *
+ * optional bytes fingerprint = 2;
+ */
+ com.google.protobuf.ByteString getFingerprint();
+}
diff --git a/generated/java/google-cloud-compute-v1/src/test/java/com/google/cloud/compute/spi/v1/InstancesServiceClientTest.java b/generated/java/google-cloud-compute-v1/src/test/java/com/google/cloud/compute/spi/v1/InstancesServiceClientTest.java
new file mode 100644
index 000000000..70ee9798a
--- /dev/null
+++ b/generated/java/google-cloud-compute-v1/src/test/java/com/google/cloud/compute/spi/v1/InstancesServiceClientTest.java
@@ -0,0 +1,300 @@
+/*
+ * Copyright 2017, Google Inc. All rights reserved.
+ *
+ * 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
+ *
+ * http://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.spi.v1;
+
+import com.google.api.gax.grpc.ApiException;
+import com.google.api.gax.testing.MockGrpcService;
+import com.google.api.gax.testing.MockServiceHelper;
+import com.google.cloud.compute.v1.Instance;
+import com.google.cloud.compute.v1.InstancesDeleteRequest;
+import com.google.cloud.compute.v1.InstancesGetRequest;
+import com.google.cloud.compute.v1.InstancesInsertRequest;
+import com.google.cloud.compute.v1.Operation;
+import com.google.protobuf.GeneratedMessageV3;
+import io.grpc.Status;
+import io.grpc.StatusRuntimeException;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+@javax.annotation.Generated("by GAPIC")
+public class InstancesServiceClientTest {
+ private static MockInstancesService mockInstancesService;
+ private static MockServiceHelper serviceHelper;
+ private InstancesServiceClient client;
+
+ @BeforeClass
+ public static void startStaticServer() {
+ mockInstancesService = new MockInstancesService();
+ serviceHelper =
+ new MockServiceHelper("in-process-1", Arrays.