/* * 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.stepfunctions.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateStateMachineRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The Amazon Resource Name (ARN) of the state machine. *
*/ private String stateMachineArn; /** ** The Amazon States Language definition of the state machine. See Amazon States * Language. *
*/ private String definition; /** ** The Amazon Resource Name (ARN) of the IAM role of the state machine. *
*/ private String roleArn; /** *
* Use the LoggingConfiguration
data type to set CloudWatch Logs options.
*
* Selects whether X-Ray tracing is enabled. *
*/ private TracingConfiguration tracingConfiguration; /** *
* Specifies whether the state machine version is published. The default is false
. To publish a version
* after updating the state machine, set publish
to true
.
*
* An optional description of the state machine version to publish. *
*
* You can only specify the versionDescription
parameter if you've set publish
to
* true
.
*
* The Amazon Resource Name (ARN) of the state machine. *
* * @param stateMachineArn * The Amazon Resource Name (ARN) of the state machine. */ public void setStateMachineArn(String stateMachineArn) { this.stateMachineArn = stateMachineArn; } /** ** The Amazon Resource Name (ARN) of the state machine. *
* * @return The Amazon Resource Name (ARN) of the state machine. */ public String getStateMachineArn() { return this.stateMachineArn; } /** ** The Amazon Resource Name (ARN) of the state machine. *
* * @param stateMachineArn * The Amazon Resource Name (ARN) of the state machine. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStateMachineRequest withStateMachineArn(String stateMachineArn) { setStateMachineArn(stateMachineArn); return this; } /** ** The Amazon States Language definition of the state machine. See Amazon States * Language. *
* * @param definition * The Amazon States Language definition of the state machine. See Amazon * States Language. */ public void setDefinition(String definition) { this.definition = definition; } /** ** The Amazon States Language definition of the state machine. See Amazon States * Language. *
* * @return The Amazon States Language definition of the state machine. See Amazon * States Language. */ public String getDefinition() { return this.definition; } /** ** The Amazon States Language definition of the state machine. See Amazon States * Language. *
* * @param definition * The Amazon States Language definition of the state machine. See Amazon * States Language. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStateMachineRequest withDefinition(String definition) { setDefinition(definition); return this; } /** ** The Amazon Resource Name (ARN) of the IAM role of the state machine. *
* * @param roleArn * The Amazon Resource Name (ARN) of the IAM role of the state machine. */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role of the state machine. *
* * @return The Amazon Resource Name (ARN) of the IAM role of the state machine. */ public String getRoleArn() { return this.roleArn; } /** ** The Amazon Resource Name (ARN) of the IAM role of the state machine. *
* * @param roleArn * The Amazon Resource Name (ARN) of the IAM role of the state machine. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStateMachineRequest withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *
* Use the LoggingConfiguration
data type to set CloudWatch Logs options.
*
LoggingConfiguration
data type to set CloudWatch Logs options.
*/
public void setLoggingConfiguration(LoggingConfiguration loggingConfiguration) {
this.loggingConfiguration = loggingConfiguration;
}
/**
*
* Use the LoggingConfiguration
data type to set CloudWatch Logs options.
*
LoggingConfiguration
data type to set CloudWatch Logs options.
*/
public LoggingConfiguration getLoggingConfiguration() {
return this.loggingConfiguration;
}
/**
*
* Use the LoggingConfiguration
data type to set CloudWatch Logs options.
*
LoggingConfiguration
data type to set CloudWatch Logs options.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateStateMachineRequest withLoggingConfiguration(LoggingConfiguration loggingConfiguration) {
setLoggingConfiguration(loggingConfiguration);
return this;
}
/**
* * Selects whether X-Ray tracing is enabled. *
* * @param tracingConfiguration * Selects whether X-Ray tracing is enabled. */ public void setTracingConfiguration(TracingConfiguration tracingConfiguration) { this.tracingConfiguration = tracingConfiguration; } /** ** Selects whether X-Ray tracing is enabled. *
* * @return Selects whether X-Ray tracing is enabled. */ public TracingConfiguration getTracingConfiguration() { return this.tracingConfiguration; } /** ** Selects whether X-Ray tracing is enabled. *
* * @param tracingConfiguration * Selects whether X-Ray tracing is enabled. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStateMachineRequest withTracingConfiguration(TracingConfiguration tracingConfiguration) { setTracingConfiguration(tracingConfiguration); return this; } /** *
* Specifies whether the state machine version is published. The default is false
. To publish a version
* after updating the state machine, set publish
to true
.
*
false
. To publish a
* version after updating the state machine, set publish
to true
.
*/
public void setPublish(Boolean publish) {
this.publish = publish;
}
/**
*
* Specifies whether the state machine version is published. The default is false
. To publish a version
* after updating the state machine, set publish
to true
.
*
false
. To publish a
* version after updating the state machine, set publish
to true
.
*/
public Boolean getPublish() {
return this.publish;
}
/**
*
* Specifies whether the state machine version is published. The default is false
. To publish a version
* after updating the state machine, set publish
to true
.
*
false
. To publish a
* version after updating the state machine, set publish
to true
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateStateMachineRequest withPublish(Boolean publish) {
setPublish(publish);
return this;
}
/**
*
* Specifies whether the state machine version is published. The default is false
. To publish a version
* after updating the state machine, set publish
to true
.
*
false
. To publish a
* version after updating the state machine, set publish
to true
.
*/
public Boolean isPublish() {
return this.publish;
}
/**
* * An optional description of the state machine version to publish. *
*
* You can only specify the versionDescription
parameter if you've set publish
to
* true
.
*
* You can only specify the versionDescription
parameter if you've set publish
to
* true
.
*/
public void setVersionDescription(String versionDescription) {
this.versionDescription = versionDescription;
}
/**
*
* An optional description of the state machine version to publish. *
*
* You can only specify the versionDescription
parameter if you've set publish
to
* true
.
*
* You can only specify the versionDescription
parameter if you've set publish
to
* true
.
*/
public String getVersionDescription() {
return this.versionDescription;
}
/**
*
* An optional description of the state machine version to publish. *
*
* You can only specify the versionDescription
parameter if you've set publish
to
* true
.
*
* You can only specify the versionDescription
parameter if you've set publish
to
* true
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateStateMachineRequest withVersionDescription(String versionDescription) {
setVersionDescription(versionDescription);
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 (getStateMachineArn() != null)
sb.append("StateMachineArn: ").append(getStateMachineArn()).append(",");
if (getDefinition() != null)
sb.append("Definition: ").append("***Sensitive Data Redacted***").append(",");
if (getRoleArn() != null)
sb.append("RoleArn: ").append(getRoleArn()).append(",");
if (getLoggingConfiguration() != null)
sb.append("LoggingConfiguration: ").append(getLoggingConfiguration()).append(",");
if (getTracingConfiguration() != null)
sb.append("TracingConfiguration: ").append(getTracingConfiguration()).append(",");
if (getPublish() != null)
sb.append("Publish: ").append(getPublish()).append(",");
if (getVersionDescription() != null)
sb.append("VersionDescription: ").append("***Sensitive Data Redacted***");
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateStateMachineRequest == false)
return false;
UpdateStateMachineRequest other = (UpdateStateMachineRequest) obj;
if (other.getStateMachineArn() == null ^ this.getStateMachineArn() == null)
return false;
if (other.getStateMachineArn() != null && other.getStateMachineArn().equals(this.getStateMachineArn()) == false)
return false;
if (other.getDefinition() == null ^ this.getDefinition() == null)
return false;
if (other.getDefinition() != null && other.getDefinition().equals(this.getDefinition()) == false)
return false;
if (other.getRoleArn() == null ^ this.getRoleArn() == null)
return false;
if (other.getRoleArn() != null && other.getRoleArn().equals(this.getRoleArn()) == false)
return false;
if (other.getLoggingConfiguration() == null ^ this.getLoggingConfiguration() == null)
return false;
if (other.getLoggingConfiguration() != null && other.getLoggingConfiguration().equals(this.getLoggingConfiguration()) == false)
return false;
if (other.getTracingConfiguration() == null ^ this.getTracingConfiguration() == null)
return false;
if (other.getTracingConfiguration() != null && other.getTracingConfiguration().equals(this.getTracingConfiguration()) == false)
return false;
if (other.getPublish() == null ^ this.getPublish() == null)
return false;
if (other.getPublish() != null && other.getPublish().equals(this.getPublish()) == false)
return false;
if (other.getVersionDescription() == null ^ this.getVersionDescription() == null)
return false;
if (other.getVersionDescription() != null && other.getVersionDescription().equals(this.getVersionDescription()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getStateMachineArn() == null) ? 0 : getStateMachineArn().hashCode());
hashCode = prime * hashCode + ((getDefinition() == null) ? 0 : getDefinition().hashCode());
hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode());
hashCode = prime * hashCode + ((getLoggingConfiguration() == null) ? 0 : getLoggingConfiguration().hashCode());
hashCode = prime * hashCode + ((getTracingConfiguration() == null) ? 0 : getTracingConfiguration().hashCode());
hashCode = prime * hashCode + ((getPublish() == null) ? 0 : getPublish().hashCode());
hashCode = prime * hashCode + ((getVersionDescription() == null) ? 0 : getVersionDescription().hashCode());
return hashCode;
}
@Override
public UpdateStateMachineRequest clone() {
return (UpdateStateMachineRequest) super.clone();
}
}