All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.elasticmapreduce.model.CancelStepsRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon EMR module holds the client classes that are used for communicating with Amazon Elastic MapReduce Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2017-2022 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.AmazonWebServiceRequest;

/**
 * 

* The input argument to the CancelSteps operation. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CancelStepsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The ClusterID for the specified steps that will be canceled. Use RunJobFlow and * ListClusters to get ClusterIDs. *

*/ private String clusterId; /** *

* The list of StepIDs to cancel. Use ListSteps to get steps and their states for the specified * cluster. *

*/ private com.amazonaws.internal.SdkInternalList stepIds; /** *

* The option to choose to cancel RUNNING steps. By default, the value is SEND_INTERRUPT. *

*/ private String stepCancellationOption; /** *

* The ClusterID for the specified steps that will be canceled. Use RunJobFlow and * ListClusters to get ClusterIDs. *

* * @param clusterId * The ClusterID for the specified steps that will be canceled. Use RunJobFlow and * ListClusters to get ClusterIDs. */ public void setClusterId(String clusterId) { this.clusterId = clusterId; } /** *

* The ClusterID for the specified steps that will be canceled. Use RunJobFlow and * ListClusters to get ClusterIDs. *

* * @return The ClusterID for the specified steps that will be canceled. Use RunJobFlow and * ListClusters to get ClusterIDs. */ public String getClusterId() { return this.clusterId; } /** *

* The ClusterID for the specified steps that will be canceled. Use RunJobFlow and * ListClusters to get ClusterIDs. *

* * @param clusterId * The ClusterID for the specified steps that will be canceled. Use RunJobFlow and * ListClusters to get ClusterIDs. * @return Returns a reference to this object so that method calls can be chained together. */ public CancelStepsRequest withClusterId(String clusterId) { setClusterId(clusterId); return this; } /** *

* The list of StepIDs to cancel. Use ListSteps to get steps and their states for the specified * cluster. *

* * @return The list of StepIDs to cancel. Use ListSteps to get steps and their states for the * specified cluster. */ public java.util.List getStepIds() { if (stepIds == null) { stepIds = new com.amazonaws.internal.SdkInternalList(); } return stepIds; } /** *

* The list of StepIDs to cancel. Use ListSteps to get steps and their states for the specified * cluster. *

* * @param stepIds * The list of StepIDs to cancel. Use ListSteps to get steps and their states for the * specified cluster. */ public void setStepIds(java.util.Collection stepIds) { if (stepIds == null) { this.stepIds = null; return; } this.stepIds = new com.amazonaws.internal.SdkInternalList(stepIds); } /** *

* The list of StepIDs to cancel. Use ListSteps to get steps and their states for the specified * cluster. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setStepIds(java.util.Collection)} or {@link #withStepIds(java.util.Collection)} if you want to override * the existing values. *

* * @param stepIds * The list of StepIDs to cancel. Use ListSteps to get steps and their states for the * specified cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public CancelStepsRequest withStepIds(String... stepIds) { if (this.stepIds == null) { setStepIds(new com.amazonaws.internal.SdkInternalList(stepIds.length)); } for (String ele : stepIds) { this.stepIds.add(ele); } return this; } /** *

* The list of StepIDs to cancel. Use ListSteps to get steps and their states for the specified * cluster. *

* * @param stepIds * The list of StepIDs to cancel. Use ListSteps to get steps and their states for the * specified cluster. * @return Returns a reference to this object so that method calls can be chained together. */ public CancelStepsRequest withStepIds(java.util.Collection stepIds) { setStepIds(stepIds); return this; } /** *

* The option to choose to cancel RUNNING steps. By default, the value is SEND_INTERRUPT. *

* * @param stepCancellationOption * The option to choose to cancel RUNNING steps. By default, the value is * SEND_INTERRUPT. * @see StepCancellationOption */ public void setStepCancellationOption(String stepCancellationOption) { this.stepCancellationOption = stepCancellationOption; } /** *

* The option to choose to cancel RUNNING steps. By default, the value is SEND_INTERRUPT. *

* * @return The option to choose to cancel RUNNING steps. By default, the value is * SEND_INTERRUPT. * @see StepCancellationOption */ public String getStepCancellationOption() { return this.stepCancellationOption; } /** *

* The option to choose to cancel RUNNING steps. By default, the value is SEND_INTERRUPT. *

* * @param stepCancellationOption * The option to choose to cancel RUNNING steps. By default, the value is * SEND_INTERRUPT. * @return Returns a reference to this object so that method calls can be chained together. * @see StepCancellationOption */ public CancelStepsRequest withStepCancellationOption(String stepCancellationOption) { setStepCancellationOption(stepCancellationOption); return this; } /** *

* The option to choose to cancel RUNNING steps. By default, the value is SEND_INTERRUPT. *

* * @param stepCancellationOption * The option to choose to cancel RUNNING steps. By default, the value is * SEND_INTERRUPT. * @return Returns a reference to this object so that method calls can be chained together. * @see StepCancellationOption */ public CancelStepsRequest withStepCancellationOption(StepCancellationOption stepCancellationOption) { this.stepCancellationOption = stepCancellationOption.toString(); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getClusterId() != null) sb.append("ClusterId: ").append(getClusterId()).append(","); if (getStepIds() != null) sb.append("StepIds: ").append(getStepIds()).append(","); if (getStepCancellationOption() != null) sb.append("StepCancellationOption: ").append(getStepCancellationOption()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CancelStepsRequest == false) return false; CancelStepsRequest other = (CancelStepsRequest) obj; if (other.getClusterId() == null ^ this.getClusterId() == null) return false; if (other.getClusterId() != null && other.getClusterId().equals(this.getClusterId()) == false) return false; if (other.getStepIds() == null ^ this.getStepIds() == null) return false; if (other.getStepIds() != null && other.getStepIds().equals(this.getStepIds()) == false) return false; if (other.getStepCancellationOption() == null ^ this.getStepCancellationOption() == null) return false; if (other.getStepCancellationOption() != null && other.getStepCancellationOption().equals(this.getStepCancellationOption()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClusterId() == null) ? 0 : getClusterId().hashCode()); hashCode = prime * hashCode + ((getStepIds() == null) ? 0 : getStepIds().hashCode()); hashCode = prime * hashCode + ((getStepCancellationOption() == null) ? 0 : getStepCancellationOption().hashCode()); return hashCode; } @Override public CancelStepsRequest clone() { return (CancelStepsRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy