/* * 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 PublishStateMachineVersionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The Amazon Resource Name (ARN) of the state machine. *
*/ private String stateMachineArn; /** ** Only publish the state machine version if the current state machine's revision ID matches the specified ID. *
*
* Use this option to avoid publishing a version if the state machine changed since you last updated it. If the
* specified revision ID doesn't match the state machine's current revision ID, the API returns
* ConflictException
.
*
* To specify an initial revision ID for a state machine with no revision ID assigned, specify the string
* INITIAL
for the revisionId
parameter. For example, you can specify a
* revisionID
of INITIAL
when you create a state machine using the
* CreateStateMachine API action.
*
* An optional description of the state machine version. *
*/ private String description; /** ** 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 PublishStateMachineVersionRequest withStateMachineArn(String stateMachineArn) { setStateMachineArn(stateMachineArn); return this; } /** ** Only publish the state machine version if the current state machine's revision ID matches the specified ID. *
*
* Use this option to avoid publishing a version if the state machine changed since you last updated it. If the
* specified revision ID doesn't match the state machine's current revision ID, the API returns
* ConflictException
.
*
* To specify an initial revision ID for a state machine with no revision ID assigned, specify the string
* INITIAL
for the revisionId
parameter. For example, you can specify a
* revisionID
of INITIAL
when you create a state machine using the
* CreateStateMachine API action.
*
* Use this option to avoid publishing a version if the state machine changed since you last updated it. If
* the specified revision ID doesn't match the state machine's current revision ID, the API returns
* ConflictException
.
*
* To specify an initial revision ID for a state machine with no revision ID assigned, specify the string
* INITIAL
for the revisionId
parameter. For example, you can specify a
* revisionID
of INITIAL
when you create a state machine using the
* CreateStateMachine API action.
*
* Only publish the state machine version if the current state machine's revision ID matches the specified ID. *
*
* Use this option to avoid publishing a version if the state machine changed since you last updated it. If the
* specified revision ID doesn't match the state machine's current revision ID, the API returns
* ConflictException
.
*
* To specify an initial revision ID for a state machine with no revision ID assigned, specify the string
* INITIAL
for the revisionId
parameter. For example, you can specify a
* revisionID
of INITIAL
when you create a state machine using the
* CreateStateMachine API action.
*
* Use this option to avoid publishing a version if the state machine changed since you last updated it. If
* the specified revision ID doesn't match the state machine's current revision ID, the API returns
* ConflictException
.
*
* To specify an initial revision ID for a state machine with no revision ID assigned, specify the string
* INITIAL
for the revisionId
parameter. For example, you can specify a
* revisionID
of INITIAL
when you create a state machine using the
* CreateStateMachine API action.
*
* Only publish the state machine version if the current state machine's revision ID matches the specified ID. *
*
* Use this option to avoid publishing a version if the state machine changed since you last updated it. If the
* specified revision ID doesn't match the state machine's current revision ID, the API returns
* ConflictException
.
*
* To specify an initial revision ID for a state machine with no revision ID assigned, specify the string
* INITIAL
for the revisionId
parameter. For example, you can specify a
* revisionID
of INITIAL
when you create a state machine using the
* CreateStateMachine API action.
*
* Use this option to avoid publishing a version if the state machine changed since you last updated it. If
* the specified revision ID doesn't match the state machine's current revision ID, the API returns
* ConflictException
.
*
* To specify an initial revision ID for a state machine with no revision ID assigned, specify the string
* INITIAL
for the revisionId
parameter. For example, you can specify a
* revisionID
of INITIAL
when you create a state machine using the
* CreateStateMachine API action.
*
* An optional description of the state machine version. *
* * @param description * An optional description of the state machine version. */ public void setDescription(String description) { this.description = description; } /** ** An optional description of the state machine version. *
* * @return An optional description of the state machine version. */ public String getDescription() { return this.description; } /** ** An optional description of the state machine version. *
* * @param description * An optional description of the state machine version. * @return Returns a reference to this object so that method calls can be chained together. */ public PublishStateMachineVersionRequest 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 (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 PublishStateMachineVersionRequest == false) return false; PublishStateMachineVersionRequest other = (PublishStateMachineVersionRequest) obj; if (other.getStateMachineArn() == null ^ this.getStateMachineArn() == null) return false; if (other.getStateMachineArn() != null && other.getStateMachineArn().equals(this.getStateMachineArn()) == 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 + ((getRevisionId() == null) ? 0 : getRevisionId().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); return hashCode; } @Override public PublishStateMachineVersionRequest clone() { return (PublishStateMachineVersionRequest) super.clone(); } }