/* * 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.AmazonWebServiceRequest; /** *
* The input argument to the AddJobFlowSteps operation. *
* * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AddJobFlowStepsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** ** A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be * obtained from ListClusters. *
*/ private String jobFlowId; /** ** A list of StepConfig to be executed by the job flow. *
*/ private com.amazonaws.internal.SdkInternalList
* The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The runtime role can be a
* cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the
* following format: arn:partition:service:region:account:resource
.
*
* For example, arn:aws:IAM::1234567890:role/ReadOnly
is a correctly formatted runtime role ARN.
*
* A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be * obtained from ListClusters. *
* * @param jobFlowId * A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can * also be obtained from ListClusters. */ public void setJobFlowId(String jobFlowId) { this.jobFlowId = jobFlowId; } /** ** A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be * obtained from ListClusters. *
* * @return A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can * also be obtained from ListClusters. */ public String getJobFlowId() { return this.jobFlowId; } /** ** A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be * obtained from ListClusters. *
* * @param jobFlowId * A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can * also be obtained from ListClusters. * @return Returns a reference to this object so that method calls can be chained together. */ public AddJobFlowStepsRequest withJobFlowId(String jobFlowId) { setJobFlowId(jobFlowId); return this; } /** ** A list of StepConfig to be executed by the job flow. *
* * @return A list of StepConfig to be executed by the job flow. */ public java.util.List* A list of StepConfig to be executed by the job flow. *
* * @param steps * A list of StepConfig to be executed by the job flow. */ public void setSteps(java.util.Collection* A list of StepConfig to be executed by the job flow. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setSteps(java.util.Collection)} or {@link #withSteps(java.util.Collection)} if you want to override the * existing values. *
* * @param steps * A list of StepConfig to be executed by the job flow. * @return Returns a reference to this object so that method calls can be chained together. */ public AddJobFlowStepsRequest withSteps(StepConfig... steps) { if (this.steps == null) { setSteps(new com.amazonaws.internal.SdkInternalList* A list of StepConfig to be executed by the job flow. *
* * @param steps * A list of StepConfig to be executed by the job flow. * @return Returns a reference to this object so that method calls can be chained together. */ public AddJobFlowStepsRequest withSteps(java.util.Collection
* The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The runtime role can be a
* cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the
* following format: arn:partition:service:region:account:resource
.
*
* For example, arn:aws:IAM::1234567890:role/ReadOnly
is a correctly formatted runtime role ARN.
*
arn:partition:service:region:account:resource
.
*
* For example, arn:aws:IAM::1234567890:role/ReadOnly
is a correctly formatted runtime role ARN.
*/
public void setExecutionRoleArn(String executionRoleArn) {
this.executionRoleArn = executionRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The runtime role can be a
* cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the
* following format: arn:partition:service:region:account:resource
.
*
* For example, arn:aws:IAM::1234567890:role/ReadOnly
is a correctly formatted runtime role ARN.
*
arn:partition:service:region:account:resource
.
*
* For example, arn:aws:IAM::1234567890:role/ReadOnly
is a correctly formatted runtime role
* ARN.
*/
public String getExecutionRoleArn() {
return this.executionRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the runtime role for a step on the cluster. The runtime role can be a
* cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the
* following format: arn:partition:service:region:account:resource
.
*
* For example, arn:aws:IAM::1234567890:role/ReadOnly
is a correctly formatted runtime role ARN.
*
arn:partition:service:region:account:resource
.
*
* For example, arn:aws:IAM::1234567890:role/ReadOnly
is a correctly formatted runtime role ARN.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AddJobFlowStepsRequest withExecutionRoleArn(String executionRoleArn) {
setExecutionRoleArn(executionRoleArn);
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 (getJobFlowId() != null)
sb.append("JobFlowId: ").append(getJobFlowId()).append(",");
if (getSteps() != null)
sb.append("Steps: ").append(getSteps()).append(",");
if (getExecutionRoleArn() != null)
sb.append("ExecutionRoleArn: ").append(getExecutionRoleArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AddJobFlowStepsRequest == false)
return false;
AddJobFlowStepsRequest other = (AddJobFlowStepsRequest) obj;
if (other.getJobFlowId() == null ^ this.getJobFlowId() == null)
return false;
if (other.getJobFlowId() != null && other.getJobFlowId().equals(this.getJobFlowId()) == false)
return false;
if (other.getSteps() == null ^ this.getSteps() == null)
return false;
if (other.getSteps() != null && other.getSteps().equals(this.getSteps()) == false)
return false;
if (other.getExecutionRoleArn() == null ^ this.getExecutionRoleArn() == null)
return false;
if (other.getExecutionRoleArn() != null && other.getExecutionRoleArn().equals(this.getExecutionRoleArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getJobFlowId() == null) ? 0 : getJobFlowId().hashCode());
hashCode = prime * hashCode + ((getSteps() == null) ? 0 : getSteps().hashCode());
hashCode = prime * hashCode + ((getExecutionRoleArn() == null) ? 0 : getExecutionRoleArn().hashCode());
return hashCode;
}
@Override
public AddJobFlowStepsRequest clone() {
return (AddJobFlowStepsRequest) super.clone();
}
}