
com.amazonaws.services.lightsail.model.DomainEntry Maven / Gradle / Ivy
/*
* 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.lightsail.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Describes a domain recordset entry.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DomainEntry implements Serializable, Cloneable, StructuredPojo {
/**
*
* The ID of the domain recordset entry.
*
*/
private String id;
/**
*
* The name of the domain.
*
*/
private String name;
/**
*
* The target IP address (e.g., 192.0.2.0
), or AWS name server (e.g.,
* ns-111.awsdns-22.com.
).
*
*
* For Lightsail load balancers, the value looks like
* ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com
. For Lightsail distributions,
* the value looks like exampled1182ne.cloudfront.net
. For Lightsail container services, the value
* looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com
. Be sure to also set
* isAlias
to true
when setting up an A record for a Lightsail load balancer,
* distribution, or container service.
*
*/
private String target;
/**
*
* When true
, specifies whether the domain entry is an alias used by the Lightsail load balancer,
* Lightsail container service, Lightsail content delivery network (CDN) distribution, or another Amazon Web
* Services resource. You can include an alias (A type) record in your request, which points to the DNS name of a
* load balancer, container service, CDN distribution, or other Amazon Web Services resource and routes traffic to
* that resource.
*
*/
private Boolean isAlias;
/**
*
* The type of domain entry, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail
* exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
*
*
* The following domain entry types can be used:
*
*
* -
*
* A
*
*
* -
*
* AAAA
*
*
* -
*
* CNAME
*
*
* -
*
* MX
*
*
* -
*
* NS
*
*
* -
*
* SOA
*
*
* -
*
* SRV
*
*
* -
*
* TXT
*
*
*
*/
private String type;
/**
*
* (Deprecated) The options for the domain entry.
*
*
*
* In releases prior to November 29, 2017, this parameter was not included in the API response. It is now
* deprecated.
*
*
*/
@Deprecated
private java.util.Map options;
/**
*
* The ID of the domain recordset entry.
*
*
* @param id
* The ID of the domain recordset entry.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The ID of the domain recordset entry.
*
*
* @return The ID of the domain recordset entry.
*/
public String getId() {
return this.id;
}
/**
*
* The ID of the domain recordset entry.
*
*
* @param id
* The ID of the domain recordset entry.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainEntry withId(String id) {
setId(id);
return this;
}
/**
*
* The name of the domain.
*
*
* @param name
* The name of the domain.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the domain.
*
*
* @return The name of the domain.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the domain.
*
*
* @param name
* The name of the domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainEntry withName(String name) {
setName(name);
return this;
}
/**
*
* The target IP address (e.g., 192.0.2.0
), or AWS name server (e.g.,
* ns-111.awsdns-22.com.
).
*
*
* For Lightsail load balancers, the value looks like
* ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com
. For Lightsail distributions,
* the value looks like exampled1182ne.cloudfront.net
. For Lightsail container services, the value
* looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com
. Be sure to also set
* isAlias
to true
when setting up an A record for a Lightsail load balancer,
* distribution, or container service.
*
*
* @param target
* The target IP address (e.g., 192.0.2.0
), or AWS name server (e.g.,
* ns-111.awsdns-22.com.
).
*
* For Lightsail load balancers, the value looks like
* ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com
. For Lightsail
* distributions, the value looks like exampled1182ne.cloudfront.net
. For Lightsail container
* services, the value looks like
* container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com
. Be sure to also set
* isAlias
to true
when setting up an A record for a Lightsail load balancer,
* distribution, or container service.
*/
public void setTarget(String target) {
this.target = target;
}
/**
*
* The target IP address (e.g., 192.0.2.0
), or AWS name server (e.g.,
* ns-111.awsdns-22.com.
).
*
*
* For Lightsail load balancers, the value looks like
* ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com
. For Lightsail distributions,
* the value looks like exampled1182ne.cloudfront.net
. For Lightsail container services, the value
* looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com
. Be sure to also set
* isAlias
to true
when setting up an A record for a Lightsail load balancer,
* distribution, or container service.
*
*
* @return The target IP address (e.g., 192.0.2.0
), or AWS name server (e.g.,
* ns-111.awsdns-22.com.
).
*
* For Lightsail load balancers, the value looks like
* ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com
. For Lightsail
* distributions, the value looks like exampled1182ne.cloudfront.net
. For Lightsail container
* services, the value looks like
* container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com
. Be sure to also set
* isAlias
to true
when setting up an A record for a Lightsail load balancer,
* distribution, or container service.
*/
public String getTarget() {
return this.target;
}
/**
*
* The target IP address (e.g., 192.0.2.0
), or AWS name server (e.g.,
* ns-111.awsdns-22.com.
).
*
*
* For Lightsail load balancers, the value looks like
* ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com
. For Lightsail distributions,
* the value looks like exampled1182ne.cloudfront.net
. For Lightsail container services, the value
* looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com
. Be sure to also set
* isAlias
to true
when setting up an A record for a Lightsail load balancer,
* distribution, or container service.
*
*
* @param target
* The target IP address (e.g., 192.0.2.0
), or AWS name server (e.g.,
* ns-111.awsdns-22.com.
).
*
* For Lightsail load balancers, the value looks like
* ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com
. For Lightsail
* distributions, the value looks like exampled1182ne.cloudfront.net
. For Lightsail container
* services, the value looks like
* container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com
. Be sure to also set
* isAlias
to true
when setting up an A record for a Lightsail load balancer,
* distribution, or container service.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainEntry withTarget(String target) {
setTarget(target);
return this;
}
/**
*
* When true
, specifies whether the domain entry is an alias used by the Lightsail load balancer,
* Lightsail container service, Lightsail content delivery network (CDN) distribution, or another Amazon Web
* Services resource. You can include an alias (A type) record in your request, which points to the DNS name of a
* load balancer, container service, CDN distribution, or other Amazon Web Services resource and routes traffic to
* that resource.
*
*
* @param isAlias
* When true
, specifies whether the domain entry is an alias used by the Lightsail load
* balancer, Lightsail container service, Lightsail content delivery network (CDN) distribution, or another
* Amazon Web Services resource. You can include an alias (A type) record in your request, which points to
* the DNS name of a load balancer, container service, CDN distribution, or other Amazon Web Services
* resource and routes traffic to that resource.
*/
public void setIsAlias(Boolean isAlias) {
this.isAlias = isAlias;
}
/**
*
* When true
, specifies whether the domain entry is an alias used by the Lightsail load balancer,
* Lightsail container service, Lightsail content delivery network (CDN) distribution, or another Amazon Web
* Services resource. You can include an alias (A type) record in your request, which points to the DNS name of a
* load balancer, container service, CDN distribution, or other Amazon Web Services resource and routes traffic to
* that resource.
*
*
* @return When true
, specifies whether the domain entry is an alias used by the Lightsail load
* balancer, Lightsail container service, Lightsail content delivery network (CDN) distribution, or another
* Amazon Web Services resource. You can include an alias (A type) record in your request, which points to
* the DNS name of a load balancer, container service, CDN distribution, or other Amazon Web Services
* resource and routes traffic to that resource.
*/
public Boolean getIsAlias() {
return this.isAlias;
}
/**
*
* When true
, specifies whether the domain entry is an alias used by the Lightsail load balancer,
* Lightsail container service, Lightsail content delivery network (CDN) distribution, or another Amazon Web
* Services resource. You can include an alias (A type) record in your request, which points to the DNS name of a
* load balancer, container service, CDN distribution, or other Amazon Web Services resource and routes traffic to
* that resource.
*
*
* @param isAlias
* When true
, specifies whether the domain entry is an alias used by the Lightsail load
* balancer, Lightsail container service, Lightsail content delivery network (CDN) distribution, or another
* Amazon Web Services resource. You can include an alias (A type) record in your request, which points to
* the DNS name of a load balancer, container service, CDN distribution, or other Amazon Web Services
* resource and routes traffic to that resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainEntry withIsAlias(Boolean isAlias) {
setIsAlias(isAlias);
return this;
}
/**
*
* When true
, specifies whether the domain entry is an alias used by the Lightsail load balancer,
* Lightsail container service, Lightsail content delivery network (CDN) distribution, or another Amazon Web
* Services resource. You can include an alias (A type) record in your request, which points to the DNS name of a
* load balancer, container service, CDN distribution, or other Amazon Web Services resource and routes traffic to
* that resource.
*
*
* @return When true
, specifies whether the domain entry is an alias used by the Lightsail load
* balancer, Lightsail container service, Lightsail content delivery network (CDN) distribution, or another
* Amazon Web Services resource. You can include an alias (A type) record in your request, which points to
* the DNS name of a load balancer, container service, CDN distribution, or other Amazon Web Services
* resource and routes traffic to that resource.
*/
public Boolean isAlias() {
return this.isAlias;
}
/**
*
* The type of domain entry, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail
* exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
*
*
* The following domain entry types can be used:
*
*
* -
*
* A
*
*
* -
*
* AAAA
*
*
* -
*
* CNAME
*
*
* -
*
* MX
*
*
* -
*
* NS
*
*
* -
*
* SOA
*
*
* -
*
* SRV
*
*
* -
*
* TXT
*
*
*
*
* @param type
* The type of domain entry, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME),
* mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
*
* The following domain entry types can be used:
*
*
* -
*
* A
*
*
* -
*
* AAAA
*
*
* -
*
* CNAME
*
*
* -
*
* MX
*
*
* -
*
* NS
*
*
* -
*
* SOA
*
*
* -
*
* SRV
*
*
* -
*
* TXT
*
*
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of domain entry, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail
* exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
*
*
* The following domain entry types can be used:
*
*
* -
*
* A
*
*
* -
*
* AAAA
*
*
* -
*
* CNAME
*
*
* -
*
* MX
*
*
* -
*
* NS
*
*
* -
*
* SOA
*
*
* -
*
* SRV
*
*
* -
*
* TXT
*
*
*
*
* @return The type of domain entry, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME),
* mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text
* (TXT).
*
* The following domain entry types can be used:
*
*
* -
*
* A
*
*
* -
*
* AAAA
*
*
* -
*
* CNAME
*
*
* -
*
* MX
*
*
* -
*
* NS
*
*
* -
*
* SOA
*
*
* -
*
* SRV
*
*
* -
*
* TXT
*
*
*/
public String getType() {
return this.type;
}
/**
*
* The type of domain entry, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME), mail
* exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
*
*
* The following domain entry types can be used:
*
*
* -
*
* A
*
*
* -
*
* AAAA
*
*
* -
*
* CNAME
*
*
* -
*
* MX
*
*
* -
*
* NS
*
*
* -
*
* SOA
*
*
* -
*
* SRV
*
*
* -
*
* TXT
*
*
*
*
* @param type
* The type of domain entry, such as address for IPv4 (A), address for IPv6 (AAAA), canonical name (CNAME),
* mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).
*
* The following domain entry types can be used:
*
*
* -
*
* A
*
*
* -
*
* AAAA
*
*
* -
*
* CNAME
*
*
* -
*
* MX
*
*
* -
*
* NS
*
*
* -
*
* SOA
*
*
* -
*
* SRV
*
*
* -
*
* TXT
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DomainEntry withType(String type) {
setType(type);
return this;
}
/**
*
* (Deprecated) The options for the domain entry.
*
*
*
* In releases prior to November 29, 2017, this parameter was not included in the API response. It is now
* deprecated.
*
*
*
* @return (Deprecated) The options for the domain entry.
*
* In releases prior to November 29, 2017, this parameter was not included in the API response. It is now
* deprecated.
*
*/
@Deprecated
public java.util.Map getOptions() {
return options;
}
/**
*
* (Deprecated) The options for the domain entry.
*
*
*
* In releases prior to November 29, 2017, this parameter was not included in the API response. It is now
* deprecated.
*
*
*
* @param options
* (Deprecated) The options for the domain entry.
*
* In releases prior to November 29, 2017, this parameter was not included in the API response. It is now
* deprecated.
*
*/
@Deprecated
public void setOptions(java.util.Map options) {
this.options = options;
}
/**
*
* (Deprecated) The options for the domain entry.
*
*
*
* In releases prior to November 29, 2017, this parameter was not included in the API response. It is now
* deprecated.
*
*
*
* @param options
* (Deprecated) The options for the domain entry.
*
* In releases prior to November 29, 2017, this parameter was not included in the API response. It is now
* deprecated.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
@Deprecated
public DomainEntry withOptions(java.util.Map options) {
setOptions(options);
return this;
}
/**
* Add a single Options entry
*
* @see DomainEntry#withOptions
* @returns a reference to this object so that method calls can be chained together.
*/
@Deprecated
public DomainEntry addOptionsEntry(String key, String value) {
if (null == this.options) {
this.options = new java.util.HashMap();
}
if (this.options.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.options.put(key, value);
return this;
}
/**
* Removes all the entries added into Options.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
@Deprecated
public DomainEntry clearOptionsEntries() {
this.options = 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 (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getTarget() != null)
sb.append("Target: ").append(getTarget()).append(",");
if (getIsAlias() != null)
sb.append("IsAlias: ").append(getIsAlias()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getOptions() != null)
sb.append("Options: ").append(getOptions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DomainEntry == false)
return false;
DomainEntry other = (DomainEntry) obj;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == 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.getTarget() == null ^ this.getTarget() == null)
return false;
if (other.getTarget() != null && other.getTarget().equals(this.getTarget()) == false)
return false;
if (other.getIsAlias() == null ^ this.getIsAlias() == null)
return false;
if (other.getIsAlias() != null && other.getIsAlias().equals(this.getIsAlias()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getOptions() == null ^ this.getOptions() == null)
return false;
if (other.getOptions() != null && other.getOptions().equals(this.getOptions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getTarget() == null) ? 0 : getTarget().hashCode());
hashCode = prime * hashCode + ((getIsAlias() == null) ? 0 : getIsAlias().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getOptions() == null) ? 0 : getOptions().hashCode());
return hashCode;
}
@Override
public DomainEntry clone() {
try {
return (DomainEntry) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.lightsail.model.transform.DomainEntryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}