/* * 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 UpdateStateMachineAliasRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The Amazon Resource Name (ARN) of the state machine alias. *

*/ private String stateMachineAliasArn; /** *

* A description of the state machine alias. *

*/ private String description; /** *

* The routing configuration of the state machine alias. *

*

* An array of RoutingConfig objects that specifies up to two state machine versions that the alias * starts executions for. *

*/ private java.util.List routingConfiguration; /** *

* The Amazon Resource Name (ARN) of the state machine alias. *

* * @param stateMachineAliasArn * The Amazon Resource Name (ARN) of the state machine alias. */ public void setStateMachineAliasArn(String stateMachineAliasArn) { this.stateMachineAliasArn = stateMachineAliasArn; } /** *

* The Amazon Resource Name (ARN) of the state machine alias. *

* * @return The Amazon Resource Name (ARN) of the state machine alias. */ public String getStateMachineAliasArn() { return this.stateMachineAliasArn; } /** *

* The Amazon Resource Name (ARN) of the state machine alias. *

* * @param stateMachineAliasArn * The Amazon Resource Name (ARN) of the state machine alias. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStateMachineAliasRequest withStateMachineAliasArn(String stateMachineAliasArn) { setStateMachineAliasArn(stateMachineAliasArn); return this; } /** *

* A description of the state machine alias. *

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

* A description of the state machine alias. *

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

* A description of the state machine alias. *

* * @param description * A description of the state machine alias. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStateMachineAliasRequest withDescription(String description) { setDescription(description); return this; } /** *

* The routing configuration of the state machine alias. *

*

* An array of RoutingConfig objects that specifies up to two state machine versions that the alias * starts executions for. *

* * @return The routing configuration of the state machine alias.

*

* An array of RoutingConfig objects that specifies up to two state machine versions that the * alias starts executions for. */ public java.util.List getRoutingConfiguration() { return routingConfiguration; } /** *

* The routing configuration of the state machine alias. *

*

* An array of RoutingConfig objects that specifies up to two state machine versions that the alias * starts executions for. *

* * @param routingConfiguration * The routing configuration of the state machine alias.

*

* An array of RoutingConfig objects that specifies up to two state machine versions that the * alias starts executions for. */ public void setRoutingConfiguration(java.util.Collection routingConfiguration) { if (routingConfiguration == null) { this.routingConfiguration = null; return; } this.routingConfiguration = new java.util.ArrayList(routingConfiguration); } /** *

* The routing configuration of the state machine alias. *

*

* An array of RoutingConfig objects that specifies up to two state machine versions that the alias * starts executions for. *

*

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

* * @param routingConfiguration * The routing configuration of the state machine alias.

*

* An array of RoutingConfig objects that specifies up to two state machine versions that the * alias starts executions for. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStateMachineAliasRequest withRoutingConfiguration(RoutingConfigurationListItem... routingConfiguration) { if (this.routingConfiguration == null) { setRoutingConfiguration(new java.util.ArrayList(routingConfiguration.length)); } for (RoutingConfigurationListItem ele : routingConfiguration) { this.routingConfiguration.add(ele); } return this; } /** *

* The routing configuration of the state machine alias. *

*

* An array of RoutingConfig objects that specifies up to two state machine versions that the alias * starts executions for. *

* * @param routingConfiguration * The routing configuration of the state machine alias.

*

* An array of RoutingConfig objects that specifies up to two state machine versions that the * alias starts executions for. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateStateMachineAliasRequest withRoutingConfiguration(java.util.Collection routingConfiguration) { setRoutingConfiguration(routingConfiguration); 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 (getStateMachineAliasArn() != null) sb.append("StateMachineAliasArn: ").append(getStateMachineAliasArn()).append(","); if (getDescription() != null) sb.append("Description: ").append("***Sensitive Data Redacted***").append(","); if (getRoutingConfiguration() != null) sb.append("RoutingConfiguration: ").append(getRoutingConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof UpdateStateMachineAliasRequest == false) return false; UpdateStateMachineAliasRequest other = (UpdateStateMachineAliasRequest) obj; if (other.getStateMachineAliasArn() == null ^ this.getStateMachineAliasArn() == null) return false; if (other.getStateMachineAliasArn() != null && other.getStateMachineAliasArn().equals(this.getStateMachineAliasArn()) == false) return false; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getRoutingConfiguration() == null ^ this.getRoutingConfiguration() == null) return false; if (other.getRoutingConfiguration() != null && other.getRoutingConfiguration().equals(this.getRoutingConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStateMachineAliasArn() == null) ? 0 : getStateMachineAliasArn().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRoutingConfiguration() == null) ? 0 : getRoutingConfiguration().hashCode()); return hashCode; } @Override public UpdateStateMachineAliasRequest clone() { return (UpdateStateMachineAliasRequest) super.clone(); } }