/* * 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; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribeStateMachineResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The Amazon Resource Name (ARN) that identifies the state machine. *

*

* If you specified a state machine version ARN in your request, the API returns the version ARN. The version ARN is * a combination of state machine ARN and the version number separated by a colon (:). For example, * stateMachineARN:1. *

*/ private String stateMachineArn; /** *

* The name of the state machine. *

*

* A name must not contain: *

* *

* To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _. *

*/ private String name; /** *

* The current status of the state machine. *

*/ private String status; /** *

* 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 used when creating this state machine. (The IAM role maintains * security by granting Step Functions access to Amazon Web Services resources.) *

*/ private String roleArn; /** *

* The type of the state machine (STANDARD or EXPRESS). *

*/ private String type; /** *

* The date the state machine is created. *

*

* For a state machine version, creationDate is the date the version was created. *

*/ private java.util.Date creationDate; private LoggingConfiguration loggingConfiguration; /** *

* Selects whether X-Ray tracing is enabled. *

*/ private TracingConfiguration tracingConfiguration; /** *

* A user-defined or an auto-generated string that identifies a Map state. This parameter is present * only if the stateMachineArn specified in input is a qualified state machine ARN. *

*/ private String label; /** *

* The revision identifier for the state machine. *

*

* Use the revisionId parameter to compare between versions of a state machine configuration used for * executions without performing a diff of the properties, such as definition and roleArn. *

*/ private String revisionId; /** *

* The description of the state machine version. *

*/ private String description; /** *

* The Amazon Resource Name (ARN) that identifies the state machine. *

*

* If you specified a state machine version ARN in your request, the API returns the version ARN. The version ARN is * a combination of state machine ARN and the version number separated by a colon (:). For example, * stateMachineARN:1. *

* * @param stateMachineArn * The Amazon Resource Name (ARN) that identifies the state machine.

*

* If you specified a state machine version ARN in your request, the API returns the version ARN. The version * ARN is a combination of state machine ARN and the version number separated by a colon (:). For example, * stateMachineARN:1. */ public void setStateMachineArn(String stateMachineArn) { this.stateMachineArn = stateMachineArn; } /** *

* The Amazon Resource Name (ARN) that identifies the state machine. *

*

* If you specified a state machine version ARN in your request, the API returns the version ARN. The version ARN is * a combination of state machine ARN and the version number separated by a colon (:). For example, * stateMachineARN:1. *

* * @return The Amazon Resource Name (ARN) that identifies the state machine.

*

* If you specified a state machine version ARN in your request, the API returns the version ARN. The * version ARN is a combination of state machine ARN and the version number separated by a colon (:). For * example, stateMachineARN:1. */ public String getStateMachineArn() { return this.stateMachineArn; } /** *

* The Amazon Resource Name (ARN) that identifies the state machine. *

*

* If you specified a state machine version ARN in your request, the API returns the version ARN. The version ARN is * a combination of state machine ARN and the version number separated by a colon (:). For example, * stateMachineARN:1. *

* * @param stateMachineArn * The Amazon Resource Name (ARN) that identifies the state machine.

*

* If you specified a state machine version ARN in your request, the API returns the version ARN. The version * ARN is a combination of state machine ARN and the version number separated by a colon (:). For example, * stateMachineARN:1. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStateMachineResult withStateMachineArn(String stateMachineArn) { setStateMachineArn(stateMachineArn); return this; } /** *

* The name of the state machine. *

*

* A name must not contain: *

* *

* To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _. *

* * @param name * The name of the state machine.

*

* A name must not contain: *

* *

* To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _. */ public void setName(String name) { this.name = name; } /** *

* The name of the state machine. *

*

* A name must not contain: *

* *

* To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _. *

* * @return The name of the state machine.

*

* A name must not contain: *

* *

* To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _. */ public String getName() { return this.name; } /** *

* The name of the state machine. *

*

* A name must not contain: *

* *

* To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _. *

* * @param name * The name of the state machine.

*

* A name must not contain: *

* *

* To enable logging with CloudWatch Logs, the name should only contain 0-9, A-Z, a-z, - and _. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStateMachineResult withName(String name) { setName(name); return this; } /** *

* The current status of the state machine. *

* * @param status * The current status of the state machine. * @see StateMachineStatus */ public void setStatus(String status) { this.status = status; } /** *

* The current status of the state machine. *

* * @return The current status of the state machine. * @see StateMachineStatus */ public String getStatus() { return this.status; } /** *

* The current status of the state machine. *

* * @param status * The current status of the state machine. * @return Returns a reference to this object so that method calls can be chained together. * @see StateMachineStatus */ public DescribeStateMachineResult withStatus(String status) { setStatus(status); return this; } /** *

* The current status of the state machine. *

* * @param status * The current status of the state machine. * @see StateMachineStatus */ public void setStatus(StateMachineStatus status) { withStatus(status); } /** *

* The current status of the state machine. *

* * @param status * The current status of the state machine. * @return Returns a reference to this object so that method calls can be chained together. * @see StateMachineStatus */ public DescribeStateMachineResult withStatus(StateMachineStatus status) { this.status = status.toString(); 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 DescribeStateMachineResult withDefinition(String definition) { setDefinition(definition); return this; } /** *

* The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role maintains * security by granting Step Functions access to Amazon Web Services resources.) *

* * @param roleArn * The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role * maintains security by granting Step Functions access to Amazon Web Services resources.) */ public void setRoleArn(String roleArn) { this.roleArn = roleArn; } /** *

* The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role maintains * security by granting Step Functions access to Amazon Web Services resources.) *

* * @return The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role * maintains security by granting Step Functions access to Amazon Web Services resources.) */ public String getRoleArn() { return this.roleArn; } /** *

* The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role maintains * security by granting Step Functions access to Amazon Web Services resources.) *

* * @param roleArn * The Amazon Resource Name (ARN) of the IAM role used when creating this state machine. (The IAM role * maintains security by granting Step Functions access to Amazon Web Services resources.) * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStateMachineResult withRoleArn(String roleArn) { setRoleArn(roleArn); return this; } /** *

* The type of the state machine (STANDARD or EXPRESS). *

* * @param type * The type of the state machine (STANDARD or EXPRESS). * @see StateMachineType */ public void setType(String type) { this.type = type; } /** *

* The type of the state machine (STANDARD or EXPRESS). *

* * @return The type of the state machine (STANDARD or EXPRESS). * @see StateMachineType */ public String getType() { return this.type; } /** *

* The type of the state machine (STANDARD or EXPRESS). *

* * @param type * The type of the state machine (STANDARD or EXPRESS). * @return Returns a reference to this object so that method calls can be chained together. * @see StateMachineType */ public DescribeStateMachineResult withType(String type) { setType(type); return this; } /** *

* The type of the state machine (STANDARD or EXPRESS). *

* * @param type * The type of the state machine (STANDARD or EXPRESS). * @see StateMachineType */ public void setType(StateMachineType type) { withType(type); } /** *

* The type of the state machine (STANDARD or EXPRESS). *

* * @param type * The type of the state machine (STANDARD or EXPRESS). * @return Returns a reference to this object so that method calls can be chained together. * @see StateMachineType */ public DescribeStateMachineResult withType(StateMachineType type) { this.type = type.toString(); return this; } /** *

* The date the state machine is created. *

*

* For a state machine version, creationDate is the date the version was created. *

* * @param creationDate * The date the state machine is created.

*

* For a state machine version, creationDate is the date the version was created. */ public void setCreationDate(java.util.Date creationDate) { this.creationDate = creationDate; } /** *

* The date the state machine is created. *

*

* For a state machine version, creationDate is the date the version was created. *

* * @return The date the state machine is created.

*

* For a state machine version, creationDate is the date the version was created. */ public java.util.Date getCreationDate() { return this.creationDate; } /** *

* The date the state machine is created. *

*

* For a state machine version, creationDate is the date the version was created. *

* * @param creationDate * The date the state machine is created.

*

* For a state machine version, creationDate is the date the version was created. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStateMachineResult withCreationDate(java.util.Date creationDate) { setCreationDate(creationDate); return this; } /** * @param loggingConfiguration */ public void setLoggingConfiguration(LoggingConfiguration loggingConfiguration) { this.loggingConfiguration = loggingConfiguration; } /** * @return */ public LoggingConfiguration getLoggingConfiguration() { return this.loggingConfiguration; } /** * @param loggingConfiguration * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStateMachineResult 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 DescribeStateMachineResult withTracingConfiguration(TracingConfiguration tracingConfiguration) { setTracingConfiguration(tracingConfiguration); return this; } /** *

* A user-defined or an auto-generated string that identifies a Map state. This parameter is present * only if the stateMachineArn specified in input is a qualified state machine ARN. *

* * @param label * A user-defined or an auto-generated string that identifies a Map state. This parameter is * present only if the stateMachineArn specified in input is a qualified state machine ARN. */ public void setLabel(String label) { this.label = label; } /** *

* A user-defined or an auto-generated string that identifies a Map state. This parameter is present * only if the stateMachineArn specified in input is a qualified state machine ARN. *

* * @return A user-defined or an auto-generated string that identifies a Map state. This parameter is * present only if the stateMachineArn specified in input is a qualified state machine ARN. */ public String getLabel() { return this.label; } /** *

* A user-defined or an auto-generated string that identifies a Map state. This parameter is present * only if the stateMachineArn specified in input is a qualified state machine ARN. *

* * @param label * A user-defined or an auto-generated string that identifies a Map state. This parameter is * present only if the stateMachineArn specified in input is a qualified state machine ARN. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStateMachineResult withLabel(String label) { setLabel(label); return this; } /** *

* The revision identifier for the state machine. *

*

* Use the revisionId parameter to compare between versions of a state machine configuration used for * executions without performing a diff of the properties, such as definition and roleArn. *

* * @param revisionId * The revision identifier for the state machine.

*

* Use the revisionId parameter to compare between versions of a state machine configuration * used for executions without performing a diff of the properties, such as definition and * roleArn. */ public void setRevisionId(String revisionId) { this.revisionId = revisionId; } /** *

* The revision identifier for the state machine. *

*

* Use the revisionId parameter to compare between versions of a state machine configuration used for * executions without performing a diff of the properties, such as definition and roleArn. *

* * @return The revision identifier for the state machine.

*

* Use the revisionId parameter to compare between versions of a state machine configuration * used for executions without performing a diff of the properties, such as definition and * roleArn. */ public String getRevisionId() { return this.revisionId; } /** *

* The revision identifier for the state machine. *

*

* Use the revisionId parameter to compare between versions of a state machine configuration used for * executions without performing a diff of the properties, such as definition and roleArn. *

* * @param revisionId * The revision identifier for the state machine.

*

* Use the revisionId parameter to compare between versions of a state machine configuration * used for executions without performing a diff of the properties, such as definition and * roleArn. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStateMachineResult withRevisionId(String revisionId) { setRevisionId(revisionId); return this; } /** *

* The description of the state machine version. *

* * @param description * The description of the state machine version. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the state machine version. *

* * @return The description of the state machine version. */ public String getDescription() { return this.description; } /** *

* The description of the state machine version. *

* * @param description * The description of the state machine version. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStateMachineResult withDescription(String description) { setDescription(description); 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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getDefinition() != null) sb.append("Definition: ").append("***Sensitive Data Redacted***").append(","); if (getRoleArn() != null) sb.append("RoleArn: ").append(getRoleArn()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getCreationDate() != null) sb.append("CreationDate: ").append(getCreationDate()).append(","); if (getLoggingConfiguration() != null) sb.append("LoggingConfiguration: ").append(getLoggingConfiguration()).append(","); if (getTracingConfiguration() != null) sb.append("TracingConfiguration: ").append(getTracingConfiguration()).append(","); if (getLabel() != null) sb.append("Label: ").append(getLabel()).append(","); if (getRevisionId() != null) sb.append("RevisionId: ").append(getRevisionId()).append(","); if (getDescription() != null) sb.append("Description: ").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 DescribeStateMachineResult == false) return false; DescribeStateMachineResult other = (DescribeStateMachineResult) obj; if (other.getStateMachineArn() == null ^ this.getStateMachineArn() == null) return false; if (other.getStateMachineArn() != null && other.getStateMachineArn().equals(this.getStateMachineArn()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == 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.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getCreationDate() == null ^ this.getCreationDate() == null) return false; if (other.getCreationDate() != null && other.getCreationDate().equals(this.getCreationDate()) == 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.getLabel() == null ^ this.getLabel() == null) return false; if (other.getLabel() != null && other.getLabel().equals(this.getLabel()) == false) return false; if (other.getRevisionId() == null ^ this.getRevisionId() == null) return false; if (other.getRevisionId() != null && other.getRevisionId().equals(this.getRevisionId()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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 + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getDefinition() == null) ? 0 : getDefinition().hashCode()); hashCode = prime * hashCode + ((getRoleArn() == null) ? 0 : getRoleArn().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getCreationDate() == null) ? 0 : getCreationDate().hashCode()); hashCode = prime * hashCode + ((getLoggingConfiguration() == null) ? 0 : getLoggingConfiguration().hashCode()); hashCode = prime * hashCode + ((getTracingConfiguration() == null) ? 0 : getTracingConfiguration().hashCode()); hashCode = prime * hashCode + ((getLabel() == null) ? 0 : getLabel().hashCode()); hashCode = prime * hashCode + ((getRevisionId() == null) ? 0 : getRevisionId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); return hashCode; } @Override public DescribeStateMachineResult clone() { try { return (DescribeStateMachineResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }