/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.elasticmapreduce.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Modify the size or configurations of an instance group. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InstanceGroupModifyConfig implements Serializable, Cloneable, StructuredPojo { /** ** Unique ID of the instance group to modify. *
*/ private String instanceGroupId; /** ** Target size for the instance group. *
*/ private Integer instanceCount; /** ** The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not return to * its original requested size. *
*/ private com.amazonaws.internal.SdkInternalList* Policy for customizing shrink operations. *
*/ private ShrinkPolicy shrinkPolicy; /** ** Type of reconfiguration requested. Valid values are MERGE and OVERWRITE. *
*/ private String reconfigurationType; /** ** A list of new or modified configurations to apply for an instance group. *
*/ private com.amazonaws.internal.SdkInternalList* Unique ID of the instance group to modify. *
* * @param instanceGroupId * Unique ID of the instance group to modify. */ public void setInstanceGroupId(String instanceGroupId) { this.instanceGroupId = instanceGroupId; } /** ** Unique ID of the instance group to modify. *
* * @return Unique ID of the instance group to modify. */ public String getInstanceGroupId() { return this.instanceGroupId; } /** ** Unique ID of the instance group to modify. *
* * @param instanceGroupId * Unique ID of the instance group to modify. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupModifyConfig withInstanceGroupId(String instanceGroupId) { setInstanceGroupId(instanceGroupId); return this; } /** ** Target size for the instance group. *
* * @param instanceCount * Target size for the instance group. */ public void setInstanceCount(Integer instanceCount) { this.instanceCount = instanceCount; } /** ** Target size for the instance group. *
* * @return Target size for the instance group. */ public Integer getInstanceCount() { return this.instanceCount; } /** ** Target size for the instance group. *
* * @param instanceCount * Target size for the instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupModifyConfig withInstanceCount(Integer instanceCount) { setInstanceCount(instanceCount); return this; } /** ** The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not return to * its original requested size. *
* * @return The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not * return to its original requested size. */ public java.util.List* The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not return to * its original requested size. *
* * @param eC2InstanceIdsToTerminate * The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not * return to its original requested size. */ public void setEC2InstanceIdsToTerminate(java.util.Collection* The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not return to * its original requested size. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setEC2InstanceIdsToTerminate(java.util.Collection)} or * {@link #withEC2InstanceIdsToTerminate(java.util.Collection)} if you want to override the existing values. *
* * @param eC2InstanceIdsToTerminate * The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not * return to its original requested size. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupModifyConfig withEC2InstanceIdsToTerminate(String... eC2InstanceIdsToTerminate) { if (this.eC2InstanceIdsToTerminate == null) { setEC2InstanceIdsToTerminate(new com.amazonaws.internal.SdkInternalList* The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not return to * its original requested size. *
* * @param eC2InstanceIdsToTerminate * The Amazon EC2 InstanceIds to terminate. After you terminate the instances, the instance group will not * return to its original requested size. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupModifyConfig withEC2InstanceIdsToTerminate(java.util.Collection* Policy for customizing shrink operations. *
* * @param shrinkPolicy * Policy for customizing shrink operations. */ public void setShrinkPolicy(ShrinkPolicy shrinkPolicy) { this.shrinkPolicy = shrinkPolicy; } /** ** Policy for customizing shrink operations. *
* * @return Policy for customizing shrink operations. */ public ShrinkPolicy getShrinkPolicy() { return this.shrinkPolicy; } /** ** Policy for customizing shrink operations. *
* * @param shrinkPolicy * Policy for customizing shrink operations. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupModifyConfig withShrinkPolicy(ShrinkPolicy shrinkPolicy) { setShrinkPolicy(shrinkPolicy); return this; } /** ** Type of reconfiguration requested. Valid values are MERGE and OVERWRITE. *
* * @param reconfigurationType * Type of reconfiguration requested. Valid values are MERGE and OVERWRITE. * @see ReconfigurationType */ public void setReconfigurationType(String reconfigurationType) { this.reconfigurationType = reconfigurationType; } /** ** Type of reconfiguration requested. Valid values are MERGE and OVERWRITE. *
* * @return Type of reconfiguration requested. Valid values are MERGE and OVERWRITE. * @see ReconfigurationType */ public String getReconfigurationType() { return this.reconfigurationType; } /** ** Type of reconfiguration requested. Valid values are MERGE and OVERWRITE. *
* * @param reconfigurationType * Type of reconfiguration requested. Valid values are MERGE and OVERWRITE. * @return Returns a reference to this object so that method calls can be chained together. * @see ReconfigurationType */ public InstanceGroupModifyConfig withReconfigurationType(String reconfigurationType) { setReconfigurationType(reconfigurationType); return this; } /** ** Type of reconfiguration requested. Valid values are MERGE and OVERWRITE. *
* * @param reconfigurationType * Type of reconfiguration requested. Valid values are MERGE and OVERWRITE. * @return Returns a reference to this object so that method calls can be chained together. * @see ReconfigurationType */ public InstanceGroupModifyConfig withReconfigurationType(ReconfigurationType reconfigurationType) { this.reconfigurationType = reconfigurationType.toString(); return this; } /** ** A list of new or modified configurations to apply for an instance group. *
* * @return A list of new or modified configurations to apply for an instance group. */ public java.util.List* A list of new or modified configurations to apply for an instance group. *
* * @param configurations * A list of new or modified configurations to apply for an instance group. */ public void setConfigurations(java.util.Collection* A list of new or modified configurations to apply for an instance group. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setConfigurations(java.util.Collection)} or {@link #withConfigurations(java.util.Collection)} if you want * to override the existing values. *
* * @param configurations * A list of new or modified configurations to apply for an instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupModifyConfig withConfigurations(Configuration... configurations) { if (this.configurations == null) { setConfigurations(new com.amazonaws.internal.SdkInternalList* A list of new or modified configurations to apply for an instance group. *
* * @param configurations * A list of new or modified configurations to apply for an instance group. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceGroupModifyConfig withConfigurations(java.util.Collection