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

* A description for the state machine alias. *

*/ private String description; /** *

* The name of the state machine alias. *

*

* To avoid conflict with version ARNs, don't use an integer in the name of the alias. *

*/ private String name; /** *

* The routing configuration of a state machine alias. The routing configuration shifts execution traffic between * two state machine versions. routingConfiguration contains an array of RoutingConfig * objects that specify up to two state machine versions. Step Functions then randomly choses which version to run * an execution with based on the weight assigned to each RoutingConfig. *

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

* A description for the state machine alias. *

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

* A description for the state machine alias. *

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

* A description for the state machine alias. *

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

* The name of the state machine alias. *

*

* To avoid conflict with version ARNs, don't use an integer in the name of the alias. *

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

*

* To avoid conflict with version ARNs, don't use an integer in the name of the alias. */ public void setName(String name) { this.name = name; } /** *

* The name of the state machine alias. *

*

* To avoid conflict with version ARNs, don't use an integer in the name of the alias. *

* * @return The name of the state machine alias.

*

* To avoid conflict with version ARNs, don't use an integer in the name of the alias. */ public String getName() { return this.name; } /** *

* The name of the state machine alias. *

*

* To avoid conflict with version ARNs, don't use an integer in the name of the alias. *

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

*

* To avoid conflict with version ARNs, don't use an integer in the name of the alias. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateStateMachineAliasRequest withName(String name) { setName(name); return this; } /** *

* The routing configuration of a state machine alias. The routing configuration shifts execution traffic between * two state machine versions. routingConfiguration contains an array of RoutingConfig * objects that specify up to two state machine versions. Step Functions then randomly choses which version to run * an execution with based on the weight assigned to each RoutingConfig. *

* * @return The routing configuration of a state machine alias. The routing configuration shifts execution traffic * between two state machine versions. routingConfiguration contains an array of * RoutingConfig objects that specify up to two state machine versions. Step Functions then * randomly choses which version to run an execution with based on the weight assigned to each * RoutingConfig. */ public java.util.List getRoutingConfiguration() { return routingConfiguration; } /** *

* The routing configuration of a state machine alias. The routing configuration shifts execution traffic between * two state machine versions. routingConfiguration contains an array of RoutingConfig * objects that specify up to two state machine versions. Step Functions then randomly choses which version to run * an execution with based on the weight assigned to each RoutingConfig. *

* * @param routingConfiguration * The routing configuration of a state machine alias. The routing configuration shifts execution traffic * between two state machine versions. routingConfiguration contains an array of * RoutingConfig objects that specify up to two state machine versions. Step Functions then * randomly choses which version to run an execution with based on the weight assigned to each * RoutingConfig. */ 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 a state machine alias. The routing configuration shifts execution traffic between * two state machine versions. routingConfiguration contains an array of RoutingConfig * objects that specify up to two state machine versions. Step Functions then randomly choses which version to run * an execution with based on the weight assigned to each RoutingConfig. *

*

* 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 a state machine alias. The routing configuration shifts execution traffic * between two state machine versions. routingConfiguration contains an array of * RoutingConfig objects that specify up to two state machine versions. Step Functions then * randomly choses which version to run an execution with based on the weight assigned to each * RoutingConfig. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateStateMachineAliasRequest 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 a state machine alias. The routing configuration shifts execution traffic between * two state machine versions. routingConfiguration contains an array of RoutingConfig * objects that specify up to two state machine versions. Step Functions then randomly choses which version to run * an execution with based on the weight assigned to each RoutingConfig. *

* * @param routingConfiguration * The routing configuration of a state machine alias. The routing configuration shifts execution traffic * between two state machine versions. routingConfiguration contains an array of * RoutingConfig objects that specify up to two state machine versions. Step Functions then * randomly choses which version to run an execution with based on the weight assigned to each * RoutingConfig. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateStateMachineAliasRequest 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 (getDescription() != null) sb.append("Description: ").append("***Sensitive Data Redacted***").append(","); if (getName() != null) sb.append("Name: ").append(getName()).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 CreateStateMachineAliasRequest == false) return false; CreateStateMachineAliasRequest other = (CreateStateMachineAliasRequest) obj; if (other.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == 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.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 + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRoutingConfiguration() == null) ? 0 : getRoutingConfiguration().hashCode()); return hashCode; } @Override public CreateStateMachineAliasRequest clone() { return (CreateStateMachineAliasRequest) super.clone(); } }