
com.google.api.services.dataproc.model.InstanceGroupConfig Maven / Gradle / Ivy
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.dataproc.model;
/**
* The config settings for Compute Engine resources in an instance group, such as a master or worker
* group.
*
* This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Cloud Dataproc API. For a detailed explanation see:
* https://developers.google.com/api-client-library/java/google-http-java-client/json
*
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class InstanceGroupConfig extends com.google.api.client.json.GenericJson {
/**
* Optional. The Compute Engine accelerator configuration for these instances.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List accelerators;
static {
// hack to force ProGuard to consider AcceleratorConfig used, since otherwise it would be stripped out
// see https://github.com/google/google-api-java-client/issues/543
com.google.api.client.util.Data.nullOf(AcceleratorConfig.class);
}
/**
* Optional. Disk option config settings.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private DiskConfig diskConfig;
/**
* 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-idImage 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.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String imageUri;
/**
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and provisioning models.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private InstanceFlexibilityPolicy instanceFlexibilityPolicy;
/**
* Output only. The list of instance names. Dataproc derives the names from cluster_name,
* num_instances, and the instance group.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List instanceNames;
/**
* Output only. List of references to Compute Engine instances.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.util.List instanceReferences;
/**
* Output only. Specifies that this instance group contains preemptible instances.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Boolean isPreemptible;
/**
* 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-2Auto 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.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String machineTypeUri;
/**
* Output only. The config for Compute Engine Instance Group Manager that manages this group. This
* is only used for preemptible instance groups.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private ManagedGroupConfig managedGroupConfig;
/**
* 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).
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String minCpuPlatform;
/**
* 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.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer minNumInstances;
/**
* Optional. The number of VM instances in the instance group. For HA cluster master_config
* groups, must be set to 3. For standard cluster master_config groups, must be set to 1.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.Integer numInstances;
/**
* 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.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String preemptibility;
/**
* Optional. Configuration to handle the startup of instances during cluster create and update
* process.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private StartupConfig startupConfig;
/**
* Optional. The Compute Engine accelerator configuration for these instances.
* @return value or {@code null} for none
*/
public java.util.List getAccelerators() {
return accelerators;
}
/**
* Optional. The Compute Engine accelerator configuration for these instances.
* @param accelerators accelerators or {@code null} for none
*/
public InstanceGroupConfig setAccelerators(java.util.List accelerators) {
this.accelerators = accelerators;
return this;
}
/**
* Optional. Disk option config settings.
* @return value or {@code null} for none
*/
public DiskConfig getDiskConfig() {
return diskConfig;
}
/**
* Optional. Disk option config settings.
* @param diskConfig diskConfig or {@code null} for none
*/
public InstanceGroupConfig setDiskConfig(DiskConfig diskConfig) {
this.diskConfig = diskConfig;
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-idImage 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.
* @return value or {@code null} for none
*/
public java.lang.String getImageUri() {
return 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-idImage 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.
* @param imageUri imageUri or {@code null} for none
*/
public InstanceGroupConfig setImageUri(java.lang.String imageUri) {
this.imageUri = imageUri;
return this;
}
/**
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and provisioning models.
* @return value or {@code null} for none
*/
public InstanceFlexibilityPolicy getInstanceFlexibilityPolicy() {
return instanceFlexibilityPolicy;
}
/**
* Optional. Instance flexibility Policy allowing a mixture of VM shapes and provisioning models.
* @param instanceFlexibilityPolicy instanceFlexibilityPolicy or {@code null} for none
*/
public InstanceGroupConfig setInstanceFlexibilityPolicy(InstanceFlexibilityPolicy instanceFlexibilityPolicy) {
this.instanceFlexibilityPolicy = instanceFlexibilityPolicy;
return this;
}
/**
* Output only. The list of instance names. Dataproc derives the names from cluster_name,
* num_instances, and the instance group.
* @return value or {@code null} for none
*/
public java.util.List getInstanceNames() {
return instanceNames;
}
/**
* Output only. The list of instance names. Dataproc derives the names from cluster_name,
* num_instances, and the instance group.
* @param instanceNames instanceNames or {@code null} for none
*/
public InstanceGroupConfig setInstanceNames(java.util.List instanceNames) {
this.instanceNames = instanceNames;
return this;
}
/**
* Output only. List of references to Compute Engine instances.
* @return value or {@code null} for none
*/
public java.util.List getInstanceReferences() {
return instanceReferences;
}
/**
* Output only. List of references to Compute Engine instances.
* @param instanceReferences instanceReferences or {@code null} for none
*/
public InstanceGroupConfig setInstanceReferences(java.util.List instanceReferences) {
this.instanceReferences = instanceReferences;
return this;
}
/**
* Output only. Specifies that this instance group contains preemptible instances.
* @return value or {@code null} for none
*/
public java.lang.Boolean getIsPreemptible() {
return isPreemptible;
}
/**
* Output only. Specifies that this instance group contains preemptible instances.
* @param isPreemptible isPreemptible or {@code null} for none
*/
public InstanceGroupConfig setIsPreemptible(java.lang.Boolean isPreemptible) {
this.isPreemptible = isPreemptible;
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-2Auto 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.
* @return value or {@code null} for none
*/
public java.lang.String getMachineTypeUri() {
return 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-2Auto 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.
* @param machineTypeUri machineTypeUri or {@code null} for none
*/
public InstanceGroupConfig setMachineTypeUri(java.lang.String machineTypeUri) {
this.machineTypeUri = machineTypeUri;
return this;
}
/**
* Output only. The config for Compute Engine Instance Group Manager that manages this group. This
* is only used for preemptible instance groups.
* @return value or {@code null} for none
*/
public ManagedGroupConfig getManagedGroupConfig() {
return managedGroupConfig;
}
/**
* Output only. The config for Compute Engine Instance Group Manager that manages this group. This
* is only used for preemptible instance groups.
* @param managedGroupConfig managedGroupConfig or {@code null} for none
*/
public InstanceGroupConfig setManagedGroupConfig(ManagedGroupConfig managedGroupConfig) {
this.managedGroupConfig = managedGroupConfig;
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).
* @return value or {@code null} for none
*/
public java.lang.String getMinCpuPlatform() {
return 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).
* @param minCpuPlatform minCpuPlatform or {@code null} for none
*/
public InstanceGroupConfig setMinCpuPlatform(java.lang.String minCpuPlatform) {
this.minCpuPlatform = minCpuPlatform;
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.
* @return value or {@code null} for none
*/
public java.lang.Integer 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.
* @param minNumInstances minNumInstances or {@code null} for none
*/
public InstanceGroupConfig setMinNumInstances(java.lang.Integer minNumInstances) {
this.minNumInstances = minNumInstances;
return this;
}
/**
* Optional. The number of VM instances in the instance group. For HA cluster master_config
* groups, must be set to 3. For standard cluster master_config groups, must be set to 1.
* @return value or {@code null} for none
*/
public java.lang.Integer getNumInstances() {
return numInstances;
}
/**
* Optional. The number of VM instances in the instance group. For HA cluster master_config
* groups, must be set to 3. For standard cluster master_config groups, must be set to 1.
* @param numInstances numInstances or {@code null} for none
*/
public InstanceGroupConfig setNumInstances(java.lang.Integer numInstances) {
this.numInstances = numInstances;
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.
* @return value or {@code null} for none
*/
public java.lang.String getPreemptibility() {
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.
* @param preemptibility preemptibility or {@code null} for none
*/
public InstanceGroupConfig setPreemptibility(java.lang.String preemptibility) {
this.preemptibility = preemptibility;
return this;
}
/**
* Optional. Configuration to handle the startup of instances during cluster create and update
* process.
* @return value or {@code null} for none
*/
public StartupConfig getStartupConfig() {
return startupConfig;
}
/**
* Optional. Configuration to handle the startup of instances during cluster create and update
* process.
* @param startupConfig startupConfig or {@code null} for none
*/
public InstanceGroupConfig setStartupConfig(StartupConfig startupConfig) {
this.startupConfig = startupConfig;
return this;
}
@Override
public InstanceGroupConfig set(String fieldName, Object value) {
return (InstanceGroupConfig) super.set(fieldName, value);
}
@Override
public InstanceGroupConfig clone() {
return (InstanceGroupConfig) super.clone();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy