![JAR search and dependency download from the Maven repository](/logo.png)
com.google.cloud.dataproc.v1.InstanceGroupConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-dataproc-v1 Show documentation
Show all versions of proto-google-cloud-dataproc-v1 Show documentation
PROTO library for proto-google-cloud-dataproc-v1
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/dataproc/v1/clusters.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.dataproc.v1;
/**
*
*
*
* The config settings for Compute Engine resources in
* an instance group, such as a master or worker group.
*
*
* Protobuf type {@code google.cloud.dataproc.v1.InstanceGroupConfig}
*/
public final class InstanceGroupConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dataproc.v1.InstanceGroupConfig)
InstanceGroupConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use InstanceGroupConfig.newBuilder() to construct.
private InstanceGroupConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InstanceGroupConfig() {
instanceNames_ = com.google.protobuf.LazyStringArrayList.emptyList();
instanceReferences_ = java.util.Collections.emptyList();
imageUri_ = "";
machineTypeUri_ = "";
preemptibility_ = 0;
accelerators_ = java.util.Collections.emptyList();
minCpuPlatform_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new InstanceGroupConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataproc.v1.ClustersProto
.internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataproc.v1.ClustersProto
.internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataproc.v1.InstanceGroupConfig.class,
com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder.class);
}
/**
*
*
*
* Controls the use of preemptible instances within the group.
*
*
* Protobuf enum {@code google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility}
*/
public enum Preemptibility implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Preemptibility is unspecified, the system will choose the
* appropriate setting for each instance group.
*
*
* PREEMPTIBILITY_UNSPECIFIED = 0;
*/
PREEMPTIBILITY_UNSPECIFIED(0),
/**
*
*
*
* Instances are non-preemptible.
*
* This option is allowed for all instance groups and is the only valid
* value for Master and Worker instance groups.
*
*
* NON_PREEMPTIBLE = 1;
*/
NON_PREEMPTIBLE(1),
/**
*
*
*
* Instances are [preemptible]
* (https://cloud.google.com/compute/docs/instances/preemptible).
*
* This option is allowed only for [secondary worker]
* (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms)
* groups.
*
*
* PREEMPTIBLE = 2;
*/
PREEMPTIBLE(2),
/**
*
*
*
* Instances are [Spot VMs]
* (https://cloud.google.com/compute/docs/instances/spot).
*
* This option is allowed only for [secondary worker]
* (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms)
* groups. Spot VMs are the latest version of [preemptible VMs]
* (https://cloud.google.com/compute/docs/instances/preemptible), and
* provide additional features.
*
*
* SPOT = 3;
*/
SPOT(3),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Preemptibility is unspecified, the system will choose the
* appropriate setting for each instance group.
*
*
* PREEMPTIBILITY_UNSPECIFIED = 0;
*/
public static final int PREEMPTIBILITY_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Instances are non-preemptible.
*
* This option is allowed for all instance groups and is the only valid
* value for Master and Worker instance groups.
*
*
* NON_PREEMPTIBLE = 1;
*/
public static final int NON_PREEMPTIBLE_VALUE = 1;
/**
*
*
*
* Instances are [preemptible]
* (https://cloud.google.com/compute/docs/instances/preemptible).
*
* This option is allowed only for [secondary worker]
* (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms)
* groups.
*
*
* PREEMPTIBLE = 2;
*/
public static final int PREEMPTIBLE_VALUE = 2;
/**
*
*
*
* Instances are [Spot VMs]
* (https://cloud.google.com/compute/docs/instances/spot).
*
* This option is allowed only for [secondary worker]
* (https://cloud.google.com/dataproc/docs/concepts/compute/secondary-vms)
* groups. Spot VMs are the latest version of [preemptible VMs]
* (https://cloud.google.com/compute/docs/instances/preemptible), and
* provide additional features.
*
*
* SPOT = 3;
*/
public static final int SPOT_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;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Preemptibility valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Preemptibility forNumber(int value) {
switch (value) {
case 0:
return PREEMPTIBILITY_UNSPECIFIED;
case 1:
return NON_PREEMPTIBLE;
case 2:
return PREEMPTIBLE;
case 3:
return SPOT;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Preemptibility findValueByNumber(int number) {
return Preemptibility.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.dataproc.v1.InstanceGroupConfig.getDescriptor().getEnumTypes().get(0);
}
private static final Preemptibility[] VALUES = values();
public static Preemptibility valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Preemptibility(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility)
}
private int bitField0_;
public static final int NUM_INSTANCES_FIELD_NUMBER = 1;
private int numInstances_ = 0;
/**
*
*
*
* Optional. The number of VM instances in the instance group.
* For [HA
* cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
* [master_config](#FIELDS.master_config) groups, **must be set to 3**.
* For standard cluster [master_config](#FIELDS.master_config) groups,
* **must be set to 1**.
*
*
* int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The numInstances.
*/
@java.lang.Override
public int getNumInstances() {
return numInstances_;
}
public static final int INSTANCE_NAMES_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList instanceNames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return A list containing the instanceNames.
*/
public com.google.protobuf.ProtocolStringList getInstanceNamesList() {
return instanceNames_;
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The count of instanceNames.
*/
public int getInstanceNamesCount() {
return instanceNames_.size();
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param index The index of the element to return.
* @return The instanceNames at the given index.
*/
public java.lang.String getInstanceNames(int index) {
return instanceNames_.get(index);
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param index The index of the value to return.
* @return The bytes of the instanceNames at the given index.
*/
public com.google.protobuf.ByteString getInstanceNamesBytes(int index) {
return instanceNames_.getByteString(index);
}
public static final int INSTANCE_REFERENCES_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private java.util.List instanceReferences_;
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public java.util.List
getInstanceReferencesList() {
return instanceReferences_;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.dataproc.v1.InstanceReferenceOrBuilder>
getInstanceReferencesOrBuilderList() {
return instanceReferences_;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public int getInstanceReferencesCount() {
return instanceReferences_.size();
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.InstanceReference getInstanceReferences(int index) {
return instanceReferences_.get(index);
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.InstanceReferenceOrBuilder getInstanceReferencesOrBuilder(
int index) {
return instanceReferences_.get(index);
}
public static final int IMAGE_URI_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object imageUri_ = "";
/**
*
*
*
* Optional. The Compute Engine image resource used for cluster instances.
*
* The URI can represent an image or image family.
*
* Image examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]`
* * `projects/[project_id]/global/images/[image-id]`
* * `image-id`
*
* Image family examples. Dataproc will use the most recent
* image from the family:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]`
* * `projects/[project_id]/global/images/family/[custom-image-family-name]`
*
* If the URI is unspecified, it will be inferred from
* `SoftwareConfig.image_version` or the system default.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The imageUri.
*/
@java.lang.Override
public java.lang.String getImageUri() {
java.lang.Object ref = imageUri_;
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();
imageUri_ = s;
return s;
}
}
/**
*
*
*
* Optional. The Compute Engine image resource used for cluster instances.
*
* The URI can represent an image or image family.
*
* Image examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]`
* * `projects/[project_id]/global/images/[image-id]`
* * `image-id`
*
* Image family examples. Dataproc will use the most recent
* image from the family:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]`
* * `projects/[project_id]/global/images/family/[custom-image-family-name]`
*
* If the URI is unspecified, it will be inferred from
* `SoftwareConfig.image_version` or the system default.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for imageUri.
*/
@java.lang.Override
public com.google.protobuf.ByteString getImageUriBytes() {
java.lang.Object ref = imageUri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
imageUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MACHINE_TYPE_URI_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object machineTypeUri_ = "";
/**
*
*
*
* Optional. The Compute Engine machine type used for cluster instances.
*
* A full URL, partial URI, or short name are valid. Examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `n1-standard-2`
*
* **Auto Zone Exception**: If you are using the Dataproc
* [Auto Zone
* Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
* feature, you must use the short name of the machine type
* resource, for example, `n1-standard-2`.
*
*
* string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The machineTypeUri.
*/
@java.lang.Override
public java.lang.String getMachineTypeUri() {
java.lang.Object ref = machineTypeUri_;
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();
machineTypeUri_ = s;
return s;
}
}
/**
*
*
*
* Optional. The Compute Engine machine type used for cluster instances.
*
* A full URL, partial URI, or short name are valid. Examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `n1-standard-2`
*
* **Auto Zone Exception**: If you are using the Dataproc
* [Auto Zone
* Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
* feature, you must use the short name of the machine type
* resource, for example, `n1-standard-2`.
*
*
* string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for machineTypeUri.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMachineTypeUriBytes() {
java.lang.Object ref = machineTypeUri_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
machineTypeUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISK_CONFIG_FIELD_NUMBER = 5;
private com.google.cloud.dataproc.v1.DiskConfig diskConfig_;
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the diskConfig field is set.
*/
@java.lang.Override
public boolean hasDiskConfig() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The diskConfig.
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.DiskConfig getDiskConfig() {
return diskConfig_ == null
? com.google.cloud.dataproc.v1.DiskConfig.getDefaultInstance()
: diskConfig_;
}
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.DiskConfigOrBuilder getDiskConfigOrBuilder() {
return diskConfig_ == null
? com.google.cloud.dataproc.v1.DiskConfig.getDefaultInstance()
: diskConfig_;
}
public static final int IS_PREEMPTIBLE_FIELD_NUMBER = 6;
private boolean isPreemptible_ = false;
/**
*
*
*
* Output only. Specifies that this instance group contains preemptible
* instances.
*
*
* bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The isPreemptible.
*/
@java.lang.Override
public boolean getIsPreemptible() {
return isPreemptible_;
}
public static final int PREEMPTIBILITY_FIELD_NUMBER = 10;
private int preemptibility_ = 0;
/**
*
*
*
* Optional. Specifies the preemptibility of the instance group.
*
* The default value for master and worker groups is
* `NON_PREEMPTIBLE`. This default cannot be changed.
*
* The default value for secondary instances is
* `PREEMPTIBLE`.
*
*
*
* .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for preemptibility.
*/
@java.lang.Override
public int getPreemptibilityValue() {
return preemptibility_;
}
/**
*
*
*
* Optional. Specifies the preemptibility of the instance group.
*
* The default value for master and worker groups is
* `NON_PREEMPTIBLE`. This default cannot be changed.
*
* The default value for secondary instances is
* `PREEMPTIBLE`.
*
*
*
* .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The preemptibility.
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility getPreemptibility() {
com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility result =
com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility.forNumber(preemptibility_);
return result == null
? com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility.UNRECOGNIZED
: result;
}
public static final int MANAGED_GROUP_CONFIG_FIELD_NUMBER = 7;
private com.google.cloud.dataproc.v1.ManagedGroupConfig managedGroupConfig_;
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the managedGroupConfig field is set.
*/
@java.lang.Override
public boolean hasManagedGroupConfig() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The managedGroupConfig.
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.ManagedGroupConfig getManagedGroupConfig() {
return managedGroupConfig_ == null
? com.google.cloud.dataproc.v1.ManagedGroupConfig.getDefaultInstance()
: managedGroupConfig_;
}
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder getManagedGroupConfigOrBuilder() {
return managedGroupConfig_ == null
? com.google.cloud.dataproc.v1.ManagedGroupConfig.getDefaultInstance()
: managedGroupConfig_;
}
public static final int ACCELERATORS_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private java.util.List accelerators_;
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List getAcceleratorsList() {
return accelerators_;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder>
getAcceleratorsOrBuilderList() {
return accelerators_;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public int getAcceleratorsCount() {
return accelerators_.size();
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.AcceleratorConfig getAccelerators(int index) {
return accelerators_.get(index);
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder(
int index) {
return accelerators_.get(index);
}
public static final int MIN_CPU_PLATFORM_FIELD_NUMBER = 9;
@SuppressWarnings("serial")
private volatile java.lang.Object minCpuPlatform_ = "";
/**
*
*
*
* Optional. Specifies the minimum cpu platform for the Instance Group.
* See [Dataproc -> Minimum CPU
* Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
*
*
* string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The minCpuPlatform.
*/
@java.lang.Override
public java.lang.String getMinCpuPlatform() {
java.lang.Object ref = minCpuPlatform_;
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();
minCpuPlatform_ = s;
return s;
}
}
/**
*
*
*
* Optional. Specifies the minimum cpu platform for the Instance Group.
* See [Dataproc -> Minimum CPU
* Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
*
*
* string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for minCpuPlatform.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMinCpuPlatformBytes() {
java.lang.Object ref = minCpuPlatform_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
minCpuPlatform_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MIN_NUM_INSTANCES_FIELD_NUMBER = 12;
private int minNumInstances_ = 0;
/**
*
*
*
* Optional. The minimum number of primary worker instances to create.
* If `min_num_instances` is set, cluster creation will succeed if
* the number of primary workers created is at least equal to the
* `min_num_instances` number.
*
* Example: Cluster creation request with `num_instances` = `5` and
* `min_num_instances` = `3`:
*
* * If 4 VMs are created and 1 instance fails,
* the failed VM is deleted. The cluster is
* resized to 4 instances and placed in a `RUNNING` state.
* * If 2 instances are created and 3 instances fail,
* the cluster in placed in an `ERROR` state. The failed VMs
* are not deleted.
*
*
* int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The minNumInstances.
*/
@java.lang.Override
public int getMinNumInstances() {
return minNumInstances_;
}
public static final int INSTANCE_FLEXIBILITY_POLICY_FIELD_NUMBER = 13;
private com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy instanceFlexibilityPolicy_;
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the instanceFlexibilityPolicy field is set.
*/
@java.lang.Override
public boolean hasInstanceFlexibilityPolicy() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The instanceFlexibilityPolicy.
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy getInstanceFlexibilityPolicy() {
return instanceFlexibilityPolicy_ == null
? com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.getDefaultInstance()
: instanceFlexibilityPolicy_;
}
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.InstanceFlexibilityPolicyOrBuilder
getInstanceFlexibilityPolicyOrBuilder() {
return instanceFlexibilityPolicy_ == null
? com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.getDefaultInstance()
: instanceFlexibilityPolicy_;
}
public static final int STARTUP_CONFIG_FIELD_NUMBER = 14;
private com.google.cloud.dataproc.v1.StartupConfig startupConfig_;
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the startupConfig field is set.
*/
@java.lang.Override
public boolean hasStartupConfig() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The startupConfig.
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.StartupConfig getStartupConfig() {
return startupConfig_ == null
? com.google.cloud.dataproc.v1.StartupConfig.getDefaultInstance()
: startupConfig_;
}
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.StartupConfigOrBuilder getStartupConfigOrBuilder() {
return startupConfig_ == null
? com.google.cloud.dataproc.v1.StartupConfig.getDefaultInstance()
: startupConfig_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (numInstances_ != 0) {
output.writeInt32(1, numInstances_);
}
for (int i = 0; i < instanceNames_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, instanceNames_.getRaw(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, imageUri_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineTypeUri_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, machineTypeUri_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(5, getDiskConfig());
}
if (isPreemptible_ != false) {
output.writeBool(6, isPreemptible_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(7, getManagedGroupConfig());
}
for (int i = 0; i < accelerators_.size(); i++) {
output.writeMessage(8, accelerators_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(minCpuPlatform_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, minCpuPlatform_);
}
if (preemptibility_
!= com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility
.PREEMPTIBILITY_UNSPECIFIED
.getNumber()) {
output.writeEnum(10, preemptibility_);
}
for (int i = 0; i < instanceReferences_.size(); i++) {
output.writeMessage(11, instanceReferences_.get(i));
}
if (minNumInstances_ != 0) {
output.writeInt32(12, minNumInstances_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(13, getInstanceFlexibilityPolicy());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(14, getStartupConfig());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (numInstances_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, numInstances_);
}
{
int dataSize = 0;
for (int i = 0; i < instanceNames_.size(); i++) {
dataSize += computeStringSizeNoTag(instanceNames_.getRaw(i));
}
size += dataSize;
size += 1 * getInstanceNamesList().size();
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(imageUri_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, imageUri_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineTypeUri_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, machineTypeUri_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDiskConfig());
}
if (isPreemptible_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, isPreemptible_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getManagedGroupConfig());
}
for (int i = 0; i < accelerators_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, accelerators_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(minCpuPlatform_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, minCpuPlatform_);
}
if (preemptibility_
!= com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility
.PREEMPTIBILITY_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, preemptibility_);
}
for (int i = 0; i < instanceReferences_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(11, instanceReferences_.get(i));
}
if (minNumInstances_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(12, minNumInstances_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
13, getInstanceFlexibilityPolicy());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getStartupConfig());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dataproc.v1.InstanceGroupConfig)) {
return super.equals(obj);
}
com.google.cloud.dataproc.v1.InstanceGroupConfig other =
(com.google.cloud.dataproc.v1.InstanceGroupConfig) obj;
if (getNumInstances() != other.getNumInstances()) return false;
if (!getInstanceNamesList().equals(other.getInstanceNamesList())) return false;
if (!getInstanceReferencesList().equals(other.getInstanceReferencesList())) return false;
if (!getImageUri().equals(other.getImageUri())) return false;
if (!getMachineTypeUri().equals(other.getMachineTypeUri())) return false;
if (hasDiskConfig() != other.hasDiskConfig()) return false;
if (hasDiskConfig()) {
if (!getDiskConfig().equals(other.getDiskConfig())) return false;
}
if (getIsPreemptible() != other.getIsPreemptible()) return false;
if (preemptibility_ != other.preemptibility_) return false;
if (hasManagedGroupConfig() != other.hasManagedGroupConfig()) return false;
if (hasManagedGroupConfig()) {
if (!getManagedGroupConfig().equals(other.getManagedGroupConfig())) return false;
}
if (!getAcceleratorsList().equals(other.getAcceleratorsList())) return false;
if (!getMinCpuPlatform().equals(other.getMinCpuPlatform())) return false;
if (getMinNumInstances() != other.getMinNumInstances()) return false;
if (hasInstanceFlexibilityPolicy() != other.hasInstanceFlexibilityPolicy()) return false;
if (hasInstanceFlexibilityPolicy()) {
if (!getInstanceFlexibilityPolicy().equals(other.getInstanceFlexibilityPolicy()))
return false;
}
if (hasStartupConfig() != other.hasStartupConfig()) return false;
if (hasStartupConfig()) {
if (!getStartupConfig().equals(other.getStartupConfig())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NUM_INSTANCES_FIELD_NUMBER;
hash = (53 * hash) + getNumInstances();
if (getInstanceNamesCount() > 0) {
hash = (37 * hash) + INSTANCE_NAMES_FIELD_NUMBER;
hash = (53 * hash) + getInstanceNamesList().hashCode();
}
if (getInstanceReferencesCount() > 0) {
hash = (37 * hash) + INSTANCE_REFERENCES_FIELD_NUMBER;
hash = (53 * hash) + getInstanceReferencesList().hashCode();
}
hash = (37 * hash) + IMAGE_URI_FIELD_NUMBER;
hash = (53 * hash) + getImageUri().hashCode();
hash = (37 * hash) + MACHINE_TYPE_URI_FIELD_NUMBER;
hash = (53 * hash) + getMachineTypeUri().hashCode();
if (hasDiskConfig()) {
hash = (37 * hash) + DISK_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getDiskConfig().hashCode();
}
hash = (37 * hash) + IS_PREEMPTIBLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsPreemptible());
hash = (37 * hash) + PREEMPTIBILITY_FIELD_NUMBER;
hash = (53 * hash) + preemptibility_;
if (hasManagedGroupConfig()) {
hash = (37 * hash) + MANAGED_GROUP_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getManagedGroupConfig().hashCode();
}
if (getAcceleratorsCount() > 0) {
hash = (37 * hash) + ACCELERATORS_FIELD_NUMBER;
hash = (53 * hash) + getAcceleratorsList().hashCode();
}
hash = (37 * hash) + MIN_CPU_PLATFORM_FIELD_NUMBER;
hash = (53 * hash) + getMinCpuPlatform().hashCode();
hash = (37 * hash) + MIN_NUM_INSTANCES_FIELD_NUMBER;
hash = (53 * hash) + getMinNumInstances();
if (hasInstanceFlexibilityPolicy()) {
hash = (37 * hash) + INSTANCE_FLEXIBILITY_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getInstanceFlexibilityPolicy().hashCode();
}
if (hasStartupConfig()) {
hash = (37 * hash) + STARTUP_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getStartupConfig().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dataproc.v1.InstanceGroupConfig parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataproc.v1.InstanceGroupConfig parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dataproc.v1.InstanceGroupConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataproc.v1.InstanceGroupConfig 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.dataproc.v1.InstanceGroupConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dataproc.v1.InstanceGroupConfig parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dataproc.v1.InstanceGroupConfig parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dataproc.v1.InstanceGroupConfig 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.dataproc.v1.InstanceGroupConfig parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dataproc.v1.InstanceGroupConfig 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.dataproc.v1.InstanceGroupConfig parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dataproc.v1.InstanceGroupConfig parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.dataproc.v1.InstanceGroupConfig prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
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;
}
/**
*
*
*
* The config settings for Compute Engine resources in
* an instance group, such as a master or worker group.
*
*
* Protobuf type {@code google.cloud.dataproc.v1.InstanceGroupConfig}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dataproc.v1.InstanceGroupConfig)
com.google.cloud.dataproc.v1.InstanceGroupConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dataproc.v1.ClustersProto
.internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dataproc.v1.ClustersProto
.internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dataproc.v1.InstanceGroupConfig.class,
com.google.cloud.dataproc.v1.InstanceGroupConfig.Builder.class);
}
// Construct using com.google.cloud.dataproc.v1.InstanceGroupConfig.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getInstanceReferencesFieldBuilder();
getDiskConfigFieldBuilder();
getManagedGroupConfigFieldBuilder();
getAcceleratorsFieldBuilder();
getInstanceFlexibilityPolicyFieldBuilder();
getStartupConfigFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
numInstances_ = 0;
instanceNames_ = com.google.protobuf.LazyStringArrayList.emptyList();
if (instanceReferencesBuilder_ == null) {
instanceReferences_ = java.util.Collections.emptyList();
} else {
instanceReferences_ = null;
instanceReferencesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
imageUri_ = "";
machineTypeUri_ = "";
diskConfig_ = null;
if (diskConfigBuilder_ != null) {
diskConfigBuilder_.dispose();
diskConfigBuilder_ = null;
}
isPreemptible_ = false;
preemptibility_ = 0;
managedGroupConfig_ = null;
if (managedGroupConfigBuilder_ != null) {
managedGroupConfigBuilder_.dispose();
managedGroupConfigBuilder_ = null;
}
if (acceleratorsBuilder_ == null) {
accelerators_ = java.util.Collections.emptyList();
} else {
accelerators_ = null;
acceleratorsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000200);
minCpuPlatform_ = "";
minNumInstances_ = 0;
instanceFlexibilityPolicy_ = null;
if (instanceFlexibilityPolicyBuilder_ != null) {
instanceFlexibilityPolicyBuilder_.dispose();
instanceFlexibilityPolicyBuilder_ = null;
}
startupConfig_ = null;
if (startupConfigBuilder_ != null) {
startupConfigBuilder_.dispose();
startupConfigBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dataproc.v1.ClustersProto
.internal_static_google_cloud_dataproc_v1_InstanceGroupConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.dataproc.v1.InstanceGroupConfig getDefaultInstanceForType() {
return com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dataproc.v1.InstanceGroupConfig build() {
com.google.cloud.dataproc.v1.InstanceGroupConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dataproc.v1.InstanceGroupConfig buildPartial() {
com.google.cloud.dataproc.v1.InstanceGroupConfig result =
new com.google.cloud.dataproc.v1.InstanceGroupConfig(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.dataproc.v1.InstanceGroupConfig result) {
if (instanceReferencesBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
instanceReferences_ = java.util.Collections.unmodifiableList(instanceReferences_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.instanceReferences_ = instanceReferences_;
} else {
result.instanceReferences_ = instanceReferencesBuilder_.build();
}
if (acceleratorsBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0)) {
accelerators_ = java.util.Collections.unmodifiableList(accelerators_);
bitField0_ = (bitField0_ & ~0x00000200);
}
result.accelerators_ = accelerators_;
} else {
result.accelerators_ = acceleratorsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.dataproc.v1.InstanceGroupConfig result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.numInstances_ = numInstances_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
instanceNames_.makeImmutable();
result.instanceNames_ = instanceNames_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.imageUri_ = imageUri_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.machineTypeUri_ = machineTypeUri_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.diskConfig_ = diskConfigBuilder_ == null ? diskConfig_ : diskConfigBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.isPreemptible_ = isPreemptible_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.preemptibility_ = preemptibility_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.managedGroupConfig_ =
managedGroupConfigBuilder_ == null
? managedGroupConfig_
: managedGroupConfigBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.minCpuPlatform_ = minCpuPlatform_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.minNumInstances_ = minNumInstances_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.instanceFlexibilityPolicy_ =
instanceFlexibilityPolicyBuilder_ == null
? instanceFlexibilityPolicy_
: instanceFlexibilityPolicyBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.startupConfig_ =
startupConfigBuilder_ == null ? startupConfig_ : startupConfigBuilder_.build();
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dataproc.v1.InstanceGroupConfig) {
return mergeFrom((com.google.cloud.dataproc.v1.InstanceGroupConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dataproc.v1.InstanceGroupConfig other) {
if (other == com.google.cloud.dataproc.v1.InstanceGroupConfig.getDefaultInstance())
return this;
if (other.getNumInstances() != 0) {
setNumInstances(other.getNumInstances());
}
if (!other.instanceNames_.isEmpty()) {
if (instanceNames_.isEmpty()) {
instanceNames_ = other.instanceNames_;
bitField0_ |= 0x00000002;
} else {
ensureInstanceNamesIsMutable();
instanceNames_.addAll(other.instanceNames_);
}
onChanged();
}
if (instanceReferencesBuilder_ == null) {
if (!other.instanceReferences_.isEmpty()) {
if (instanceReferences_.isEmpty()) {
instanceReferences_ = other.instanceReferences_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureInstanceReferencesIsMutable();
instanceReferences_.addAll(other.instanceReferences_);
}
onChanged();
}
} else {
if (!other.instanceReferences_.isEmpty()) {
if (instanceReferencesBuilder_.isEmpty()) {
instanceReferencesBuilder_.dispose();
instanceReferencesBuilder_ = null;
instanceReferences_ = other.instanceReferences_;
bitField0_ = (bitField0_ & ~0x00000004);
instanceReferencesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getInstanceReferencesFieldBuilder()
: null;
} else {
instanceReferencesBuilder_.addAllMessages(other.instanceReferences_);
}
}
}
if (!other.getImageUri().isEmpty()) {
imageUri_ = other.imageUri_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getMachineTypeUri().isEmpty()) {
machineTypeUri_ = other.machineTypeUri_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasDiskConfig()) {
mergeDiskConfig(other.getDiskConfig());
}
if (other.getIsPreemptible() != false) {
setIsPreemptible(other.getIsPreemptible());
}
if (other.preemptibility_ != 0) {
setPreemptibilityValue(other.getPreemptibilityValue());
}
if (other.hasManagedGroupConfig()) {
mergeManagedGroupConfig(other.getManagedGroupConfig());
}
if (acceleratorsBuilder_ == null) {
if (!other.accelerators_.isEmpty()) {
if (accelerators_.isEmpty()) {
accelerators_ = other.accelerators_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureAcceleratorsIsMutable();
accelerators_.addAll(other.accelerators_);
}
onChanged();
}
} else {
if (!other.accelerators_.isEmpty()) {
if (acceleratorsBuilder_.isEmpty()) {
acceleratorsBuilder_.dispose();
acceleratorsBuilder_ = null;
accelerators_ = other.accelerators_;
bitField0_ = (bitField0_ & ~0x00000200);
acceleratorsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getAcceleratorsFieldBuilder()
: null;
} else {
acceleratorsBuilder_.addAllMessages(other.accelerators_);
}
}
}
if (!other.getMinCpuPlatform().isEmpty()) {
minCpuPlatform_ = other.minCpuPlatform_;
bitField0_ |= 0x00000400;
onChanged();
}
if (other.getMinNumInstances() != 0) {
setMinNumInstances(other.getMinNumInstances());
}
if (other.hasInstanceFlexibilityPolicy()) {
mergeInstanceFlexibilityPolicy(other.getInstanceFlexibilityPolicy());
}
if (other.hasStartupConfig()) {
mergeStartupConfig(other.getStartupConfig());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
numInstances_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
ensureInstanceNamesIsMutable();
instanceNames_.add(s);
break;
} // case 18
case 26:
{
imageUri_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 26
case 34:
{
machineTypeUri_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 34
case 42:
{
input.readMessage(getDiskConfigFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 42
case 48:
{
isPreemptible_ = input.readBool();
bitField0_ |= 0x00000040;
break;
} // case 48
case 58:
{
input.readMessage(
getManagedGroupConfigFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 58
case 66:
{
com.google.cloud.dataproc.v1.AcceleratorConfig m =
input.readMessage(
com.google.cloud.dataproc.v1.AcceleratorConfig.parser(), extensionRegistry);
if (acceleratorsBuilder_ == null) {
ensureAcceleratorsIsMutable();
accelerators_.add(m);
} else {
acceleratorsBuilder_.addMessage(m);
}
break;
} // case 66
case 74:
{
minCpuPlatform_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000400;
break;
} // case 74
case 80:
{
preemptibility_ = input.readEnum();
bitField0_ |= 0x00000080;
break;
} // case 80
case 90:
{
com.google.cloud.dataproc.v1.InstanceReference m =
input.readMessage(
com.google.cloud.dataproc.v1.InstanceReference.parser(), extensionRegistry);
if (instanceReferencesBuilder_ == null) {
ensureInstanceReferencesIsMutable();
instanceReferences_.add(m);
} else {
instanceReferencesBuilder_.addMessage(m);
}
break;
} // case 90
case 96:
{
minNumInstances_ = input.readInt32();
bitField0_ |= 0x00000800;
break;
} // case 96
case 106:
{
input.readMessage(
getInstanceFlexibilityPolicyFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00001000;
break;
} // case 106
case 114:
{
input.readMessage(getStartupConfigFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00002000;
break;
} // case 114
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int numInstances_;
/**
*
*
*
* Optional. The number of VM instances in the instance group.
* For [HA
* cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
* [master_config](#FIELDS.master_config) groups, **must be set to 3**.
* For standard cluster [master_config](#FIELDS.master_config) groups,
* **must be set to 1**.
*
*
* int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The numInstances.
*/
@java.lang.Override
public int getNumInstances() {
return numInstances_;
}
/**
*
*
*
* Optional. The number of VM instances in the instance group.
* For [HA
* cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
* [master_config](#FIELDS.master_config) groups, **must be set to 3**.
* For standard cluster [master_config](#FIELDS.master_config) groups,
* **must be set to 1**.
*
*
* int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The numInstances to set.
* @return This builder for chaining.
*/
public Builder setNumInstances(int value) {
numInstances_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Optional. The number of VM instances in the instance group.
* For [HA
* cluster](/dataproc/docs/concepts/configuring-clusters/high-availability)
* [master_config](#FIELDS.master_config) groups, **must be set to 3**.
* For standard cluster [master_config](#FIELDS.master_config) groups,
* **must be set to 1**.
*
*
* int32 num_instances = 1 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearNumInstances() {
bitField0_ = (bitField0_ & ~0x00000001);
numInstances_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList instanceNames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureInstanceNamesIsMutable() {
if (!instanceNames_.isModifiable()) {
instanceNames_ = new com.google.protobuf.LazyStringArrayList(instanceNames_);
}
bitField0_ |= 0x00000002;
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return A list containing the instanceNames.
*/
public com.google.protobuf.ProtocolStringList getInstanceNamesList() {
instanceNames_.makeImmutable();
return instanceNames_;
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The count of instanceNames.
*/
public int getInstanceNamesCount() {
return instanceNames_.size();
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param index The index of the element to return.
* @return The instanceNames at the given index.
*/
public java.lang.String getInstanceNames(int index) {
return instanceNames_.get(index);
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param index The index of the value to return.
* @return The bytes of the instanceNames at the given index.
*/
public com.google.protobuf.ByteString getInstanceNamesBytes(int index) {
return instanceNames_.getByteString(index);
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param index The index to set the value at.
* @param value The instanceNames to set.
* @return This builder for chaining.
*/
public Builder setInstanceNames(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInstanceNamesIsMutable();
instanceNames_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The instanceNames to add.
* @return This builder for chaining.
*/
public Builder addInstanceNames(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureInstanceNamesIsMutable();
instanceNames_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param values The instanceNames to add.
* @return This builder for chaining.
*/
public Builder addAllInstanceNames(java.lang.Iterable values) {
ensureInstanceNamesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceNames_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearInstanceNames() {
instanceNames_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
;
onChanged();
return this;
}
/**
*
*
*
* Output only. The list of instance names. Dataproc derives the names
* from `cluster_name`, `num_instances`, and the instance group.
*
*
* repeated string instance_names = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes of the instanceNames to add.
* @return This builder for chaining.
*/
public Builder addInstanceNamesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureInstanceNamesIsMutable();
instanceNames_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.util.List instanceReferences_ =
java.util.Collections.emptyList();
private void ensureInstanceReferencesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
instanceReferences_ =
new java.util.ArrayList(
instanceReferences_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dataproc.v1.InstanceReference,
com.google.cloud.dataproc.v1.InstanceReference.Builder,
com.google.cloud.dataproc.v1.InstanceReferenceOrBuilder>
instanceReferencesBuilder_;
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public java.util.List
getInstanceReferencesList() {
if (instanceReferencesBuilder_ == null) {
return java.util.Collections.unmodifiableList(instanceReferences_);
} else {
return instanceReferencesBuilder_.getMessageList();
}
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public int getInstanceReferencesCount() {
if (instanceReferencesBuilder_ == null) {
return instanceReferences_.size();
} else {
return instanceReferencesBuilder_.getCount();
}
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.dataproc.v1.InstanceReference getInstanceReferences(int index) {
if (instanceReferencesBuilder_ == null) {
return instanceReferences_.get(index);
} else {
return instanceReferencesBuilder_.getMessage(index);
}
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setInstanceReferences(
int index, com.google.cloud.dataproc.v1.InstanceReference value) {
if (instanceReferencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInstanceReferencesIsMutable();
instanceReferences_.set(index, value);
onChanged();
} else {
instanceReferencesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setInstanceReferences(
int index, com.google.cloud.dataproc.v1.InstanceReference.Builder builderForValue) {
if (instanceReferencesBuilder_ == null) {
ensureInstanceReferencesIsMutable();
instanceReferences_.set(index, builderForValue.build());
onChanged();
} else {
instanceReferencesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addInstanceReferences(com.google.cloud.dataproc.v1.InstanceReference value) {
if (instanceReferencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInstanceReferencesIsMutable();
instanceReferences_.add(value);
onChanged();
} else {
instanceReferencesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addInstanceReferences(
int index, com.google.cloud.dataproc.v1.InstanceReference value) {
if (instanceReferencesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureInstanceReferencesIsMutable();
instanceReferences_.add(index, value);
onChanged();
} else {
instanceReferencesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addInstanceReferences(
com.google.cloud.dataproc.v1.InstanceReference.Builder builderForValue) {
if (instanceReferencesBuilder_ == null) {
ensureInstanceReferencesIsMutable();
instanceReferences_.add(builderForValue.build());
onChanged();
} else {
instanceReferencesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addInstanceReferences(
int index, com.google.cloud.dataproc.v1.InstanceReference.Builder builderForValue) {
if (instanceReferencesBuilder_ == null) {
ensureInstanceReferencesIsMutable();
instanceReferences_.add(index, builderForValue.build());
onChanged();
} else {
instanceReferencesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder addAllInstanceReferences(
java.lang.Iterable extends com.google.cloud.dataproc.v1.InstanceReference> values) {
if (instanceReferencesBuilder_ == null) {
ensureInstanceReferencesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, instanceReferences_);
onChanged();
} else {
instanceReferencesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearInstanceReferences() {
if (instanceReferencesBuilder_ == null) {
instanceReferences_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
instanceReferencesBuilder_.clear();
}
return this;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder removeInstanceReferences(int index) {
if (instanceReferencesBuilder_ == null) {
ensureInstanceReferencesIsMutable();
instanceReferences_.remove(index);
onChanged();
} else {
instanceReferencesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.dataproc.v1.InstanceReference.Builder getInstanceReferencesBuilder(
int index) {
return getInstanceReferencesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.dataproc.v1.InstanceReferenceOrBuilder getInstanceReferencesOrBuilder(
int index) {
if (instanceReferencesBuilder_ == null) {
return instanceReferences_.get(index);
} else {
return instanceReferencesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public java.util.List extends com.google.cloud.dataproc.v1.InstanceReferenceOrBuilder>
getInstanceReferencesOrBuilderList() {
if (instanceReferencesBuilder_ != null) {
return instanceReferencesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(instanceReferences_);
}
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.dataproc.v1.InstanceReference.Builder addInstanceReferencesBuilder() {
return getInstanceReferencesFieldBuilder()
.addBuilder(com.google.cloud.dataproc.v1.InstanceReference.getDefaultInstance());
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.dataproc.v1.InstanceReference.Builder addInstanceReferencesBuilder(
int index) {
return getInstanceReferencesFieldBuilder()
.addBuilder(index, com.google.cloud.dataproc.v1.InstanceReference.getDefaultInstance());
}
/**
*
*
*
* Output only. List of references to Compute Engine instances.
*
*
*
* repeated .google.cloud.dataproc.v1.InstanceReference instance_references = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public java.util.List
getInstanceReferencesBuilderList() {
return getInstanceReferencesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dataproc.v1.InstanceReference,
com.google.cloud.dataproc.v1.InstanceReference.Builder,
com.google.cloud.dataproc.v1.InstanceReferenceOrBuilder>
getInstanceReferencesFieldBuilder() {
if (instanceReferencesBuilder_ == null) {
instanceReferencesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dataproc.v1.InstanceReference,
com.google.cloud.dataproc.v1.InstanceReference.Builder,
com.google.cloud.dataproc.v1.InstanceReferenceOrBuilder>(
instanceReferences_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
instanceReferences_ = null;
}
return instanceReferencesBuilder_;
}
private java.lang.Object imageUri_ = "";
/**
*
*
*
* Optional. The Compute Engine image resource used for cluster instances.
*
* The URI can represent an image or image family.
*
* Image examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]`
* * `projects/[project_id]/global/images/[image-id]`
* * `image-id`
*
* Image family examples. Dataproc will use the most recent
* image from the family:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]`
* * `projects/[project_id]/global/images/family/[custom-image-family-name]`
*
* If the URI is unspecified, it will be inferred from
* `SoftwareConfig.image_version` or the system default.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The imageUri.
*/
public java.lang.String getImageUri() {
java.lang.Object ref = imageUri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
imageUri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. The Compute Engine image resource used for cluster instances.
*
* The URI can represent an image or image family.
*
* Image examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]`
* * `projects/[project_id]/global/images/[image-id]`
* * `image-id`
*
* Image family examples. Dataproc will use the most recent
* image from the family:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]`
* * `projects/[project_id]/global/images/family/[custom-image-family-name]`
*
* If the URI is unspecified, it will be inferred from
* `SoftwareConfig.image_version` or the system default.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for imageUri.
*/
public com.google.protobuf.ByteString getImageUriBytes() {
java.lang.Object ref = imageUri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
imageUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. The Compute Engine image resource used for cluster instances.
*
* The URI can represent an image or image family.
*
* Image examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]`
* * `projects/[project_id]/global/images/[image-id]`
* * `image-id`
*
* Image family examples. Dataproc will use the most recent
* image from the family:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]`
* * `projects/[project_id]/global/images/family/[custom-image-family-name]`
*
* If the URI is unspecified, it will be inferred from
* `SoftwareConfig.image_version` or the system default.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The imageUri to set.
* @return This builder for chaining.
*/
public Builder setImageUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
imageUri_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Optional. The Compute Engine image resource used for cluster instances.
*
* The URI can represent an image or image family.
*
* Image examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]`
* * `projects/[project_id]/global/images/[image-id]`
* * `image-id`
*
* Image family examples. Dataproc will use the most recent
* image from the family:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]`
* * `projects/[project_id]/global/images/family/[custom-image-family-name]`
*
* If the URI is unspecified, it will be inferred from
* `SoftwareConfig.image_version` or the system default.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearImageUri() {
imageUri_ = getDefaultInstance().getImageUri();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Optional. The Compute Engine image resource used for cluster instances.
*
* The URI can represent an image or image family.
*
* Image examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/[image-id]`
* * `projects/[project_id]/global/images/[image-id]`
* * `image-id`
*
* Image family examples. Dataproc will use the most recent
* image from the family:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/images/family/[custom-image-family-name]`
* * `projects/[project_id]/global/images/family/[custom-image-family-name]`
*
* If the URI is unspecified, it will be inferred from
* `SoftwareConfig.image_version` or the system default.
*
*
* string image_uri = 3 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for imageUri to set.
* @return This builder for chaining.
*/
public Builder setImageUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
imageUri_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object machineTypeUri_ = "";
/**
*
*
*
* Optional. The Compute Engine machine type used for cluster instances.
*
* A full URL, partial URI, or short name are valid. Examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `n1-standard-2`
*
* **Auto Zone Exception**: If you are using the Dataproc
* [Auto Zone
* Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
* feature, you must use the short name of the machine type
* resource, for example, `n1-standard-2`.
*
*
* string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The machineTypeUri.
*/
public java.lang.String getMachineTypeUri() {
java.lang.Object ref = machineTypeUri_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
machineTypeUri_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. The Compute Engine machine type used for cluster instances.
*
* A full URL, partial URI, or short name are valid. Examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `n1-standard-2`
*
* **Auto Zone Exception**: If you are using the Dataproc
* [Auto Zone
* Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
* feature, you must use the short name of the machine type
* resource, for example, `n1-standard-2`.
*
*
* string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for machineTypeUri.
*/
public com.google.protobuf.ByteString getMachineTypeUriBytes() {
java.lang.Object ref = machineTypeUri_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
machineTypeUri_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. The Compute Engine machine type used for cluster instances.
*
* A full URL, partial URI, or short name are valid. Examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `n1-standard-2`
*
* **Auto Zone Exception**: If you are using the Dataproc
* [Auto Zone
* Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
* feature, you must use the short name of the machine type
* resource, for example, `n1-standard-2`.
*
*
* string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The machineTypeUri to set.
* @return This builder for chaining.
*/
public Builder setMachineTypeUri(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
machineTypeUri_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Optional. The Compute Engine machine type used for cluster instances.
*
* A full URL, partial URI, or short name are valid. Examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `n1-standard-2`
*
* **Auto Zone Exception**: If you are using the Dataproc
* [Auto Zone
* Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
* feature, you must use the short name of the machine type
* resource, for example, `n1-standard-2`.
*
*
* string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearMachineTypeUri() {
machineTypeUri_ = getDefaultInstance().getMachineTypeUri();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Optional. The Compute Engine machine type used for cluster instances.
*
* A full URL, partial URI, or short name are valid. Examples:
*
* * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `projects/[project_id]/zones/[zone]/machineTypes/n1-standard-2`
* * `n1-standard-2`
*
* **Auto Zone Exception**: If you are using the Dataproc
* [Auto Zone
* Placement](https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
* feature, you must use the short name of the machine type
* resource, for example, `n1-standard-2`.
*
*
* string machine_type_uri = 4 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for machineTypeUri to set.
* @return This builder for chaining.
*/
public Builder setMachineTypeUriBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
machineTypeUri_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private com.google.cloud.dataproc.v1.DiskConfig diskConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.DiskConfig,
com.google.cloud.dataproc.v1.DiskConfig.Builder,
com.google.cloud.dataproc.v1.DiskConfigOrBuilder>
diskConfigBuilder_;
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the diskConfig field is set.
*/
public boolean hasDiskConfig() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The diskConfig.
*/
public com.google.cloud.dataproc.v1.DiskConfig getDiskConfig() {
if (diskConfigBuilder_ == null) {
return diskConfig_ == null
? com.google.cloud.dataproc.v1.DiskConfig.getDefaultInstance()
: diskConfig_;
} else {
return diskConfigBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setDiskConfig(com.google.cloud.dataproc.v1.DiskConfig value) {
if (diskConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
diskConfig_ = value;
} else {
diskConfigBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setDiskConfig(com.google.cloud.dataproc.v1.DiskConfig.Builder builderForValue) {
if (diskConfigBuilder_ == null) {
diskConfig_ = builderForValue.build();
} else {
diskConfigBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeDiskConfig(com.google.cloud.dataproc.v1.DiskConfig value) {
if (diskConfigBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& diskConfig_ != null
&& diskConfig_ != com.google.cloud.dataproc.v1.DiskConfig.getDefaultInstance()) {
getDiskConfigBuilder().mergeFrom(value);
} else {
diskConfig_ = value;
}
} else {
diskConfigBuilder_.mergeFrom(value);
}
if (diskConfig_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearDiskConfig() {
bitField0_ = (bitField0_ & ~0x00000020);
diskConfig_ = null;
if (diskConfigBuilder_ != null) {
diskConfigBuilder_.dispose();
diskConfigBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.DiskConfig.Builder getDiskConfigBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getDiskConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.DiskConfigOrBuilder getDiskConfigOrBuilder() {
if (diskConfigBuilder_ != null) {
return diskConfigBuilder_.getMessageOrBuilder();
} else {
return diskConfig_ == null
? com.google.cloud.dataproc.v1.DiskConfig.getDefaultInstance()
: diskConfig_;
}
}
/**
*
*
*
* Optional. Disk option config settings.
*
*
*
* .google.cloud.dataproc.v1.DiskConfig disk_config = 5 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.DiskConfig,
com.google.cloud.dataproc.v1.DiskConfig.Builder,
com.google.cloud.dataproc.v1.DiskConfigOrBuilder>
getDiskConfigFieldBuilder() {
if (diskConfigBuilder_ == null) {
diskConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.DiskConfig,
com.google.cloud.dataproc.v1.DiskConfig.Builder,
com.google.cloud.dataproc.v1.DiskConfigOrBuilder>(
getDiskConfig(), getParentForChildren(), isClean());
diskConfig_ = null;
}
return diskConfigBuilder_;
}
private boolean isPreemptible_;
/**
*
*
*
* Output only. Specifies that this instance group contains preemptible
* instances.
*
*
* bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The isPreemptible.
*/
@java.lang.Override
public boolean getIsPreemptible() {
return isPreemptible_;
}
/**
*
*
*
* Output only. Specifies that this instance group contains preemptible
* instances.
*
*
* bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The isPreemptible to set.
* @return This builder for chaining.
*/
public Builder setIsPreemptible(boolean value) {
isPreemptible_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Output only. Specifies that this instance group contains preemptible
* instances.
*
*
* bool is_preemptible = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearIsPreemptible() {
bitField0_ = (bitField0_ & ~0x00000040);
isPreemptible_ = false;
onChanged();
return this;
}
private int preemptibility_ = 0;
/**
*
*
*
* Optional. Specifies the preemptibility of the instance group.
*
* The default value for master and worker groups is
* `NON_PREEMPTIBLE`. This default cannot be changed.
*
* The default value for secondary instances is
* `PREEMPTIBLE`.
*
*
*
* .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The enum numeric value on the wire for preemptibility.
*/
@java.lang.Override
public int getPreemptibilityValue() {
return preemptibility_;
}
/**
*
*
*
* Optional. Specifies the preemptibility of the instance group.
*
* The default value for master and worker groups is
* `NON_PREEMPTIBLE`. This default cannot be changed.
*
* The default value for secondary instances is
* `PREEMPTIBLE`.
*
*
*
* .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The enum numeric value on the wire for preemptibility to set.
* @return This builder for chaining.
*/
public Builder setPreemptibilityValue(int value) {
preemptibility_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies the preemptibility of the instance group.
*
* The default value for master and worker groups is
* `NON_PREEMPTIBLE`. This default cannot be changed.
*
* The default value for secondary instances is
* `PREEMPTIBLE`.
*
*
*
* .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The preemptibility.
*/
@java.lang.Override
public com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility getPreemptibility() {
com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility result =
com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility.forNumber(
preemptibility_);
return result == null
? com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility.UNRECOGNIZED
: result;
}
/**
*
*
*
* Optional. Specifies the preemptibility of the instance group.
*
* The default value for master and worker groups is
* `NON_PREEMPTIBLE`. This default cannot be changed.
*
* The default value for secondary instances is
* `PREEMPTIBLE`.
*
*
*
* .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @param value The preemptibility to set.
* @return This builder for chaining.
*/
public Builder setPreemptibility(
com.google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
preemptibility_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies the preemptibility of the instance group.
*
* The default value for master and worker groups is
* `NON_PREEMPTIBLE`. This default cannot be changed.
*
* The default value for secondary instances is
* `PREEMPTIBLE`.
*
*
*
* .google.cloud.dataproc.v1.InstanceGroupConfig.Preemptibility preemptibility = 10 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return This builder for chaining.
*/
public Builder clearPreemptibility() {
bitField0_ = (bitField0_ & ~0x00000080);
preemptibility_ = 0;
onChanged();
return this;
}
private com.google.cloud.dataproc.v1.ManagedGroupConfig managedGroupConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.ManagedGroupConfig,
com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder,
com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder>
managedGroupConfigBuilder_;
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the managedGroupConfig field is set.
*/
public boolean hasManagedGroupConfig() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The managedGroupConfig.
*/
public com.google.cloud.dataproc.v1.ManagedGroupConfig getManagedGroupConfig() {
if (managedGroupConfigBuilder_ == null) {
return managedGroupConfig_ == null
? com.google.cloud.dataproc.v1.ManagedGroupConfig.getDefaultInstance()
: managedGroupConfig_;
} else {
return managedGroupConfigBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setManagedGroupConfig(com.google.cloud.dataproc.v1.ManagedGroupConfig value) {
if (managedGroupConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
managedGroupConfig_ = value;
} else {
managedGroupConfigBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setManagedGroupConfig(
com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder builderForValue) {
if (managedGroupConfigBuilder_ == null) {
managedGroupConfig_ = builderForValue.build();
} else {
managedGroupConfigBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeManagedGroupConfig(com.google.cloud.dataproc.v1.ManagedGroupConfig value) {
if (managedGroupConfigBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0)
&& managedGroupConfig_ != null
&& managedGroupConfig_
!= com.google.cloud.dataproc.v1.ManagedGroupConfig.getDefaultInstance()) {
getManagedGroupConfigBuilder().mergeFrom(value);
} else {
managedGroupConfig_ = value;
}
} else {
managedGroupConfigBuilder_.mergeFrom(value);
}
if (managedGroupConfig_ != null) {
bitField0_ |= 0x00000100;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearManagedGroupConfig() {
bitField0_ = (bitField0_ & ~0x00000100);
managedGroupConfig_ = null;
if (managedGroupConfigBuilder_ != null) {
managedGroupConfigBuilder_.dispose();
managedGroupConfigBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder getManagedGroupConfigBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getManagedGroupConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder
getManagedGroupConfigOrBuilder() {
if (managedGroupConfigBuilder_ != null) {
return managedGroupConfigBuilder_.getMessageOrBuilder();
} else {
return managedGroupConfig_ == null
? com.google.cloud.dataproc.v1.ManagedGroupConfig.getDefaultInstance()
: managedGroupConfig_;
}
}
/**
*
*
*
* Output only. The config for Compute Engine Instance Group
* Manager that manages this group.
* This is only used for preemptible instance groups.
*
*
*
* .google.cloud.dataproc.v1.ManagedGroupConfig managed_group_config = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.ManagedGroupConfig,
com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder,
com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder>
getManagedGroupConfigFieldBuilder() {
if (managedGroupConfigBuilder_ == null) {
managedGroupConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.ManagedGroupConfig,
com.google.cloud.dataproc.v1.ManagedGroupConfig.Builder,
com.google.cloud.dataproc.v1.ManagedGroupConfigOrBuilder>(
getManagedGroupConfig(), getParentForChildren(), isClean());
managedGroupConfig_ = null;
}
return managedGroupConfigBuilder_;
}
private java.util.List accelerators_ =
java.util.Collections.emptyList();
private void ensureAcceleratorsIsMutable() {
if (!((bitField0_ & 0x00000200) != 0)) {
accelerators_ =
new java.util.ArrayList(accelerators_);
bitField0_ |= 0x00000200;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dataproc.v1.AcceleratorConfig,
com.google.cloud.dataproc.v1.AcceleratorConfig.Builder,
com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder>
acceleratorsBuilder_;
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List getAcceleratorsList() {
if (acceleratorsBuilder_ == null) {
return java.util.Collections.unmodifiableList(accelerators_);
} else {
return acceleratorsBuilder_.getMessageList();
}
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public int getAcceleratorsCount() {
if (acceleratorsBuilder_ == null) {
return accelerators_.size();
} else {
return acceleratorsBuilder_.getCount();
}
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.AcceleratorConfig getAccelerators(int index) {
if (acceleratorsBuilder_ == null) {
return accelerators_.get(index);
} else {
return acceleratorsBuilder_.getMessage(index);
}
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setAccelerators(
int index, com.google.cloud.dataproc.v1.AcceleratorConfig value) {
if (acceleratorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAcceleratorsIsMutable();
accelerators_.set(index, value);
onChanged();
} else {
acceleratorsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setAccelerators(
int index, com.google.cloud.dataproc.v1.AcceleratorConfig.Builder builderForValue) {
if (acceleratorsBuilder_ == null) {
ensureAcceleratorsIsMutable();
accelerators_.set(index, builderForValue.build());
onChanged();
} else {
acceleratorsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAccelerators(com.google.cloud.dataproc.v1.AcceleratorConfig value) {
if (acceleratorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAcceleratorsIsMutable();
accelerators_.add(value);
onChanged();
} else {
acceleratorsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAccelerators(
int index, com.google.cloud.dataproc.v1.AcceleratorConfig value) {
if (acceleratorsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAcceleratorsIsMutable();
accelerators_.add(index, value);
onChanged();
} else {
acceleratorsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAccelerators(
com.google.cloud.dataproc.v1.AcceleratorConfig.Builder builderForValue) {
if (acceleratorsBuilder_ == null) {
ensureAcceleratorsIsMutable();
accelerators_.add(builderForValue.build());
onChanged();
} else {
acceleratorsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAccelerators(
int index, com.google.cloud.dataproc.v1.AcceleratorConfig.Builder builderForValue) {
if (acceleratorsBuilder_ == null) {
ensureAcceleratorsIsMutable();
accelerators_.add(index, builderForValue.build());
onChanged();
} else {
acceleratorsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder addAllAccelerators(
java.lang.Iterable extends com.google.cloud.dataproc.v1.AcceleratorConfig> values) {
if (acceleratorsBuilder_ == null) {
ensureAcceleratorsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, accelerators_);
onChanged();
} else {
acceleratorsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearAccelerators() {
if (acceleratorsBuilder_ == null) {
accelerators_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
} else {
acceleratorsBuilder_.clear();
}
return this;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder removeAccelerators(int index) {
if (acceleratorsBuilder_ == null) {
ensureAcceleratorsIsMutable();
accelerators_.remove(index);
onChanged();
} else {
acceleratorsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.AcceleratorConfig.Builder getAcceleratorsBuilder(
int index) {
return getAcceleratorsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder getAcceleratorsOrBuilder(
int index) {
if (acceleratorsBuilder_ == null) {
return accelerators_.get(index);
} else {
return acceleratorsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List extends com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder>
getAcceleratorsOrBuilderList() {
if (acceleratorsBuilder_ != null) {
return acceleratorsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(accelerators_);
}
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.AcceleratorConfig.Builder addAcceleratorsBuilder() {
return getAcceleratorsFieldBuilder()
.addBuilder(com.google.cloud.dataproc.v1.AcceleratorConfig.getDefaultInstance());
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.AcceleratorConfig.Builder addAcceleratorsBuilder(
int index) {
return getAcceleratorsFieldBuilder()
.addBuilder(index, com.google.cloud.dataproc.v1.AcceleratorConfig.getDefaultInstance());
}
/**
*
*
*
* Optional. The Compute Engine accelerator configuration for these
* instances.
*
*
*
* repeated .google.cloud.dataproc.v1.AcceleratorConfig accelerators = 8 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public java.util.List
getAcceleratorsBuilderList() {
return getAcceleratorsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dataproc.v1.AcceleratorConfig,
com.google.cloud.dataproc.v1.AcceleratorConfig.Builder,
com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder>
getAcceleratorsFieldBuilder() {
if (acceleratorsBuilder_ == null) {
acceleratorsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.dataproc.v1.AcceleratorConfig,
com.google.cloud.dataproc.v1.AcceleratorConfig.Builder,
com.google.cloud.dataproc.v1.AcceleratorConfigOrBuilder>(
accelerators_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean());
accelerators_ = null;
}
return acceleratorsBuilder_;
}
private java.lang.Object minCpuPlatform_ = "";
/**
*
*
*
* Optional. Specifies the minimum cpu platform for the Instance Group.
* See [Dataproc -> Minimum CPU
* Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
*
*
* string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The minCpuPlatform.
*/
public java.lang.String getMinCpuPlatform() {
java.lang.Object ref = minCpuPlatform_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
minCpuPlatform_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Optional. Specifies the minimum cpu platform for the Instance Group.
* See [Dataproc -> Minimum CPU
* Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
*
*
* string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The bytes for minCpuPlatform.
*/
public com.google.protobuf.ByteString getMinCpuPlatformBytes() {
java.lang.Object ref = minCpuPlatform_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
minCpuPlatform_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Optional. Specifies the minimum cpu platform for the Instance Group.
* See [Dataproc -> Minimum CPU
* Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
*
*
* string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The minCpuPlatform to set.
* @return This builder for chaining.
*/
public Builder setMinCpuPlatform(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
minCpuPlatform_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies the minimum cpu platform for the Instance Group.
* See [Dataproc -> Minimum CPU
* Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
*
*
* string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearMinCpuPlatform() {
minCpuPlatform_ = getDefaultInstance().getMinCpuPlatform();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
/**
*
*
*
* Optional. Specifies the minimum cpu platform for the Instance Group.
* See [Dataproc -> Minimum CPU
* Platform](https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
*
*
* string min_cpu_platform = 9 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The bytes for minCpuPlatform to set.
* @return This builder for chaining.
*/
public Builder setMinCpuPlatformBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
minCpuPlatform_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
private int minNumInstances_;
/**
*
*
*
* Optional. The minimum number of primary worker instances to create.
* If `min_num_instances` is set, cluster creation will succeed if
* the number of primary workers created is at least equal to the
* `min_num_instances` number.
*
* Example: Cluster creation request with `num_instances` = `5` and
* `min_num_instances` = `3`:
*
* * If 4 VMs are created and 1 instance fails,
* the failed VM is deleted. The cluster is
* resized to 4 instances and placed in a `RUNNING` state.
* * If 2 instances are created and 3 instances fail,
* the cluster in placed in an `ERROR` state. The failed VMs
* are not deleted.
*
*
* int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The minNumInstances.
*/
@java.lang.Override
public int getMinNumInstances() {
return minNumInstances_;
}
/**
*
*
*
* Optional. The minimum number of primary worker instances to create.
* If `min_num_instances` is set, cluster creation will succeed if
* the number of primary workers created is at least equal to the
* `min_num_instances` number.
*
* Example: Cluster creation request with `num_instances` = `5` and
* `min_num_instances` = `3`:
*
* * If 4 VMs are created and 1 instance fails,
* the failed VM is deleted. The cluster is
* resized to 4 instances and placed in a `RUNNING` state.
* * If 2 instances are created and 3 instances fail,
* the cluster in placed in an `ERROR` state. The failed VMs
* are not deleted.
*
*
* int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The minNumInstances to set.
* @return This builder for chaining.
*/
public Builder setMinNumInstances(int value) {
minNumInstances_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* Optional. The minimum number of primary worker instances to create.
* If `min_num_instances` is set, cluster creation will succeed if
* the number of primary workers created is at least equal to the
* `min_num_instances` number.
*
* Example: Cluster creation request with `num_instances` = `5` and
* `min_num_instances` = `3`:
*
* * If 4 VMs are created and 1 instance fails,
* the failed VM is deleted. The cluster is
* resized to 4 instances and placed in a `RUNNING` state.
* * If 2 instances are created and 3 instances fail,
* the cluster in placed in an `ERROR` state. The failed VMs
* are not deleted.
*
*
* int32 min_num_instances = 12 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearMinNumInstances() {
bitField0_ = (bitField0_ & ~0x00000800);
minNumInstances_ = 0;
onChanged();
return this;
}
private com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy instanceFlexibilityPolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy,
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.Builder,
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicyOrBuilder>
instanceFlexibilityPolicyBuilder_;
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the instanceFlexibilityPolicy field is set.
*/
public boolean hasInstanceFlexibilityPolicy() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The instanceFlexibilityPolicy.
*/
public com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy getInstanceFlexibilityPolicy() {
if (instanceFlexibilityPolicyBuilder_ == null) {
return instanceFlexibilityPolicy_ == null
? com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.getDefaultInstance()
: instanceFlexibilityPolicy_;
} else {
return instanceFlexibilityPolicyBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setInstanceFlexibilityPolicy(
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy value) {
if (instanceFlexibilityPolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
instanceFlexibilityPolicy_ = value;
} else {
instanceFlexibilityPolicyBuilder_.setMessage(value);
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setInstanceFlexibilityPolicy(
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.Builder builderForValue) {
if (instanceFlexibilityPolicyBuilder_ == null) {
instanceFlexibilityPolicy_ = builderForValue.build();
} else {
instanceFlexibilityPolicyBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeInstanceFlexibilityPolicy(
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy value) {
if (instanceFlexibilityPolicyBuilder_ == null) {
if (((bitField0_ & 0x00001000) != 0)
&& instanceFlexibilityPolicy_ != null
&& instanceFlexibilityPolicy_
!= com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.getDefaultInstance()) {
getInstanceFlexibilityPolicyBuilder().mergeFrom(value);
} else {
instanceFlexibilityPolicy_ = value;
}
} else {
instanceFlexibilityPolicyBuilder_.mergeFrom(value);
}
if (instanceFlexibilityPolicy_ != null) {
bitField0_ |= 0x00001000;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearInstanceFlexibilityPolicy() {
bitField0_ = (bitField0_ & ~0x00001000);
instanceFlexibilityPolicy_ = null;
if (instanceFlexibilityPolicyBuilder_ != null) {
instanceFlexibilityPolicyBuilder_.dispose();
instanceFlexibilityPolicyBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.Builder
getInstanceFlexibilityPolicyBuilder() {
bitField0_ |= 0x00001000;
onChanged();
return getInstanceFlexibilityPolicyFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.InstanceFlexibilityPolicyOrBuilder
getInstanceFlexibilityPolicyOrBuilder() {
if (instanceFlexibilityPolicyBuilder_ != null) {
return instanceFlexibilityPolicyBuilder_.getMessageOrBuilder();
} else {
return instanceFlexibilityPolicy_ == null
? com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.getDefaultInstance()
: instanceFlexibilityPolicy_;
}
}
/**
*
*
*
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and
* provisioning models.
*
*
*
* .google.cloud.dataproc.v1.InstanceFlexibilityPolicy instance_flexibility_policy = 13 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy,
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.Builder,
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicyOrBuilder>
getInstanceFlexibilityPolicyFieldBuilder() {
if (instanceFlexibilityPolicyBuilder_ == null) {
instanceFlexibilityPolicyBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy,
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicy.Builder,
com.google.cloud.dataproc.v1.InstanceFlexibilityPolicyOrBuilder>(
getInstanceFlexibilityPolicy(), getParentForChildren(), isClean());
instanceFlexibilityPolicy_ = null;
}
return instanceFlexibilityPolicyBuilder_;
}
private com.google.cloud.dataproc.v1.StartupConfig startupConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.StartupConfig,
com.google.cloud.dataproc.v1.StartupConfig.Builder,
com.google.cloud.dataproc.v1.StartupConfigOrBuilder>
startupConfigBuilder_;
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return Whether the startupConfig field is set.
*/
public boolean hasStartupConfig() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*
* @return The startupConfig.
*/
public com.google.cloud.dataproc.v1.StartupConfig getStartupConfig() {
if (startupConfigBuilder_ == null) {
return startupConfig_ == null
? com.google.cloud.dataproc.v1.StartupConfig.getDefaultInstance()
: startupConfig_;
} else {
return startupConfigBuilder_.getMessage();
}
}
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setStartupConfig(com.google.cloud.dataproc.v1.StartupConfig value) {
if (startupConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
startupConfig_ = value;
} else {
startupConfigBuilder_.setMessage(value);
}
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder setStartupConfig(
com.google.cloud.dataproc.v1.StartupConfig.Builder builderForValue) {
if (startupConfigBuilder_ == null) {
startupConfig_ = builderForValue.build();
} else {
startupConfigBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder mergeStartupConfig(com.google.cloud.dataproc.v1.StartupConfig value) {
if (startupConfigBuilder_ == null) {
if (((bitField0_ & 0x00002000) != 0)
&& startupConfig_ != null
&& startupConfig_ != com.google.cloud.dataproc.v1.StartupConfig.getDefaultInstance()) {
getStartupConfigBuilder().mergeFrom(value);
} else {
startupConfig_ = value;
}
} else {
startupConfigBuilder_.mergeFrom(value);
}
if (startupConfig_ != null) {
bitField0_ |= 0x00002000;
onChanged();
}
return this;
}
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public Builder clearStartupConfig() {
bitField0_ = (bitField0_ & ~0x00002000);
startupConfig_ = null;
if (startupConfigBuilder_ != null) {
startupConfigBuilder_.dispose();
startupConfigBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.StartupConfig.Builder getStartupConfigBuilder() {
bitField0_ |= 0x00002000;
onChanged();
return getStartupConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*/
public com.google.cloud.dataproc.v1.StartupConfigOrBuilder getStartupConfigOrBuilder() {
if (startupConfigBuilder_ != null) {
return startupConfigBuilder_.getMessageOrBuilder();
} else {
return startupConfig_ == null
? com.google.cloud.dataproc.v1.StartupConfig.getDefaultInstance()
: startupConfig_;
}
}
/**
*
*
*
* Optional. Configuration to handle the startup of instances during cluster
* create and update process.
*
*
*
* .google.cloud.dataproc.v1.StartupConfig startup_config = 14 [(.google.api.field_behavior) = OPTIONAL];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.StartupConfig,
com.google.cloud.dataproc.v1.StartupConfig.Builder,
com.google.cloud.dataproc.v1.StartupConfigOrBuilder>
getStartupConfigFieldBuilder() {
if (startupConfigBuilder_ == null) {
startupConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dataproc.v1.StartupConfig,
com.google.cloud.dataproc.v1.StartupConfig.Builder,
com.google.cloud.dataproc.v1.StartupConfigOrBuilder>(
getStartupConfig(), getParentForChildren(), isClean());
startupConfig_ = null;
}
return startupConfigBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dataproc.v1.InstanceGroupConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.dataproc.v1.InstanceGroupConfig)
private static final com.google.cloud.dataproc.v1.InstanceGroupConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dataproc.v1.InstanceGroupConfig();
}
public static com.google.cloud.dataproc.v1.InstanceGroupConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InstanceGroupConfig parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dataproc.v1.InstanceGroupConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy