/* * 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.apprunner.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 AssociateCustomDomainRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with. *
*/ private String serviceArn; /** *
* A custom domain endpoint to associate. Specify a root domain (for example, example.com
), a subdomain
* (for example, login.example.com
or admin.login.example.com
), or a wildcard (for
* example, *.example.com
).
*
* Set to true
to associate the subdomain www.DomainName
with the App Runner
* service in addition to the base domain.
*
* Default: true
*
* The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with. *
* * @param serviceArn * The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name * with. */ public void setServiceArn(String serviceArn) { this.serviceArn = serviceArn; } /** ** The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with. *
* * @return The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name * with. */ public String getServiceArn() { return this.serviceArn; } /** ** The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name with. *
* * @param serviceArn * The Amazon Resource Name (ARN) of the App Runner service that you want to associate a custom domain name * with. * @return Returns a reference to this object so that method calls can be chained together. */ public AssociateCustomDomainRequest withServiceArn(String serviceArn) { setServiceArn(serviceArn); return this; } /** *
* A custom domain endpoint to associate. Specify a root domain (for example, example.com
), a subdomain
* (for example, login.example.com
or admin.login.example.com
), or a wildcard (for
* example, *.example.com
).
*
example.com
), a
* subdomain (for example, login.example.com
or admin.login.example.com
), or a
* wildcard (for example, *.example.com
).
*/
public void setDomainName(String domainName) {
this.domainName = domainName;
}
/**
*
* A custom domain endpoint to associate. Specify a root domain (for example, example.com
), a subdomain
* (for example, login.example.com
or admin.login.example.com
), or a wildcard (for
* example, *.example.com
).
*
example.com
), a
* subdomain (for example, login.example.com
or admin.login.example.com
), or a
* wildcard (for example, *.example.com
).
*/
public String getDomainName() {
return this.domainName;
}
/**
*
* A custom domain endpoint to associate. Specify a root domain (for example, example.com
), a subdomain
* (for example, login.example.com
or admin.login.example.com
), or a wildcard (for
* example, *.example.com
).
*
example.com
), a
* subdomain (for example, login.example.com
or admin.login.example.com
), or a
* wildcard (for example, *.example.com
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AssociateCustomDomainRequest withDomainName(String domainName) {
setDomainName(domainName);
return this;
}
/**
*
* Set to true
to associate the subdomain www.DomainName
with the App Runner
* service in addition to the base domain.
*
* Default: true
*
true
to associate the subdomain www.DomainName
with the App
* Runner service in addition to the base domain.
*
* Default: true
*/
public void setEnableWWWSubdomain(Boolean enableWWWSubdomain) {
this.enableWWWSubdomain = enableWWWSubdomain;
}
/**
*
* Set to true
to associate the subdomain www.DomainName
with the App Runner
* service in addition to the base domain.
*
* Default: true
*
true
to associate the subdomain www.DomainName
with the App
* Runner service in addition to the base domain.
*
* Default: true
*/
public Boolean getEnableWWWSubdomain() {
return this.enableWWWSubdomain;
}
/**
*
* Set to true
to associate the subdomain www.DomainName
with the App Runner
* service in addition to the base domain.
*
* Default: true
*
true
to associate the subdomain www.DomainName
with the App
* Runner service in addition to the base domain.
*
* Default: true
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AssociateCustomDomainRequest withEnableWWWSubdomain(Boolean enableWWWSubdomain) {
setEnableWWWSubdomain(enableWWWSubdomain);
return this;
}
/**
*
* Set to true
to associate the subdomain www.DomainName
with the App Runner
* service in addition to the base domain.
*
* Default: true
*
true
to associate the subdomain www.DomainName
with the App
* Runner service in addition to the base domain.
*
* Default: true
*/
public Boolean isEnableWWWSubdomain() {
return this.enableWWWSubdomain;
}
/**
* 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 (getServiceArn() != null)
sb.append("ServiceArn: ").append(getServiceArn()).append(",");
if (getDomainName() != null)
sb.append("DomainName: ").append(getDomainName()).append(",");
if (getEnableWWWSubdomain() != null)
sb.append("EnableWWWSubdomain: ").append(getEnableWWWSubdomain());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof AssociateCustomDomainRequest == false)
return false;
AssociateCustomDomainRequest other = (AssociateCustomDomainRequest) obj;
if (other.getServiceArn() == null ^ this.getServiceArn() == null)
return false;
if (other.getServiceArn() != null && other.getServiceArn().equals(this.getServiceArn()) == 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.getEnableWWWSubdomain() == null ^ this.getEnableWWWSubdomain() == null)
return false;
if (other.getEnableWWWSubdomain() != null && other.getEnableWWWSubdomain().equals(this.getEnableWWWSubdomain()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getServiceArn() == null) ? 0 : getServiceArn().hashCode());
hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode());
hashCode = prime * hashCode + ((getEnableWWWSubdomain() == null) ? 0 : getEnableWWWSubdomain().hashCode());
return hashCode;
}
@Override
public AssociateCustomDomainRequest clone() {
return (AssociateCustomDomainRequest) super.clone();
}
}