
com.amazonaws.services.apigatewayv2.model.UpdateDomainNameRequest Maven / Gradle / Ivy
/*
* Copyright 2015-2020 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;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* Updates a DomainName.
*
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UpdateDomainNameRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The domain name.
*
*/
private String domainName;
/**
*
* The domain name configurations.
*
*/
private java.util.List domainNameConfigurations;
/**
*
* The mutual TLS authentication configuration for a custom domain name.
*
*/
private MutualTlsAuthenticationInput mutualTlsAuthentication;
/**
*
* The domain name.
*
*
* @param domainName
* The domain name.
*/
public void setDomainName(String domainName) {
this.domainName = domainName;
}
/**
*
* The domain name.
*
*
* @return The domain name.
*/
public String getDomainName() {
return this.domainName;
}
/**
*
* The domain name.
*
*
* @param domainName
* The domain name.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateDomainNameRequest 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 UpdateDomainNameRequest 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 UpdateDomainNameRequest 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(MutualTlsAuthenticationInput 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 MutualTlsAuthenticationInput 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 UpdateDomainNameRequest withMutualTlsAuthentication(MutualTlsAuthenticationInput mutualTlsAuthentication) {
setMutualTlsAuthentication(mutualTlsAuthentication);
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 (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());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateDomainNameRequest == false)
return false;
UpdateDomainNameRequest other = (UpdateDomainNameRequest) obj;
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;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
hashCode = prime * hashCode + ((getDomainNameConfigurations() == null) ? 0 : getDomainNameConfigurations().hashCode());
hashCode = prime * hashCode + ((getMutualTlsAuthentication() == null) ? 0 : getMutualTlsAuthentication().hashCode());
return hashCode;
}
@Override
public UpdateDomainNameRequest clone() {
return (UpdateDomainNameRequest) super.clone();
}
}