/* * 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.apigatewayv2.model; import java.io.Serializable; import javax.annotation.Generated; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDomainNameResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable { /** *

* The API mapping selection expression. *

*/ private String apiMappingSelectionExpression; /** *

* The name of the DomainName resource. *

*/ private String domainName; /** *

* The domain name configurations. *

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

* The mutual TLS authentication configuration for a custom domain name. *

*/ private MutualTlsAuthentication mutualTlsAuthentication; /** *

* The collection of tags associated with a domain name. *

*/ private java.util.Map tags; /** *

* The API mapping selection expression. *

* * @param apiMappingSelectionExpression * The API mapping selection expression. */ public void setApiMappingSelectionExpression(String apiMappingSelectionExpression) { this.apiMappingSelectionExpression = apiMappingSelectionExpression; } /** *

* The API mapping selection expression. *

* * @return The API mapping selection expression. */ public String getApiMappingSelectionExpression() { return this.apiMappingSelectionExpression; } /** *

* The API mapping selection expression. *

* * @param apiMappingSelectionExpression * The API mapping selection expression. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainNameResult withApiMappingSelectionExpression(String apiMappingSelectionExpression) { setApiMappingSelectionExpression(apiMappingSelectionExpression); return this; } /** *

* The name of the DomainName resource. *

* * @param domainName * The name of the DomainName resource. */ public void setDomainName(String domainName) { this.domainName = domainName; } /** *

* The name of the DomainName resource. *

* * @return The name of the DomainName resource. */ public String getDomainName() { return this.domainName; } /** *

* The name of the DomainName resource. *

* * @param domainName * The name of the DomainName resource. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainNameResult withDomainName(String domainName) { setDomainName(domainName); return this; } /** *

* The domain name configurations. *

* * @return The domain name configurations. */ public java.util.List getDomainNameConfigurations() { return domainNameConfigurations; } /** *

* The domain name configurations. *

* * @param domainNameConfigurations * The domain name configurations. */ public void setDomainNameConfigurations(java.util.Collection domainNameConfigurations) { if (domainNameConfigurations == null) { this.domainNameConfigurations = null; return; } this.domainNameConfigurations = new java.util.ArrayList(domainNameConfigurations); } /** *

* The domain name configurations. *

*

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

* * @param domainNameConfigurations * The domain name configurations. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainNameResult withDomainNameConfigurations(DomainNameConfiguration... domainNameConfigurations) { if (this.domainNameConfigurations == null) { setDomainNameConfigurations(new java.util.ArrayList(domainNameConfigurations.length)); } for (DomainNameConfiguration ele : domainNameConfigurations) { this.domainNameConfigurations.add(ele); } return this; } /** *

* The domain name configurations. *

* * @param domainNameConfigurations * The domain name configurations. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainNameResult withDomainNameConfigurations(java.util.Collection domainNameConfigurations) { setDomainNameConfigurations(domainNameConfigurations); return this; } /** *

* The mutual TLS authentication configuration for a custom domain name. *

* * @param mutualTlsAuthentication * The mutual TLS authentication configuration for a custom domain name. */ public void setMutualTlsAuthentication(MutualTlsAuthentication mutualTlsAuthentication) { this.mutualTlsAuthentication = mutualTlsAuthentication; } /** *

* The mutual TLS authentication configuration for a custom domain name. *

* * @return The mutual TLS authentication configuration for a custom domain name. */ public MutualTlsAuthentication getMutualTlsAuthentication() { return this.mutualTlsAuthentication; } /** *

* The mutual TLS authentication configuration for a custom domain name. *

* * @param mutualTlsAuthentication * The mutual TLS authentication configuration for a custom domain name. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainNameResult withMutualTlsAuthentication(MutualTlsAuthentication mutualTlsAuthentication) { setMutualTlsAuthentication(mutualTlsAuthentication); return this; } /** *

* The collection of tags associated with a domain name. *

* * @return The collection of tags associated with a domain name. */ public java.util.Map getTags() { return tags; } /** *

* The collection of tags associated with a domain name. *

* * @param tags * The collection of tags associated with a domain name. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The collection of tags associated with a domain name. *

* * @param tags * The collection of tags associated with a domain name. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainNameResult withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreateDomainNameResult#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreateDomainNameResult addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateDomainNameResult clearTagsEntries() { this.tags = null; 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 (getApiMappingSelectionExpression() != null) sb.append("ApiMappingSelectionExpression: ").append(getApiMappingSelectionExpression()).append(","); if (getDomainName() != null) sb.append("DomainName: ").append(getDomainName()).append(","); if (getDomainNameConfigurations() != null) sb.append("DomainNameConfigurations: ").append(getDomainNameConfigurations()).append(","); if (getMutualTlsAuthentication() != null) sb.append("MutualTlsAuthentication: ").append(getMutualTlsAuthentication()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateDomainNameResult == false) return false; CreateDomainNameResult other = (CreateDomainNameResult) obj; if (other.getApiMappingSelectionExpression() == null ^ this.getApiMappingSelectionExpression() == null) return false; if (other.getApiMappingSelectionExpression() != null && other.getApiMappingSelectionExpression().equals(this.getApiMappingSelectionExpression()) == false) return false; if (other.getDomainName() == null ^ this.getDomainName() == null) return false; if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == false) return false; if (other.getDomainNameConfigurations() == null ^ this.getDomainNameConfigurations() == null) return false; if (other.getDomainNameConfigurations() != null && other.getDomainNameConfigurations().equals(this.getDomainNameConfigurations()) == false) return false; if (other.getMutualTlsAuthentication() == null ^ this.getMutualTlsAuthentication() == null) return false; if (other.getMutualTlsAuthentication() != null && other.getMutualTlsAuthentication().equals(this.getMutualTlsAuthentication()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getApiMappingSelectionExpression() == null) ? 0 : getApiMappingSelectionExpression().hashCode()); hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode()); hashCode = prime * hashCode + ((getDomainNameConfigurations() == null) ? 0 : getDomainNameConfigurations().hashCode()); hashCode = prime * hashCode + ((getMutualTlsAuthentication() == null) ? 0 : getMutualTlsAuthentication().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateDomainNameResult clone() { try { return (CreateDomainNameResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }