/* * 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.pinpointsmsvoicev2.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 CreateConfigurationSetRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name to use for the new configuration set. *
*/ private String configurationSetName; /** ** An array of key and value pair tags that's associated with the new configuration set. *
*/ private java.util.List* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify * a client token, a randomly generated token is used for the request to ensure idempotency. *
*/ private String clientToken; /** ** The name to use for the new configuration set. *
* * @param configurationSetName * The name to use for the new configuration set. */ public void setConfigurationSetName(String configurationSetName) { this.configurationSetName = configurationSetName; } /** ** The name to use for the new configuration set. *
* * @return The name to use for the new configuration set. */ public String getConfigurationSetName() { return this.configurationSetName; } /** ** The name to use for the new configuration set. *
* * @param configurationSetName * The name to use for the new configuration set. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConfigurationSetRequest withConfigurationSetName(String configurationSetName) { setConfigurationSetName(configurationSetName); return this; } /** ** An array of key and value pair tags that's associated with the new configuration set. *
* * @return An array of key and value pair tags that's associated with the new configuration set. */ public java.util.List* An array of key and value pair tags that's associated with the new configuration set. *
* * @param tags * An array of key and value pair tags that's associated with the new configuration set. */ public void setTags(java.util.Collection* An array of key and value pair tags that's associated with the new configuration set. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the * existing values. *
* * @param tags * An array of key and value pair tags that's associated with the new configuration set. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConfigurationSetRequest withTags(Tag... tags) { if (this.tags == null) { setTags(new java.util.ArrayList* An array of key and value pair tags that's associated with the new configuration set. *
* * @param tags * An array of key and value pair tags that's associated with the new configuration set. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConfigurationSetRequest withTags(java.util.Collection* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify * a client token, a randomly generated token is used for the request to ensure idempotency. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't * specify a client token, a randomly generated token is used for the request to ensure idempotency. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify * a client token, a randomly generated token is used for the request to ensure idempotency. *
* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't * specify a client token, a randomly generated token is used for the request to ensure idempotency. */ public String getClientToken() { return this.clientToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't specify * a client token, a randomly generated token is used for the request to ensure idempotency. *
* * @param clientToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. If you don't * specify a client token, a randomly generated token is used for the request to ensure idempotency. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateConfigurationSetRequest withClientToken(String clientToken) { setClientToken(clientToken); 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 (getConfigurationSetName() != null) sb.append("ConfigurationSetName: ").append(getConfigurationSetName()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateConfigurationSetRequest == false) return false; CreateConfigurationSetRequest other = (CreateConfigurationSetRequest) obj; if (other.getConfigurationSetName() == null ^ this.getConfigurationSetName() == null) return false; if (other.getConfigurationSetName() != null && other.getConfigurationSetName().equals(this.getConfigurationSetName()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getConfigurationSetName() == null) ? 0 : getConfigurationSetName().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); return hashCode; } @Override public CreateConfigurationSetRequest clone() { return (CreateConfigurationSetRequest) super.clone(); } }